Public report of plotly/plotly.js, published 15 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, 15 November 2026, 04:39 UTC · Survey ID cd_5da3400fcbe74c16958eee1d0f2648e7
plotly/plotly.js
Measured 15 November 2026, 04:31 UTC, at code version 90f954a
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 5 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 161,654 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.7 person-years · Weakest lens: Production Readiness, 28
Findings by how serious they are
7 critical1479 serious370 minor
9 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
15 November 2026, 04:31 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 ▸
64of 64 dimensions measured by tools.
1805of 1856 findings point to an exact file and line, so you can open each one in the code. The other 51 concern the repository as a whole, such as missing documentation.
64dimensions across 6 lenses, read from 161,654 lines of product code in 2 projects.
plotly/plotly.js falls short of our standard for production because we found no logging, tracing or health checks in the code and no automated security scanning of the code, its secrets or its dependencies. It scores 40 out of 100 and is rated Weak, and five of its seven critical findings are security problems.
Production Readiness, at 28, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 5 points. Adopting a logging library would lift Production Readiness itself, also worth about 5. Raising Production Readiness to 70 would lift the score to about 50.
Two known security holes in the packages the code depends on can be used by attackers. Two places in the code run text as code, which an attacker could use. Updating the vulnerable packages and replacing text run as code with direct calls would close both risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command. The two uses of packages that aren't listed need adding to the project's list of dependencies.
The product code is 161,654 lines, about €250,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.
Access Controls · No authorization devtools/regl_codegen/server.mjs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 553 findings
These 553 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one. The first 100 are listed here.
€82,000 to €410,000, for 1,364 to 4,327 hours of work, about 1.7 person-years for 1 to 4 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 40. 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
Large: 161,654 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
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 5 points · Medium effort · Access Controls
2
Adopt pino (or winston) and log at meaningful points in the services you run.
Raises the score by about 5 points · Medium effort · Observability
3
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €250,000 to build again, about 1.7 person-years of work. Its weakest lens is Production Readiness, at 28 (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.
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 2.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 15% to 34% on every change.
How this is estimated: It rests on an assumption 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. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity
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.
If you do one thing first · First action
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. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
At a glance — Code Health · 47% · Weak · gated by D1, D2, R1 ·
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
23
High / Critical
A03:2025 — Software Supply Chain Failures
15
High / Critical
Roadmap
Top priorities: 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; Adopt pino (or winston) and log at meaningful points in the services you run; Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Bring the 512 bodies over 15 down to 15 or less in Cognitive Complexity — start with hover.createHoverText (cognitive 245), plot (cognitive 242), calcTicks (cognitive 231).
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 — 7
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 — 1479
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 — 370
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 9
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 64 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 64 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, 1805 of 1856 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.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — the repository root (karma) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
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 4,566 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 4 test source file(s) (.py) 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 (.ts, .py, .js, .mjs) and its test script runs a plain-node harness, which the reliability runner re-ran on its own: `node tasks/test_bundle.js` in the repository root exited cleanly on 0 of 3 runs; `node test/image/compare_pixels_test.mjs` in the repository root exited cleanly on 0 of 3 runs; `node test/image/export_test.js` in the repository root exited cleanly on 0 of 3 runs. The harness executes every test file inside its own process and starts none of them as a separate `node` process, so each run yields a single pass/fail for the whole suite — too coarse to tell which test is flaky. Not scored — this is a limit of what a one-process harness reports, 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 composer.json, but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Composer dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
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 an ADMISSION gap, not an environment fault: it declares a published package (package.json), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
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 431.8s against a 431.8s 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. `lib/index.d.ts`, `src/components/modebar/attributes.ts`, `src/components/shapes/constants.ts`, `src/components/updatemenus/constants.ts`, `src/constants/alignment.ts`, … (+14 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
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: "> plotly.js@4.3.0 start / > node devtools/test_dashboard/server.mjs / ➜ Local: http://localhost:3000/REDACTED / watching esbuild... / build/test_dashboard-bundle.js 958.9kb / build/test_dashboard-bundle.css 83.8kb / ⚡ Done in 175ms / [watch] build finished, watching for changes..." 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: "> plotly.js@4.3.0 start / > node devtools/test_dashboard/server.mjs / ➜ Local: http://localhost:3000/REDACTED / watching esbuild... / build/test_dashboard-bundle.js 958.9kb / build/test_dashboard-bundle.css 83.8kb / ⚡ Done in 175ms / [watch] build finished, watching for changes..." 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 none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 445 further occurrence(s) are not listed individually; the score already reflects all 485.
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. 469 further occurrence(s) are not listed individually; the score already reflects all 509.
R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
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. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
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. 378 further occurrence(s) are not listed individually; the score already reflects all 418.
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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
X2 Cancellation propagation — 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, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, 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.
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 and Rust 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.
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.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
599 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was set_convert.setConvert at 234. A further 3 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 plots.plots.transition at 31 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/traces/carpet/set_convert.js (set_convert.setConvert at 20). 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.
+ 326 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 22 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with set_convert.setConvert (cyclomatic 234), convert.generateIsoMeshes (cyclomatic 179), hover.createHoverText (cyclomatic 147). — 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 22 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.
+ 482 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 512 bodies over 15 down to 15 or less in Cognitive Complexity — start with hover.createHoverText (cognitive 245), plot (cognitive 242), calcTicks (cognitive 231). — 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 512 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.5 / 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 74 FunctionTooLong finding(s) in God Classes — start with plot.js (10), hover.js (7), convert.js (6). — One of this dimension's main actionable groups (74 warning-level).
Resolve the 35 FileTooLong finding(s) in God Classes — start with plot.js (4), index.js (2), draw.js (2). — One of this dimension's main actionable groups (35 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.3 / 10Stronggated by 209 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 209 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4566 tests. Measured on the JavaScript/TypeScript suite only — at least 4 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: rejects if a frame is not found · ×209test/jasmine/tests/animate_test.js:183
What to do
Resolve the 209 No assertions finding(s) in Test Quality — start with hover_test.js (42), gl3d_hover_click_test.js (15), bar_test.js (14). — One of this dimension's main actionable groups (209 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
14 outdated direct production npm dependency(ies) of 77 graded, 0 pinning defect(s), across 3 package.json (3 of them the product) and 3 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 0 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Deprecated: inflight · ×11REDACTED:4513
Outdated (npm): @types/d3package.json:96
Outdated (npm): @plotly/point-cluster · ×13
✓ On the Gold path — maintain.
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.
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 335 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 335 package(s) this repository's committed lockfile installs for a consumer — its 77 production, optional and peer dependency(ies), across 3 product package.json manifest(s), and everything those install in turn. Its 53 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 1 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares composer.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 13 Hotspot finding(s) in Churn × Complexity Hotspots — start with plot.js (2), hover.js, axes.js. — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.7 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
48 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/traces/parcats/parcats.js. Counted over 368 of the 992 production source files in this repository: 573 are under the ~2,400-byte size floor this dimension measures over, and the remaining 51 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_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.
1 deducted task-comment markers across 1664 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoCommentsrc/components/shapes/constants.ts:13
What to do
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with constants.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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. 6 document(s) read across 2 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 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.
1 of 2 build units (npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
13 % 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).
23 finding(s): 0 critical, 3 high, 20 medium, 0 low. semgrep hit a parse error in 30 file(s) — `.github/scripts/test.sh` (line 22), `lib/index.d.ts` (line 50), `src/components/drawing/index.js`, `src/components/fx/hover.js`, `src/components/modebar/attributes.ts` (line 66), … (+25 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 5 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
259 of 419 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/plots/map/styles/arcgis-sat-hybrid.js. Counted over 419 of the 992 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3src/plots/map/styles/arcgis-sat-hybrid.js:1
Concentrated knowledge decay
What to do
Resolve the 256 Orphaned file finding(s) in Knowledge Freshness — start with attributes.js (30), defaults.js (25), calc.js (19). — One of this dimension's main actionable groups (256 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with arcgis-sat-hybrid.js, scene.js, plot.js. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 5 Change coupling finding(s) in Change Coupling — start with hover.js (2), tick_label_defaults.js, defaults.js. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with index-basic.js. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with plot.js. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether 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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 42 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
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 — a node:http server routing 2 path(s) by hand (devtools/regl_codegen/server.mjs:33) — 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. — devtools/regl_codegen/server.mjs:33
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. — src/components/sliders/draw.js:534
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. — src/traces/quiver/calc.js:200
What to do
Remove the dead code that looks live: delete dead if(false) branches, which read as logic that runs, and either do the real async work or drop the async keyword from fake-async functions, which promise work they never wait for.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging call was found in the 988 JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) 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 CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 6 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. — .github/workflows/check-draftlog.yml:4
`package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:87
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — devtools/regl_codegen/devtools.js:144, devtools/regl_codegen/devtools.js:155, src/lib/geo_location_utils.js:391
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.
Do you agree with this assessment?
R1 · Type Safety0.5 / 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.
52 typed · 1081 plain JS — the untyped files are devtools/dashboard_utilities.mjs, devtools/regl_codegen/devtools.js, devtools/regl_codegen/server.mjs, devtools/test_dashboard/devtools.js, devtools/test_dashboard/perf.js, devtools/test_dashboard/server.mjs (+1075 more).
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.
202 duplicated blocks under src/traces/ have copies in at least two of the sibling directories bar, barpolar, box, candlestick, carpet, choropleth (+41 more sibling(s) not listed) — 170 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 202 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 202 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 202 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. — src/traces/icicle/draw_descendants.js:3
51 duplicated blocks under src/ have copies in at least two of the sibling directories components, lib, plot_api, plots, traces — 28 of them are reported below, and 23 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 51 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 51 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 51 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. — src/plots/polar/polar.js:673
22 duplicated blocks under src/components/ have copies in at least two of the sibling directories annotations, colorbar, images, legend, modebar, rangeselector (+4 more sibling(s) not listed) — 14 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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. — src/components/selections/draw_newselection/newselections.js:82
22 duplicated blocks under src/plots/ have copies in at least two of the sibling directories cartesian, geo, gl3d, map, polar, smith (+1 more sibling(s) not listed) — 17 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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. — src/plots/polar/index.js:9
src/traces/icicle/draw_descendants.js:3 · src/traces/treemap/draw_descendants.js:3 — these 2 files are line-for-line copies of one another — 131 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/traces/icicle/draw_descendants.js:3
src/traces/funnelarea/plot.js:37 · src/traces/pie/plot.js:33 — the two spans are one implementation copied and then locally edited — 736 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. — src/traces/funnelarea/plot.js:37
src/traces/cone/convert.js:12 · src/traces/streamtube/convert.js:13 — the two spans are one implementation copied and then locally edited — 528 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. — src/traces/cone/convert.js:12
src/traces/choroplethmap/plot.js:7 · src/traces/densitymap/plot.js:6 — the two spans are one implementation copied and then locally edited — 509 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. — src/traces/choroplethmap/plot.js:7
src/traces/isosurface/convert.js:25 · src/traces/volume/convert.js:14 — 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. — src/traces/isosurface/convert.js:25
src/components/fx/hover.js:2489 · src/components/fx/hover.js:2568 — 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. — src/components/fx/hover.js:2489
src/traces/icicle/defaults.js:3 · src/traces/treemap/defaults.js:3 — these 2 files are line-for-line copies of one another — 63 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — src/traces/icicle/defaults.js:3
src/traces/bar/plot.js:298 · src/traces/bar/plot.js:396 — 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. — src/traces/bar/plot.js:298
src/traces/scattercarpet/attributes.js:62 · src/traces/scatterternary/attributes.js:90 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/traces/scattercarpet/attributes.js:62
src/traces/table/attributes.js:38 · src/traces/table/attributes.js:106 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/traces/table/attributes.js:38
src/traces/contour/plot.js:202 · src/traces/contourcarpet/plot.js:136 — the two spans are one implementation copied and then locally edited — 462 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. — src/traces/contour/plot.js:202
src/traces/scatterpolar/defaults.js:15 · src/traces/scattersmith/defaults.js:15 — 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. — src/traces/scatterpolar/defaults.js:15
src/plots/polar/index.js:9 · src/plots/smith/index.js:9 — 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. — src/plots/polar/index.js:9
src/traces/funnelarea/defaults.js:10 · src/traces/pie/defaults.js:52 — 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. — src/traces/funnelarea/defaults.js:10
src/traces/funnel/cross_trace_calc.js:5 · src/traces/waterfall/cross_trace_calc.js:5 — the two spans are one implementation copied and then locally edited — 259 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. — src/traces/funnel/cross_trace_calc.js:5
src/traces/treemap/draw_ancestors.js:101 · src/traces/treemap/draw_descendants.js:138 — the two spans are one implementation copied and then locally edited — 315 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. — src/traces/treemap/draw_ancestors.js:101
src/traces/scatterpolar/hover.js:5 · src/traces/scattersmith/hover.js:5 — 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. — src/traces/scatterpolar/hover.js:5
src/traces/choropleth/plot.js:25 · src/traces/scattergeo/plot.js:70 — the two spans are one implementation copied and then locally edited — 274 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. — src/traces/choropleth/plot.js:25
src/traces/carpet/create_i_derivative_evaluator.js:94 · src/traces/carpet/create_j_derivative_evaluator.js:39 — the two spans are one implementation copied and then locally edited — 318 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/traces/carpet/create_i_derivative_evaluator.js:94
src/components/selections/draw_newselection/newselections.js:82 · src/components/shapes/draw_newshape/newshapes.js:69 — the two spans are one implementation copied and then locally edited — 184 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. — src/components/selections/draw_newselection/newselections.js:82
src/components/grid/index.js:311 · src/components/grid/index.js:341 — 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. — src/components/grid/index.js:311
src/traces/scattersmith/defaults.js:34 · src/traces/scatterternary/defaults.js:60 — 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. — src/traces/scattersmith/defaults.js:34
src/traces/funnel/layout_attributes.js:12 · src/traces/waterfall/layout_attributes.js:11 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/traces/funnel/layout_attributes.js:12
src/traces/icicle/style.js:9 · src/traces/sunburst/style.js:9 — 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. — src/traces/icicle/style.js:9
src/components/updatemenus/scrollbox.js:146 · src/components/updatemenus/scrollbox.js:186 — 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. — src/components/updatemenus/scrollbox.js:146
REDACTED:909 · REDACTED:981 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:909
src/traces/cone/defaults.js:8 · src/traces/streamtube/defaults.js:8 — 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. — src/traces/cone/defaults.js:8
src/traces/quiver/plot.js:45 · src/traces/scatter/plot.js:38 — 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. — src/traces/quiver/plot.js:45
src/traces/carpet/create_j_derivative_evaluator.js:18 · src/traces/carpet/create_j_derivative_evaluator.js:81 — the two spans are one implementation copied and then locally edited — 318 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. — src/traces/carpet/create_j_derivative_evaluator.js:18
src/traces/choropleth/select.js:9 · src/traces/scattergeo/select.js:16 — 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. — src/traces/choropleth/select.js:9
src/components/drawing/index.js:592 · src/components/drawing/index.js:659 — 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. — src/components/drawing/index.js:592
src/components/fx/hover.js:1538 · src/components/fx/hover.js:1567 — 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. — src/components/fx/hover.js:1538
src/traces/cone/attributes.js:148 · src/traces/streamtube/attributes.js:120 — 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. — src/traces/cone/attributes.js:148
src/traces/scatterpolar/attributes.js:76 · src/traces/scattersmith/attributes.js:32 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/traces/scatterpolar/attributes.js:76
src/components/legend/style.js:471 · src/components/legend/style.js:501 — 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. — src/components/legend/style.js:471
src/components/shapes/draw.js:496 · src/components/shapes/draw.js:544 — 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. — src/components/shapes/draw.js:496
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.
src/components/calendars/calendars.js:6 imports world-calendars/dist/main, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:6
src/components/calendars/calendars.js:8 imports world-calendars/dist/plus, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:8
src/components/calendars/calendars.js:10 imports world-calendars/dist/calendars/chinese, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:10
src/components/calendars/calendars.js:11 imports world-calendars/dist/calendars/coptic, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:11
src/components/calendars/calendars.js:12 imports world-calendars/dist/calendars/discworld, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:12
src/components/calendars/calendars.js:13 imports world-calendars/dist/calendars/ethiopian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:13
src/components/calendars/calendars.js:14 imports world-calendars/dist/calendars/hebrew, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:14
src/components/calendars/calendars.js:15 imports world-calendars/dist/calendars/islamic, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:15
src/components/calendars/calendars.js:16 imports world-calendars/dist/calendars/julian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:16
src/components/calendars/calendars.js:17 imports world-calendars/dist/calendars/mayan, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:17
src/components/calendars/calendars.js:18 imports world-calendars/dist/calendars/nanakshahi, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:18
src/components/calendars/calendars.js:19 imports world-calendars/dist/calendars/nepali, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:19
src/components/calendars/calendars.js:20 imports world-calendars/dist/calendars/persian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:20
src/components/calendars/calendars.js:21 imports world-calendars/dist/calendars/taiwan, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:21
src/components/calendars/calendars.js:22 imports world-calendars/dist/calendars/thai, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:22
src/components/calendars/calendars.js:23 imports world-calendars/dist/calendars/ummalqura, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/components/calendars/calendars.js:23
src/plots/map/map.js:4 imports maplibre-gl/dist/maplibre-gl.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/plots/map/map.js:4
REDACTED:10 imports world-calendars/dist/regional/en-GB, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:10
tasks/util/constants.js:201 imports maplibre-gl/dist/maplibre-gl-worker.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — tasks/util/constants.js:201
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
_hover has cyclomatic complexity 106 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/components/fx/hover.js:292
(anonymous) has cyclomatic complexity 104 and cognitive complexity 201; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/heatmap/plot.js:34
_relayout has cyclomatic complexity 93 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1892
calcTicks has cyclomatic complexity 91 and cognitive complexity 192; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/axes.js:997
handleItemClick has cyclomatic complexity 72 and cognitive complexity 166; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/components/legend/handle_click.js:22
_restyle has cyclomatic complexity 65 and cognitive complexity 143; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1420
createHoverText has cyclomatic complexity 65 and cognitive complexity 132; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/components/fx/hover.js:1109
supplyLayoutDefaults has cyclomatic complexity 64 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/layout_defaults.js:31
findHoverPoints has cyclomatic complexity 58 and cognitive complexity 138; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/components/fx/hover.js:530
singlePointStyle has cyclomatic complexity 58 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/components/drawing/index.js:889
calc has cyclomatic complexity 57 and cognitive complexity 129; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/box/calc.js:12
plot has cyclomatic complexity 57 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/scattergl/plot.js:45
positionCB has cyclomatic complexity 56 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/components/colorbar/draw.js:604
crawl has cyclomatic complexity 55 and cognitive complexity 119; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:108
getDiffFlags has cyclomatic complexity 54 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2915
makePath has cyclomatic complexity 53 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/traces/contour/find_all_paths.js:47
lsInner has cyclomatic complexity 53 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plot_api/subroutines.js:48
supplyDefaults has cyclomatic complexity 52 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/plots.js:197
cleanData has cyclomatic complexity 51 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plot_api/helpers.js:169
handleAxisDefaults has cyclomatic complexity 50 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/axis_defaults.js:42
updateSubplots has cyclomatic complexity 49 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/plots/cartesian/dragbox.js:878
(anonymous) has cyclomatic complexity 49 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/bar/plot.js:135
makeLabelFns has cyclomatic complexity 49 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/axes.js:3369
plotDrag has cyclomatic complexity 49 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/dragbox.js:557
update has cyclomatic complexity 47 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/traces/surface/convert.js:423
plot has cyclomatic complexity 47 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 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. — src/plots/gl3d/scene.js:558
handleGeoDefaults has cyclomatic complexity 47 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/geo/layout_defaults.js:23
crossTraceDefaults has cyclomatic complexity 46 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/traces/histogram/cross_trace_defaults.js:23
groupDefaults has cyclomatic complexity 46 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/components/legend/defaults.js:12
drawOne has cyclomatic complexity 46 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plots/cartesian/axes.js:2649
linePoints has cyclomatic complexity 44 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/scatter/line_points.js:15
cleanLayout has cyclomatic complexity 44 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/plot_api/helpers.js:28
calcHover has cyclomatic complexity 44 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/scattergl/hover.js:113
calc has cyclomatic complexity 44 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/histogram/calc.js:18
(anonymous) has cyclomatic complexity 43 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/plots/cartesian/axes.js:2926
drawGraphicalElements has cyclomatic complexity 42 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/components/annotations/draw.js:261
calcAllAutoBins has cyclomatic complexity 42 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/traces/histogram/calc.js:242
handleSampleDefaults has cyclomatic complexity 42 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. — src/traces/box/defaults.js:73
applyUIRevisions has cyclomatic complexity 41 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2462
merge has cyclomatic complexity 41 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/plots/gl3d/layout/convert.js:67
Do you agree with this assessment?
R3 · Large Files7.3 / 10Strong✓ 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.
src/plots/cartesian/axes.js has 4185 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/axes.js:1
REDACTED has 3320 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
src/plots/plots.js has 2605 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/plots.js:1
src/components/fx/hover.js has 2417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/fx/hover.js:1
src/traces/parcats/parcats.js has 1879 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/parcats/parcats.js:1
src/components/drawing/index.js has 1684 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/drawing/index.js:1
src/plots/polar/polar.js has 1342 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/polar/polar.js:1
tasks/generate_schema_types.mjs has 1313 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tasks/generate_schema_types.mjs:1
src/components/selections/select.js has 1300 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/selections/select.js:1
src/plots/cartesian/layout_attributes.js has 1260 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/layout_attributes.js:1
src/lib/index.js has 1197 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/lib/index.js:1
src/plots/cartesian/dragbox.js has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/dragbox.js:1
src/traces/pie/plot.js has 1102 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/pie/plot.js:1
src/traces/bar/plot.js has 1037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/bar/plot.js:1
src/traces/sankey/render.js has 997 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/sankey/render.js:1
src/components/legend/draw.js has 980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/legend/draw.js:1
src/plots/gl3d/scene.js has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/gl3d/scene.js:1
REDACTED has 931 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
src/plots/cartesian/set_convert.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/set_convert.js:1
src/traces/isosurface/convert.js has 889 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/isosurface/convert.js:1
src/components/colorbar/draw.js has 873 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/colorbar/draw.js:1
src/traces/bar/cross_trace_calc.js has 785 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/bar/cross_trace_calc.js:1
src/traces/indicator/plot.js has 774 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/indicator/plot.js:1
src/plots/ternary/ternary.js has 771 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/ternary/ternary.js:1
src/components/modebar/buttons.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/modebar/buttons.js:1
src/plots/map/map.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. — src/plots/map/map.js:1
src/traces/table/plot.js has 742 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/table/plot.js:1
src/plot_api/subroutines.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. — src/plot_api/subroutines.js:1
src/components/drawing/symbol_defs.js has 728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/drawing/symbol_defs.js:1
src/plots/geo/geo.js has 708 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/geo/geo.js:1
src/traces/scatter/attributes.js has 670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/scatter/attributes.js:1
src/components/annotations/draw.js has 660 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/annotations/draw.js:1
src/components/shapes/draw.js has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/shapes/draw.js:1
src/traces/parcoords/parcoords.js has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/parcoords/parcoords.js:1
src/components/legend/style.js has 639 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/components/legend/style.js:1
src/traces/scattergl/convert.js has 635 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/scattergl/convert.js:1
src/plots/cartesian/autorange.js has 631 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/autorange.js:1
src/plots/cartesian/index.js has 625 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/plots/cartesian/index.js:1
src/traces/parcoords/lines.js has 600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/parcoords/lines.js:1
src/traces/surface/convert.js has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/traces/surface/convert.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.4 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — tasks/generate_schema_types.mjs:1, REDACTED:1, tasks/sync_packages.js:1, …
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 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code7.8 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 132 application, 18 tooling and 184 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (132 application, 18 tooling, 184 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 (×36) — REDACTED, tasks/shard_jasmine_tests.js, lib/locales/fr.js, …
no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/traces/scattergl/plot_strict.js, src/traces/scatterpolargl/plot_strict.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 — src/traces/scattergl/regl_precompiled.js
no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/traces/scatterpolargl/plot_strict.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 — src/traces/scatterpolargl/regl_precompiled.js
no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/traces/splom/base_plot_strict.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 — src/traces/splom/regl_precompiled.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.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — devtools/regl_codegen/server.mjs:5, test/image/compare_pixels_test.mjs:5
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Declared in stackgl_modules/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. (×22)
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.
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.) — devtools/regl_codegen/server.mjs:67
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 · 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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
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 unescaped3.5 / 10Weak✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`trace` 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. — devtools/regl_codegen/devtools.js:99
`mock.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devtools/regl_codegen/devtools.js:104
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.
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.
`.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. — REDACTED:439
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. — REDACTED:581
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 strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 1 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 — 62 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) 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: "> plotly.js@4.3.0 start / > node devtools/test_dashboard/server.mjs / ➜ Local: http://localhost:3000/REDACTED / watching esbuild... / build/test_dashboard-bundle.js 958.9kb / build/test_dashboard-bundle.css 83.8kb / ⚡ Done in 175ms / [watch] build finished, watching for changes..." 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 scored — the plain-node test harness runs every file in one process
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — N/A — too few peers to establish a naming convention (8578 declarations, no unit with a dominant convention).
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
D28 Secrets (history) — gitleaks killed before it finished — this repository's git history 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) — 19 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D4 Code Duplication — This repository's production source (.js, .mjs, .ts) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
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.
D5 Coupling — Not applicable — this npm build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D6 Cohesion (LCOM4) — No production classes were analyzable, so cohesion (LCOM4) was not measured (the solution likely failed to load or has no production code).
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — JavaScript/TypeScript suite
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check 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
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — Not applicable: 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. 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 — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
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
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Unlisted import 'minimist' devtools/regl_codegen/server.mjs:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'pngjs' test/image/compare_pixels_test.mjs:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
No assertions: rejects if a frame is not found test/jasmine/tests/animate_test.js:183— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: null frames should not break everything test/jasmine/tests/animate_test.js:701— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should bypass non-string id when matching ids test/jasmine/tests/axes_test.js:8478— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should use hovertemplate if specified test/jasmine/tests/bar_test.js:2562— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should allow both x/y tokens and label/value tokens test/jasmine/tests/bar_test.js:2590— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should provide a default label for base in hovertemplate test/jasmine/tests/bar_test.js:2633— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for bar fill color test/jasmine/tests/bar_test.js:2975— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for vertical bar height and text position test/jasmine/tests/bar_test.js:2988— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for vertical bar width test/jasmine/tests/bar_test.js:3005— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for horizontal bar length and text position test/jasmine/tests/bar_test.js:3022— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for bar line width and color test/jasmine/tests/bar_test.js:3043— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for error bars test/jasmine/tests/bar_test.js:3062— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: for bar positions during object-constancy transitions test/jasmine/tests/bar_test.js:3080— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: blank vertical bars test/jasmine/tests/bar_test.js:3120— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: blank horizontal bars test/jasmine/tests/bar_test.js:3149— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: handle BADNUM positions on vertical bars test/jasmine/tests/bar_test.js:3179— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: handle NaN positions on horizontal bars test/jasmine/tests/bar_test.js:3218— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate correct hover labels test/jasmine/tests/box_test.js:1066— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should respond to relayout properly test/jasmine/tests/carpet_test.js:570— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label (base) test/jasmine/tests/carpet_test.js:715— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label (with hovertext array) test/jasmine/tests/carpet_test.js:725— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label with 'hoverinfo' set test/jasmine/tests/carpet_test.js:737— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label with arrayOk 'hoverinfo' settings test/jasmine/tests/carpet_test.js:748— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label with *hovertemplate* test/jasmine/tests/carpet_test.js:759— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should generate hover label with arrayOk *hovertemplate* test/jasmine/tests/carpet_test.js:770— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
FunctionTooLong: dragbox.makeDragBox src/plots/cartesian/dragbox.js:49— FunctionTooLong — makeDragBox runs 615 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 515 over it, 6.15× 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: convert.generateIsoMeshes src/traces/isosurface/convert.js:127— FunctionTooLong — generateIsoMeshes runs 598 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 498 over it, 5.98× 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: set_convert.setConvert src/plots/cartesian/set_convert.js:78— FunctionTooLong — setConvert runs 569 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 469 over it, 5.69× 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: hover.createHoverText src/components/fx/hover.js:1109— FunctionTooLong — createHoverText runs 535 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 435 over it, 5.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: hover._hover src/components/fx/hover.js:292— FunctionTooLong — _hover runs 463 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 363 over it, 4.63× 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: draw.drawColorBar src/components/colorbar/draw.js:175— FunctionTooLong — drawColorBar runs 451 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 351 over it, 4.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: draw.drawRaw src/components/annotations/draw.js:105— FunctionTooLong — drawRaw runs 426 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 326 over it, 4.26× 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: plot.default src/traces/heatmap/plot.js:30— FunctionTooLong — default runs 362 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 262 over it, 3.62× 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: axes.axes.drawLabels src/plots/cartesian/axes.js:3758— FunctionTooLong — axes.drawLabels runs 330 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 230 over it, 3.30× 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: plot.plot src/traces/bar/plot.js:91— FunctionTooLong — plot runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: select.prepSelect src/components/selections/select.js:58— FunctionTooLong — prepSelect runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× 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: plot.plotOne src/traces/scatter/plot.js:113— FunctionTooLong — plotOne runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× 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: draw.drawOne src/components/legend/draw.js:82— FunctionTooLong — drawOne runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× 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: draw.setupDragElement src/components/shapes/draw.js:286— FunctionTooLong — setupDragElement runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: plot.plotOne src/traces/sunburst/plot.js:85— FunctionTooLong — plotOne runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.drawing.pattern src/components/drawing/index.js:548— FunctionTooLong — drawing.pattern runs 261 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: axes.axes.drawOne src/plots/cartesian/axes.js:2649— FunctionTooLong — axes.drawOne runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: parcoords.parcoords src/traces/parcoords/parcoords.js:440— FunctionTooLong — parcoords runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: layout_defaults.supplyLayoutDefaults src/plots/cartesian/layout_defaults.js:31— FunctionTooLong — supplyLayoutDefaults runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.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: polar.proto.updateHoverAndMainDrag src/plots/polar/polar.js:794— FunctionTooLong — proto.updateHoverAndMainDrag runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.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: lines.default src/traces/parcoords/lines.js:373— FunctionTooLong — default 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: plot.plot src/traces/pie/plot.js:22— FunctionTooLong — plot runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: plot.plot src/traces/sankey/plot.js:134— FunctionTooLong — plot runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: render.sankeyModel src/traces/sankey/render.js:30— FunctionTooLong — sankeyModel runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× 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: plot.drawNumbers src/traces/indicator/plot.js:518— FunctionTooLong — drawNumbers runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.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.
+ 49 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file tasks/generate_schema_types.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/sync_packages.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/test_syntax.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/test_mock.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/stats.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file devtools/regl_codegen/devtools.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file devtools/regl_codegen/server.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/find_locale_strings.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/bundle.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/shard_jasmine_tests.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/custom_bundle.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/use_draftlogs.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/partial_bundle.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/schema.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/preprocess.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/util/bundle_wrapper.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file lib/index-strict.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/util/pull_css.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/extra_bundles.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/compress_attributes.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/test_bundle.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/util/wrap_locale.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file tasks/cibundle.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
FileTooLong: cartesian/axes.js src/plots/cartesian/axes.js— FileTooLong — 2701 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 2201 over it, 5.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1981 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 1481 over it, 3.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: fx/hover.js src/components/fx/hover.js— FileTooLong — 1750 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 1250 over it, 3.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: plots/plots.js src/plots/plots.js— FileTooLong — 1663 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 1163 over it, 3.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: styles/arcgis-sat-hybrid.js src/plots/map/styles/arcgis-sat-hybrid.js— FileTooLong — 1577 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 77 over it, 1.05× 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: drawing/index.js src/components/drawing/index.js— FileTooLong — 1255 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 755 over it, 2.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cartesian/layout_attributes.js src/plots/cartesian/layout_attributes.js— FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 582 over it, 2.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: polar/polar.js src/plots/polar/polar.js— FileTooLong — 1052 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 552 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: parcats/parcats.js src/traces/parcats/parcats.js— FileTooLong — 1047 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 547 over it, 2.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: selections/select.js src/components/selections/select.js— FileTooLong — 998 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 498 over it, 2.00× 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: cartesian/dragbox.js src/plots/cartesian/dragbox.js— FileTooLong — 862 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 71% of them inside a single declaration: makeDragBox (49-1045). The bar is 500 significant lines; this is 362 over it, 1.72× 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: pie/plot.js src/traces/pie/plot.js— FileTooLong — 856 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 356 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: bar/plot.js src/traces/bar/plot.js— FileTooLong — 838 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 338 over it, 1.68× 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: sankey/render.js src/traces/sankey/render.js— FileTooLong — 808 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 308 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: legend/draw.js src/components/legend/draw.js— FileTooLong — 769 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 269 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: tasks/generate_schema_types.mjs tasks/generate_schema_types.mjs— FileTooLong — 750 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 250 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: gl3d/scene.js src/plots/gl3d/scene.js— FileTooLong — 735 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 235 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: isosurface/convert.js src/traces/isosurface/convert.js— FileTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: generateIsoMeshes (127-1030). The bar is 500 significant lines; this is 196 over it, 1.39× 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: colorbar/draw.js src/components/colorbar/draw.js— FileTooLong — 684 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 66% of them inside a single declaration: drawColorBar (175-854). The bar is 500 significant lines; this is 184 over it, 1.37× 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: lib/index.js src/lib/index.js— FileTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 176 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: ternary/ternary.js src/plots/ternary/ternary.js— FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 134 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: indicator/plot.js src/traces/indicator/plot.js— FileTooLong — 622 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 122 over it, 1.24× 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: cartesian/set_convert.js src/plots/cartesian/set_convert.js— FileTooLong — 602 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 102 over it, 1.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 598 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 98 over it, 1.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: drawing/symbol_defs.js src/components/drawing/symbol_defs.js— FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: sin (23-712). The bar is 500 significant lines; this is 97 over it, 1.19× 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.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:6— src/components/calendars/calendars.js:6 imports world-calendars/dist/main, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:8— src/components/calendars/calendars.js:8 imports world-calendars/dist/plus, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:10— src/components/calendars/calendars.js:10 imports world-calendars/dist/calendars/chinese, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:11— src/components/calendars/calendars.js:11 imports world-calendars/dist/calendars/coptic, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:12— src/components/calendars/calendars.js:12 imports world-calendars/dist/calendars/discworld, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:13— src/components/calendars/calendars.js:13 imports world-calendars/dist/calendars/ethiopian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:14— src/components/calendars/calendars.js:14 imports world-calendars/dist/calendars/hebrew, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:15— src/components/calendars/calendars.js:15 imports world-calendars/dist/calendars/islamic, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:16— src/components/calendars/calendars.js:16 imports world-calendars/dist/calendars/julian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:17— src/components/calendars/calendars.js:17 imports world-calendars/dist/calendars/mayan, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:18— src/components/calendars/calendars.js:18 imports world-calendars/dist/calendars/nanakshahi, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:19— src/components/calendars/calendars.js:19 imports world-calendars/dist/calendars/nepali, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:20— src/components/calendars/calendars.js:20 imports world-calendars/dist/calendars/persian, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:21— src/components/calendars/calendars.js:21 imports world-calendars/dist/calendars/taiwan, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:22— src/components/calendars/calendars.js:22 imports world-calendars/dist/calendars/thai, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/components/calendars/calendars.js:23— src/components/calendars/calendars.js:23 imports world-calendars/dist/calendars/ummalqura, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] src/plots/map/map.js:4— src/plots/map/map.js:4 imports maplibre-gl/dist/maplibre-gl.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:10— REDACTED:10 imports world-calendars/dist/regional/en-GB, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] tasks/util/constants.js:201— tasks/util/constants.js:201 imports maplibre-gl/dist/maplibre-gl-worker.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Hotspot: src/components/fx/hover.js src/components/fx/hover.js:292— src/components/fx/hover.js changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 201 in hover._hover at line 292. 2 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/components/fx/hover.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: src/plots/cartesian/axes.js src/plots/cartesian/axes.js:997— src/plots/cartesian/axes.js changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in axes.axes.calcTicks at line 997. 4 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/plots/cartesian/axes.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: src/plots/cartesian/set_convert.js src/plots/cartesian/set_convert.js:78— src/plots/cartesian/set_convert.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 234 in set_convert.setConvert at line 78. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/plots/cartesian/set_convert.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:59— REDACTED changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in plot_api._doPlot at line 59. 4 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06: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: src/components/legend/style.js src/components/legend/style.js:24— src/components/legend/style.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 128 in style.style at line 24. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/components/legend/style.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: tasks/generate_schema_types.mjs tasks/generate_schema_types.mjs:1135— tasks/generate_schema_types.mjs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in generate_schema_types.generateSchemaTypes at line 1135. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- tasks/generate_schema_types.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: src/traces/quiver/calc.js src/traces/quiver/calc.js:15— src/traces/quiver/calc.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in calc.calc at line 15. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/traces/quiver/calc.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: src/components/modebar/manage.js src/components/modebar/manage.js:64— src/components/modebar/manage.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in manage.getButtonGroups at line 64. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/components/modebar/manage.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:119— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in svg_text_utils.convertToTspans at line 119. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06: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: src/plots/ternary/ternary.js src/plots/ternary/ternary.js:174— src/plots/ternary/ternary.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ternary.proto.drawSpikelines at line 174. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/plots/ternary/ternary.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: src/traces/splom/plot.js src/traces/splom/plot.js:17— src/traces/splom/plot.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in plot.plotOne at line 17. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/traces/splom/plot.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: src/traces/quiver/plot.js src/traces/quiver/plot.js:78— src/traces/quiver/plot.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in plot.plotOne at line 78. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/traces/quiver/plot.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: src/components/rangeslider/draw.js src/components/rangeslider/draw.js:22— src/components/rangeslider/draw.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in draw.default at line 22. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 15:39:07 -06:00' --until='2026-11-10 15:39:07 -06:00' --full-history --no-merges -- src/components/rangeslider/draw.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.
setConvert::maskBreaks (cognitive 51) src/plots/cartesian/set_convert.js:678— setConvert::maskBreaks has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (39 pts), loops 2 (5 pts), match/switch 1 (4 pts), boolean chains 3 (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.
setConvert::_cleanRange (cognitive 45) src/plots/cartesian/set_convert.js:499— setConvert::_cleanRange has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 6, ternaries 1 (5 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setConvert::setScale (cognitive 39) src/plots/cartesian/set_convert.js:572— setConvert::setScale has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 6 (12 pts), loops 3 (9 pts), boolean chains 4 (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.
setConvert::setupMultiCategory (cognitive 38) src/plots/cartesian/set_convert.js:375— setConvert::setupMultiCategory has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
setConvert::locateBreaks (cognitive 38) src/plots/cartesian/set_convert.js:760— setConvert::locateBreaks has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 3 (14 pts), if/else 5 (11 pts), loops 3 (9 pts), match/switch 1 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setConvert::makeCalcdata (cognitive 26) src/plots/cartesian/set_convert.js:885— setConvert::makeCalcdata has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), boolean chains 5, 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.
setConvert::limitRange (cognitive 25) src/plots/cartesian/set_convert.js:450— setConvert::limitRange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (10 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.
setConvert::ab2xy (cognitive 16) src/traces/carpet/set_convert.js:128— setConvert::ab2xy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), 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.
Dead file (~23 LoC) lib/index-cartesian.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/af.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/az.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/bs.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/ca.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/de-ch.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/es-pe.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~23 LoC) lib/locales/et.js— no import path from any entry point (132 application, 18 tooling, 184 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
setConvert::_cleanRange (cyclomatic 25) src/plots/cartesian/set_convert.js:499— setConvert::_cleanRange 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.
setConvert::setScale (cyclomatic 23) src/plots/cartesian/set_convert.js:572— setConvert::setScale 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.
setConvert::maskBreaks (cyclomatic 19) src/plots/cartesian/set_convert.js:678— setConvert::maskBreaks 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.
setConvert::limitRange (cyclomatic 17) src/plots/cartesian/set_convert.js:450— setConvert::limitRange 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.
setConvert::makeCalcdata (cyclomatic 17) src/plots/cartesian/set_convert.js:885— setConvert::makeCalcdata 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.
setConvert::setupMultiCategory (cyclomatic 16) src/plots/cartesian/set_convert.js:375— setConvert::setupMultiCategory 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.
dragbox.makeDragBox::plotDrag (cyclomatic 49) src/plots/cartesian/dragbox.js:557— dragbox.makeDragBox::plotDrag has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dragbox.makeDragBox::clickFn, dragbox.makeDragBox::zoomMove, dragbox.makeDragBox::doubleClick, …) 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.
dragbox.makeDragBox::updateSubplots (cyclomatic 49) src/plots/cartesian/dragbox.js:878— dragbox.makeDragBox::updateSubplots has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dragbox.makeDragBox::clickFn, dragbox.makeDragBox::zoomMove, dragbox.makeDragBox::plotDrag, …) 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.
dragbox.makeDragBox::doubleClick (cyclomatic 33) src/plots/cartesian/dragbox.js:770— dragbox.makeDragBox::doubleClick 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: 4 other methods here (dragbox.makeDragBox::clickFn, dragbox.makeDragBox::zoomMove, dragbox.makeDragBox::plotDrag, …) 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.
dragbox.makeDragBox::clickFn (cyclomatic 19) src/plots/cartesian/dragbox.js:247— dragbox.makeDragBox::clickFn 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: 4 other methods here (dragbox.makeDragBox::zoomMove, dragbox.makeDragBox::plotDrag, dragbox.makeDragBox::doubleClick, …) 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.
dragbox.makeDragBox::zoomMove (cyclomatic 18) src/plots/cartesian/dragbox.js:347— dragbox.makeDragBox::zoomMove has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (dragbox.makeDragBox::clickFn, dragbox.makeDragBox::plotDrag, dragbox.makeDragBox::doubleClick, …) 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.
Change coupling: hover.js ↔ hoverlabel_defaults.js src/components/fx/hover.js:1— `src/components/fx/hover.js` and `src/components/fx/hoverlabel_defaults.js` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `e746867a` implement layout.showarrow attribute; `2f8b4ede` hover effects; `c62e6327` move grouptitlefont inside legend object — run `git show` on any of them.
Change coupling: hover.js ↔ layout_defaults.js src/components/fx/hover.js:1— `src/components/fx/hover.js` and `src/components/fx/layout_defaults.js` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `ce0683c0` Remove references to Mapbox; `e5db8abb` Add hoversort layout attribute for sorting unified hover label items …; `0efeb15d` bring back mapbox in various places — run `git show` on any of them.
Change coupling: tick_label_defaults.js ↔ axis_defaults.js src/plots/cartesian/tick_label_defaults.js:1— `src/plots/cartesian/tick_label_defaults.js` and `src/plots/gl3d/layout/axis_defaults.js` change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `6a1750ab` draftlog; `ba2fa76b` add minorloglabels options; `ec5df56d` Rename ticklabelrunoff → ticklabelshift — run `git show` on any of them.
Change coupling: defaults.js ↔ render.js src/traces/sankey/defaults.js:1— `src/traces/sankey/defaults.js` and `src/traces/sankey/render.js` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c87fa57e` Update color function call sites; `542c55e4` Introduce `direction` attribute instead of more parameters for `orien…; `0885901b` Add link sort attribute — run `git show` on any of them.
Change coupling: axes.js ↔ axis_defaults.js src/plots/cartesian/axes.js:1— `src/plots/cartesian/axes.js` and `src/plots/gl3d/layout/axis_defaults.js` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `ba2fa76b` add minorloglabels options; `0019cb04` Rename drawminorticklabel → ticklabelindex; `ec5df56d` Rename ticklabelrunoff → ticklabelshift — run `git show` on any of them.
Dead file (~83 LoC) lib/locales/de.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~83 LoC) lib/locales/es.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~83 LoC) lib/locales/fi.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~83 LoC) lib/locales/no.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~83 LoC) lib/locales/pt-pt.js— no import path from any entry point (132 application, 18 tooling, 184 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
makeDragBox::updateSubplots (cognitive 96) src/plots/cartesian/dragbox.js:878— makeDragBox::updateSubplots has cognitive complexity 96 (threshold 15). Drivers by points: if/else 21 (45 pts), ternaries 8 (32 pts), boolean chains 15, loops 2 (4 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
makeDragBox::plotDrag (cognitive 66) src/plots/cartesian/dragbox.js:557— makeDragBox::plotDrag has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 14, ternaries 7 (13 pts), loops 2 (6 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.
makeDragBox::clickFn (cognitive 31) src/plots/cartesian/dragbox.js:247— makeDragBox::clickFn has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (10 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
makeDragBox::prepFn (cognitive 26) src/plots/cartesian/dragbox.js:155— makeDragBox::prepFn has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (26 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.
Duplicated block (27 lines × 2 locations) src/components/updatemenus/scrollbox.js:146— src/components/updatemenus/scrollbox.js:146 · src/components/updatemenus/scrollbox.js:186 — 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 (27 lines × 2 locations) REDACTED:909— REDACTED:909 · REDACTED:981 — 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 (27 lines × 2 locations) src/traces/cone/defaults.js:8— src/traces/cone/defaults.js:8 · src/traces/streamtube/defaults.js:8 — 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 (27 lines × 2 locations) src/traces/quiver/plot.js:45— src/traces/quiver/plot.js:45 · src/traces/scatter/plot.js:38 — 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 (25 lines × 2 locations) src/components/drawing/index.js:592— src/components/drawing/index.js:592 · src/components/drawing/index.js:659 — 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 (25 lines × 2 locations) src/components/fx/hover.js:1538— src/components/fx/hover.js:1538 · src/components/fx/hover.js:1567 — 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 (25 lines × 2 locations) src/traces/cone/attributes.js:148— src/traces/cone/attributes.js:148 · src/traces/streamtube/attributes.js:120 — 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 (25 lines × 2 locations) src/traces/scatterpolar/attributes.js:76— src/traces/scatterpolar/attributes.js:76 · src/traces/scattersmith/attributes.js:32 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Dead file (~86 LoC) lib/locales/it.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~86 LoC) lib/locales/ro.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~86 LoC) lib/locales/ru.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~86 LoC) lib/locales/uk.js— no import path from any entry point (132 application, 18 tooling, 184 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
draw.drawColorBar::positionCB (cyclomatic 56) src/components/colorbar/draw.js:604— draw.drawColorBar::positionCB 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: 3 other methods here (draw.drawColorBar, draw.drawColorBar::drawCbTitle, draw.drawColorBar::drawAxis) 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.
draw.drawColorBar::drawAxis (cyclomatic 22) src/components/colorbar/draw.js:436— draw.drawColorBar::drawAxis 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: 3 other methods here (draw.drawColorBar, draw.drawColorBar::drawCbTitle, draw.drawColorBar::positionCB) 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.
draw.drawColorBar::drawCbTitle (cyclomatic 18) src/components/colorbar/draw.js:381— draw.drawColorBar::drawCbTitle has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (draw.drawColorBar, draw.drawColorBar::drawAxis, draw.drawColorBar::positionCB) 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.
calc.calc (cyclomatic 18) src/components/colorscale/calc.js:8— calc.calc 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.
calc.calc (cyclomatic 18) src/traces/splom/calc.js:16— calc.calc 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.
calc.calc (cyclomatic 18) src/traces/parcats/calc.js:21— calc.calc 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.
defaults.supplyDefaults (cyclomatic 17) src/traces/scatter3d/defaults.js:13— defaults.supplyDefaults 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.
defaults.supplyDefaults (cyclomatic 17) src/traces/scattermap/defaults.js:13— defaults.supplyDefaults 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.
defaults.supplyDefaults (cyclomatic 17) src/traces/treemap/defaults.js:15— defaults.supplyDefaults 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.
drawColorBar::positionCB (cognitive 75) src/components/colorbar/draw.js:604— drawColorBar::positionCB has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (33 pts), ternaries 24 (30 pts), boolean chains 12 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
drawColorBar::drawAxis (cognitive 38) src/components/colorbar/draw.js:436— drawColorBar::drawAxis has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 6, ternaries 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.
drawColorBar::drawCbTitle (cognitive 36) src/components/colorbar/draw.js:381— drawColorBar::drawCbTitle has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 5 (10 pts), boolean chains 5 (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.
linePoints::addPt (cognitive 49) src/traces/scatter/line_points.js:284— linePoints::addPt has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 14, ternaries 5 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
linePoints::getPt (cognitive 22) src/traces/scatter/line_points.js:62— linePoints::getPt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (8 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.
linePoints::updateEdge (cognitive 22) src/traces/scatter/line_points.js:250— linePoints::updateEdge has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7 (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.
plotOne::toMoveInsideSlice (cognitive 35) src/traces/treemap/plot_one.js:259— plotOne::toMoveInsideSlice has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 8 (14 pts), boolean chains 7 (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.
plotOne::makePoints (cognitive 19) src/traces/scatter/plot.js:488— plotOne::makePoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 1 (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.
plotOne::makeUpdateSliceInterpolator (cognitive 19) src/traces/sunburst/plot.js:370— plotOne::makeUpdateSliceInterpolator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (5 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Outbound HTTP without resilience devtools/regl_codegen/devtools.js:144— `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 devtools/regl_codegen/devtools.js:155— `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 src/lib/geo_location_utils.js:391— `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.
Dead file (~87 LoC) lib/locales/fr.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~87 LoC) lib/locales/si.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~87 LoC) lib/locales/zh-tw.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~80 LoC) lib/locales/cy.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~80 LoC) lib/locales/ja.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~80 LoC) lib/locales/tr.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~25 LoC) src/traces/scattergl/regl_precompiled.js— no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/traces/scattergl/plot_strict.js, src/traces/scatterpolargl/plot_strict.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 (~25 LoC) src/traces/scatterpolargl/regl_precompiled.js— no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/traces/scatterpolargl/plot_strict.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 (~25 LoC) src/traces/splom/regl_precompiled.js— no import path from any entry point (132 application, 18 tooling, 184 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/traces/splom/base_plot_strict.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
defaults.supplyDefaults (cyclomatic 20) src/traces/pie/defaults.js:52— defaults.supplyDefaults 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.
defaults.supplyDefaults (cyclomatic 20) src/traces/scatterternary/defaults.js:15— defaults.supplyDefaults 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.
drawRaw::drawGraphicalElements (cognitive 98) src/components/annotations/draw.js:261— drawRaw::drawGraphicalElements has cognitive complexity 98 (threshold 15). Drivers by points: if/else 30 (63 pts), ternaries 11 (27 pts), boolean chains 7, loops 1 (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.
drawRaw::drawGraphicalElements::moveFn (cognitive 24) src/components/annotations/draw.js:661— drawRaw::drawGraphicalElements::moveFn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 2 (6 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.
setupDragElement::resizeShape (cognitive 73) src/components/shapes/draw.js:543— setupDragElement::resizeShape has cognitive complexity 73 (threshold 15). Drivers by points: ternaries 14 (38 pts), if/else 16 (30 pts), boolean chains 5 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setupDragElement::startDrag (cognitive 21) src/components/shapes/draw.js:424— setupDragElement::startDrag has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, ternaries 5 (9 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
dragbox.makeDragBox::doubleClick (cognitive 50) src/plots/cartesian/dragbox.js:770— dragbox.makeDragBox::doubleClick has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (dragbox.makeDragBox::zoomMove) 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.
dragbox.makeDragBox::zoomMove (cognitive 35) src/plots/cartesian/dragbox.js:347— dragbox.makeDragBox::zoomMove has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (dragbox.makeDragBox::doubleClick) 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.
display_outlines.displayOutlines::addVertexControllers (cognitive 34) src/components/shapes/display_outlines.js:217— display_outlines.displayOutlines::addVertexControllers has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 4 (15 pts), if/else 5 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (display_outlines.displayOutlines::moveVertexController) 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.
display_outlines.displayOutlines::moveVertexController (cognitive 29) src/components/shapes/display_outlines.js:115— display_outlines.displayOutlines::moveVertexController has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (display_outlines.displayOutlines::addVertexControllers) 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.
calc.calc (cognitive 32) src/traces/pie/calc.js:9— calc.calc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc.calc (cognitive 32) src/traces/parcats/calc.js:21— calc.calc has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 5 (8 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 18 points are the body's own statements and 14 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.
createHoverText::(anonymous)::positionCommonLabel (cognitive 30) src/components/fx/hover.js:1250— createHoverText::(anonymous)::positionCommonLabel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 5 (10 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.
createHoverText::(anonymous)::finalizePosition (cognitive 24) src/components/fx/hover.js:1758— createHoverText::(anonymous)::finalizePosition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.draw::scootTitle (cognitive 21) src/components/titles/index.js:267— index.draw::scootTitle has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 2 (5 pts), ternaries 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. This shape REPEATS in the file: one other method here (index.draw::drawTitle) 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.
index.draw::drawTitle (cognitive 17) src/components/titles/index.js:178— index.draw::drawTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (4 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 (index.draw::scootTitle) 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.
defaults.supplyDefaults (cognitive 21) src/traces/box/defaults.js:11— defaults.supplyDefaults has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.supplyDefaults (cognitive 21) src/traces/pie/defaults.js:52— defaults.supplyDefaults has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, 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.
cross_trace_defaults.crossTraceDefaults::fillBinOpts (cognitive 19) src/traces/histogram/cross_trace_defaults.js:45— cross_trace_defaults.crossTraceDefaults::fillBinOpts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (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. This shape REPEATS in the file: one other method here (cross_trace_defaults.crossTraceDefaults) 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.
cross_trace_defaults.crossTraceDefaults::relinkColorAttrs (cognitive 16) src/components/colorscale/cross_trace_defaults.js:15— cross_trace_defaults.crossTraceDefaults::relinkColorAttrs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IC1 · Incompleteness & stubs· Both branches are identical · ×2
Both branches are identical — the condition decides nothing src/components/sliders/draw.js:534— 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 src/traces/quiver/calc.js:200— 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.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×2
Duplicated block with local edits (38 matched lines × 2 locations) src/traces/funnel/cross_trace_calc.js:5— src/traces/funnel/cross_trace_calc.js:5 · src/traces/waterfall/cross_trace_calc.js:5 — the two spans are one implementation copied and then locally edited — 259 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 (38 matched lines × 2 locations) src/traces/treemap/draw_ancestors.js:101— src/traces/treemap/draw_ancestors.js:101 · src/traces/treemap/draw_descendants.js:138 — the two spans are one implementation copied and then locally edited — 315 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 (30 lines × 2 locations) src/components/grid/index.js:311— src/components/grid/index.js:311 · src/components/grid/index.js:341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (30 lines × 2 locations) src/traces/scattersmith/defaults.js:34— src/traces/scattersmith/defaults.js:34 · src/traces/scatterternary/defaults.js:60 — 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 (24 lines × 2 locations) src/components/legend/style.js:471— src/components/legend/style.js:471 · src/components/legend/style.js:501 — 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 (24 lines × 2 locations) src/components/shapes/draw.js:496— src/components/shapes/draw.js:496 · src/components/shapes/draw.js:544 — 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.
Dead file (~82 LoC) lib/locales/cs.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~82 LoC) lib/locales/sk.js— no import path from any entry point (132 application, 18 tooling, 184 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
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×2
Untrusted text written into markup unescaped devtools/regl_codegen/devtools.js:99— `trace` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devtools/regl_codegen/devtools.js:104— `mock.name` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Swallowed exception (empty catch) REDACTED:439— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) REDACTED:581— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
No authorization devtools/regl_codegen/server.mjs:33— This repository serves requests — a node:http server routing 2 path(s) by hand (devtools/regl_codegen/server.mjs:33) — 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.
set_convert.setConvert (cyclomatic 234) src/plots/cartesian/set_convert.js:78— set_convert.setConvert has cyclomatic complexity 234 (threshold 15). Of this number, 63 points are the body's own statements and 171 belong to 33 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.
convert.generateIsoMeshes (cyclomatic 179) src/traces/isosurface/convert.js:127— convert.generateIsoMeshes has cyclomatic complexity 179 (threshold 15). Most of this is not in the body itself: 1 of the 179 points is its own statement and the rest belongs to 36 function items inside it that branch (a function literal at line 926, addCube, tryCreateTetra, …). 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.
hover.createHoverText (cyclomatic 147) src/components/fx/hover.js:1109— hover.createHoverText has cyclomatic complexity 147 (threshold 15). Of this number, 65 points are the body's own statements and 82 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
style.style (cyclomatic 128) src/components/legend/style.js:24— style.style has cyclomatic complexity 128 (threshold 15). Most of this is not in the body itself: 2 of the 128 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 370, styleLines, stylePoints, …). 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.
plot.default (cyclomatic 117) src/traces/heatmap/plot.js:30— plot.default has cyclomatic complexity 117 (threshold 15). Most of this is not in the body itself: 1 of the 117 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 34, 219, 540, …). 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.
exports (cyclomatic 117) src/traces/heatmap/plot.js:30— exports has cyclomatic complexity 117 (threshold 15). Most of this is not in the body itself: 1 of the 117 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 34, (anonymous)::interpColor, a function literal at line 540, …). 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.
plot (cyclomatic 110) src/traces/scattergl/plot.js:45— plot has cyclomatic complexity 110 (threshold 15). Of this number, 57 points are the body's own statements and 53 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.
axes.axes.calcTicks (cyclomatic 106) src/plots/cartesian/axes.js:997— axes.axes.calcTicks has cyclomatic complexity 106 (threshold 15). Of this number, 91 points are the body's own statements and 15 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hover._hover (cyclomatic 106) src/components/fx/hover.js:292— hover._hover has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent 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 (hover._hover::findHoverPoints) 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.
plot_api._relayout (cyclomatic 98) REDACTED:1892— plot_api._relayout has cyclomatic complexity 98 (threshold 15). Of this number, 93 points are the body's own statements and 5 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.
axes.axes.drawOne (cyclomatic 93) src/plots/cartesian/axes.js:2649— axes.axes.drawOne has cyclomatic complexity 93 (threshold 15). Of this number, 46 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.
select.prepSelect (cyclomatic 90) src/components/selections/select.js:58— select.prepSelect has cyclomatic complexity 90 (threshold 15). Of this number, 30 points are the body's own statements and 60 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
handle_click.handleItemClick (cyclomatic 80) src/components/legend/handle_click.js:22— handle_click.handleItemClick has cyclomatic complexity 80 (threshold 15). Of this number, 72 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.
draw.drawOne (cyclomatic 75) src/components/legend/draw.js:82— draw.drawOne has cyclomatic complexity 75 (threshold 15). Of this number, 24 points are the body's own statements and 51 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.
plot_api._restyle (cyclomatic 74) REDACTED:1420— plot_api._restyle has cyclomatic complexity 74 (threshold 15). Of this number, 65 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.
layout_defaults.supplyLayoutDefaults (cyclomatic 73) src/plots/cartesian/layout_defaults.js:31— layout_defaults.supplyLayoutDefaults has cyclomatic complexity 73 (threshold 15). Of this number, 64 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.
plot.plotOne (cyclomatic 69) src/traces/scatter/plot.js:113— plot.plotOne has cyclomatic complexity 69 (threshold 15). Of this number, 35 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.
plot.plot (cyclomatic 66) src/traces/bar/plot.js:91— plot.plot has cyclomatic complexity 66 (threshold 15). Most of this is not in the body itself: 2 of the 66 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 135, 109, 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.
axes.axes.makeLabelFns (cyclomatic 65) src/plots/cartesian/axes.js:3369— axes.axes.makeLabelFns has cyclomatic complexity 65 (threshold 15). Of this number, 52 points are the body's own statements and 13 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.
subroutines.lsInner (cyclomatic 65) src/plot_api/subroutines.js:48— subroutines.lsInner has cyclomatic complexity 65 (threshold 15). Of this number, 53 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot_api.getDiffFlags (cyclomatic 63) REDACTED:2915— plot_api.getDiffFlags has cyclomatic complexity 63 (threshold 15). Of this number, 54 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.
defaults.groupDefaults (cyclomatic 62) src/components/legend/defaults.js:12— defaults.groupDefaults has cyclomatic complexity 62 (threshold 15). Of this number, 46 points are the body's own statements and 16 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
calc.calc (cyclomatic 59) src/traces/box/calc.js:12— calc.calc has cyclomatic complexity 59 (threshold 15). Of this number, 57 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.
plot_api._doPlot (cyclomatic 59) REDACTED:59— plot_api._doPlot has cyclomatic complexity 59 (threshold 15). Of this number, 31 points are the body's own statements and 28 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.
index.drawing.singlePointStyle (cyclomatic 58) src/components/drawing/index.js:889— index.drawing.singlePointStyle has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hover._hover::findHoverPoints (cyclomatic 58) src/components/fx/hover.js:530— hover._hover::findHoverPoints has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (hover._hover) 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.
manage.getButtonGroups (cyclomatic 58) src/components/modebar/manage.js:64— manage.getButtonGroups has cyclomatic complexity 58 (threshold 15). Of this number, 40 points are the body's own statements and 18 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.
plot_api.animate (cyclomatic 57) REDACTED:3108— plot_api.animate has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 4 of the 57 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 3179, a function literal at line 3195, a function literal at line 3262, …). 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.
cross_trace_defaults.crossTraceDefaults (cyclomatic 57) src/traces/histogram/cross_trace_defaults.js:23— cross_trace_defaults.crossTraceDefaults has cyclomatic complexity 57 (threshold 15). Of this number, 46 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate.crawl (cyclomatic 55) REDACTED:108— validate.crawl has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
find_all_paths.makePath (cyclomatic 53) src/traces/contour/find_all_paths.js:47— find_all_paths.makePath has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plots.plots.supplyDefaults (cyclomatic 52) src/plots/plots.js:197— plots.plots.supplyDefaults has cyclomatic complexity 52 (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.
helpers.cleanData (cyclomatic 51) src/plot_api/helpers.js:169— helpers.cleanData has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
axes.axes.drawLabels (cyclomatic 50) src/plots/cartesian/axes.js:3758— axes.axes.drawLabels has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (axes.axes.drawLabels::fixLabelOverlaps) 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.
axis_defaults.handleAxisDefaults (cyclomatic 50) src/plots/cartesian/axis_defaults.js:42— axis_defaults.handleAxisDefaults has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot.plot (cyclomatic 49) src/traces/image/plot.js:11— plot.plot has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 2 of the 49 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 17, 91, 153, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
plots.sortAxisCategoriesByValue (cyclomatic 48) src/plots/plots.js:2802— plots.sortAxisCategoriesByValue has cyclomatic complexity 48 (threshold 15). Of this number, 35 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
layout_defaults.handleGeoDefaults (cyclomatic 48) src/plots/geo/layout_defaults.js:23— layout_defaults.handleGeoDefaults has cyclomatic complexity 48 (threshold 15). Of this number, 47 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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.proto.plot (cyclomatic 47) src/plots/gl3d/scene.js:558— scene.proto.plot 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.
calc.calcAllAutoBins (cyclomatic 47) src/traces/histogram/calc.js:242— calc.calcAllAutoBins has cyclomatic complexity 47 (threshold 15). Of this number, 42 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.
convert.proto.update (cyclomatic 47) src/traces/surface/convert.js:423— convert.proto.update 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.
defaults.handleSampleDefaults (cyclomatic 46) src/traces/box/defaults.js:73— defaults.handleSampleDefaults has cyclomatic complexity 46 (threshold 15). Of this number, 42 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.
generate_schema_types.generateSchemaTypes (cyclomatic 46) tasks/generate_schema_types.mjs:1135— generate_schema_types.generateSchemaTypes has cyclomatic complexity 46 (threshold 15). Of this number, 37 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.
get_legend_data.getLegendData (cyclomatic 45) src/components/legend/get_legend_data.js:7— get_legend_data.getLegendData has cyclomatic complexity 45 (threshold 15). Of this number, 35 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.
draw.computeLegendDimensions (cyclomatic 45) src/components/legend/draw.js:861— draw.computeLegendDimensions has cyclomatic complexity 45 (threshold 15). Of this number, 33 points are the body's own statements and 12 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
calc.calc (cyclomatic 44) src/traces/histogram/calc.js:18— calc.calc has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
helpers.cleanLayout (cyclomatic 44) src/plot_api/helpers.js:28— helpers.cleanLayout has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
line_points.linePoints (cyclomatic 44) src/traces/scatter/line_points.js:15— line_points.linePoints has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (line_points.linePoints::addPt) 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.
hover.calcHover (cyclomatic 44) src/traces/scattergl/hover.js:113— hover.calcHover 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.
hover.hoverPoints (cyclomatic 42) src/traces/scatter/hover.js:10— hover.hoverPoints has cyclomatic complexity 42 (threshold 15). Of this number, 22 points are the body's own statements and 20 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.
calc.calc (cyclomatic 42) src/traces/heatmap/calc.js:17— calc.calc has cyclomatic complexity 42 (threshold 15). Of this number, 39 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.
draw.drawRaw::drawGraphicalElements (cyclomatic 42) src/components/annotations/draw.js:261— draw.drawRaw::drawGraphicalElements has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot.appendBarText (cyclomatic 41) src/traces/bar/plot.js:531— plot.appendBarText has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
convert.proto.merge (cyclomatic 41) src/plots/gl3d/layout/convert.js:67— convert.proto.merge has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot_api.applyUIRevisions (cyclomatic 41) REDACTED:2462— plot_api.applyUIRevisions has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot_api.react (cyclomatic 41) REDACTED:2620— plot_api.react has cyclomatic complexity 41 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot.plotOne (cyclomatic 41) src/traces/sunburst/plot.js:85— plot.plotOne has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 12 function items inside it that branch (makeUpdateTextInterpolator, makeUpdateSliceInterpolator, a function literal at line 238, …). 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.
convert.convertLinePositions (cyclomatic 41) src/traces/scattergl/convert.js:500— convert.convertLinePositions has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
scene.proto.render (cyclomatic 40) src/plots/gl3d/scene.js:299— scene.proto.render has cyclomatic complexity 40 (threshold 15). Of this number, 39 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.
autorange.findExtremes (cyclomatic 39) src/plots/cartesian/autorange.js:450— autorange.findExtremes has cyclomatic complexity 39 (threshold 15). Of this number, 29 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.
axes.formatLog (cyclomatic 39) src/plots/cartesian/axes.js:2041— axes.formatLog 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.
calc.calc (cyclomatic 39) src/traces/histogram2d/calc.js:12— calc.calc 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.
constraints.handleDefaults (cyclomatic 38) src/plots/cartesian/constraints.js:14— constraints.handleDefaults has cyclomatic complexity 38 (threshold 15). Of this number, 35 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
select.reselect (cyclomatic 38) src/components/selections/select.js:1089— select.reselect has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.draw (cyclomatic 37) src/components/titles/index.js:52— index.draw 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: one other method here (index.draw::scootTitle) 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.
plot.drawNumbers (cyclomatic 37) src/traces/indicator/plot.js:518— plot.drawNumbers has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 13 function items inside it that branch (transitionFormat, drawDelta::deltaFormatText, a function literal at line 760, …). 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.
scene_update.sceneUpdate (cyclomatic 37) src/traces/scattergl/scene_update.js:6— scene_update.sceneUpdate has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 12 of the 37 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 66, 50, 110, …). 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.
parcoords.parcoords (cyclomatic 37) src/traces/parcoords/parcoords.js:440— parcoords.parcoords 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 12 function literals inside it that branch (lines 478, 555, 599, …). 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.
render.sankeyModel (cyclomatic 37) src/traces/sankey/render.js:30— render.sankeyModel has cyclomatic complexity 37 (threshold 15). Of this number, 17 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.
calc.calc (cyclomatic 37) src/traces/quiver/calc.js:15— calc.calc 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.
hover.loneHover (cyclomatic 36) src/components/fx/hover.js:127— hover.loneHover 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 2 function literals inside it that branch (lines 138, 241). 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.
hover.cleanPoint (cyclomatic 36) src/components/fx/hover.js:2335— hover.cleanPoint has cyclomatic complexity 36 (threshold 15). Of this number, 32 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.
helpers.readPaths (cyclomatic 36) src/components/shapes/draw_newshape/helpers.js:49— helpers.readPaths 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.
calc_gridlines.calcGridlines (cyclomatic 36) src/traces/carpet/calc_gridlines.js:6— calc_gridlines.calcGridlines has cyclomatic complexity 36 (threshold 15). Of this number, 26 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hover.hoverPoints (cyclomatic 36) src/traces/heatmap/hover.js:9— hover.hoverPoints 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.
calc.calc (cyclomatic 36) src/traces/sunburst/calc.js:18— calc.calc has cyclomatic complexity 36 (threshold 15). Of this number, 27 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.
defaults.handleAxisDefaults (cyclomatic 36) src/traces/splom/defaults.js:70— defaults.handleAxisDefaults has cyclomatic complexity 36 (threshold 15). Of this number, 28 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
keyed_container.keyedContainer (cyclomatic 35) src/lib/keyed_container.js:25— keyed_container.keyedContainer has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 51, 155, 118, …). 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.
hover.hoverOnBoxes (cyclomatic 35) src/traces/box/hover.js:40— hover.hoverOnBoxes 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.
fx.attachFxHandlers::onMouseOver (cyclomatic 35) src/traces/sunburst/fx.js:34— fx.attachFxHandlers::onMouseOver 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.
plot.plot (cyclomatic 35) src/traces/sankey/plot.js:134— plot.plot has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 8 function items inside it that branch (linkHoverFollow, linkHoverFollow::hoverCenterPosition, nodeHoverFollow, …). 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.
index.templateFormatString (cyclomatic 34) src/lib/index.js:1098— index.templateFormatString has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to one function literal inside it that branches (line 1099). 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.
axes.adjustPeriodDelta (cyclomatic 34) src/plots/cartesian/axes.js:795— axes.adjustPeriodDelta has cyclomatic complexity 34 (threshold 15). Of this number, 33 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.
axes.positionPeriodTicks (cyclomatic 34) src/plots/cartesian/axes.js:897— axes.positionPeriodTicks 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.
axes.axes.tickText (cyclomatic 34) src/plots/cartesian/axes.js:1835— axes.axes.tickText has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
index.dragElement.init (cyclomatic 34) src/components/dragelement/index.js:73— index.dragElement.init has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 5 function items inside it that branch (onDone, onStart, onMove, …). 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.
plot.attachFxHandlers (cyclomatic 34) src/traces/pie/plot.js:380— plot.attachFxHandlers has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 491, 511). 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.
prepSelect::moveFn (cyclomatic 34) src/components/selections/select.js:207— prepSelect::moveFn 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.
autorange.getAutoRange (cyclomatic 33) src/plots/cartesian/autorange.js:52— autorange.getAutoRange 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.
plots.plots.doAutoMargin (cyclomatic 33) src/plots/plots.js:1696— plots.plots.doAutoMargin 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.
hover.getHoverLabelText (cyclomatic 33) src/components/fx/hover.js:1850— hover.getHoverLabelText 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.
draw.setupDragElement::resizeShape (cyclomatic 33) src/components/shapes/draw.js:543— draw.setupDragElement::resizeShape 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.
polar.proto.updateHoverAndMainDrag (cyclomatic 33) src/plots/polar/polar.js:794— polar.proto.updateHoverAndMainDrag has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (clampAndSetR0R1, a function literal at line 1087, zoomClick, …). 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.
layout_defaults.handleDefaults (cyclomatic 33) src/plots/polar/layout_defaults.js:24— layout_defaults.handleDefaults 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.
cross_trace_calc.setPositionOffset (cyclomatic 33) src/traces/box/cross_trace_calc.js:41— cross_trace_calc.setPositionOffset 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.
manage_arrays.applyContainerArrayChanges (cyclomatic 33) src/plot_api/manage_arrays.js:67— manage_arrays.applyContainerArrayChanges 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.
line_points.linePoints::addPt (cyclomatic 33) src/traces/scatter/line_points.js:284— line_points.linePoints::addPt 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: one other method here (line_points.linePoints) 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.
defaults.handleShapeDefaults (cyclomatic 33) src/components/shapes/defaults.js:30— defaults.handleShapeDefaults has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 75, 110, 100). 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.
index.contentDefaults (cyclomatic 33) src/components/grid/index.js:242— index.contentDefaults 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.
calc.processGrid (cyclomatic 33) src/traces/streamtube/calc.js:82— calc.processGrid has cyclomatic complexity 33 (threshold 15). Of this number, 28 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.
constraints.handleOneAxDefaults (cyclomatic 32) src/plots/cartesian/constraints.js:180— constraints.handleOneAxDefaults 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.
axes.autoTickRound (cyclomatic 32) src/plots/cartesian/axes.js:1663— axes.autoTickRound 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.
newshapes.newShapes (cyclomatic 32) src/components/shapes/draw_newshape/newshapes.js:30— newshapes.newShapes 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.
template_api.validateTemplate (cyclomatic 32) src/plot_api/template_api.js:276— template_api.validateTemplate has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch (crawlForMissingTemplates, crawlLayoutForContainers, crawlLayoutTemplateForContainers). 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.
calc.calc (cyclomatic 32) src/traces/scatter/calc.js:15— calc.calc has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw.drawColorBar (cyclomatic 32) src/components/colorbar/draw.js:175— draw.drawColorBar has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (draw.drawColorBar::drawCbTitle, draw.drawColorBar::drawAxis, draw.drawColorBar::positionCB) 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.
plots.plots.graphJson (cyclomatic 31) src/plots/plots.js:1911— plots.plots.graphJson has cyclomatic complexity 31 (threshold 15). Of this number, 16 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.
axes.axes.prepMinorTicks (cyclomatic 31) src/plots/cartesian/axes.js:627— axes.axes.prepMinorTicks 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.
plot_api.addFrames (cyclomatic 31) REDACTED:3474— plot_api.addFrames has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot.plot (cyclomatic 31) src/components/errorbars/plot.js:9— plot.plot has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 63, 18). 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.
generate_schema_types.valTypeToTS (cyclomatic 31) tasks/generate_schema_types.mjs:379— generate_schema_types.valTypeToTS 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.
smoothFill2dArray (cyclomatic 31) src/traces/carpet/smooth_fill_2d_array.js:17— smoothFill2dArray has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
symbol_defs.align (cyclomatic 30) src/components/drawing/symbol_defs.js:721— symbol_defs.align has cyclomatic complexity 30 (threshold 15). Of this number, 29 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.
axes.numFormat (cyclomatic 30) src/plots/cartesian/axes.js:2265— axes.numFormat 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.
plot.plotBoxAndWhiskers (cyclomatic 30) src/traces/box/plot.js:47— plot.plotBoxAndWhiskers has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 83). 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.
ternary.proto.drawSpikelines (cyclomatic 30) src/plots/ternary/ternary.js:174— ternary.proto.drawSpikelines 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.
convert.convertTextStyle (cyclomatic 30) src/traces/scattergl/convert.js:108— convert.convertTextStyle 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.
convert.convertMarkerStyle (cyclomatic 30) src/traces/scattergl/convert.js:252— convert.convertMarkerStyle 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.
calc.calc (cyclomatic 30) src/traces/scattergl/calc.js:21— calc.calc 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.
axis_defaults.rangebreaksDefaults (cyclomatic 29) src/plots/cartesian/axis_defaults.js:228— axis_defaults.rangebreaksDefaults 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.
plot.joinAllPaths (cyclomatic 29) src/traces/contourcarpet/plot.js:353— plot.joinAllPaths has cyclomatic complexity 29 (threshold 15). Of this number, 22 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.
cross_trace_calc.crossTraceCalc (cyclomatic 29) src/traces/scatter/cross_trace_calc.js:46— cross_trace_calc.crossTraceCalc has cyclomatic complexity 29 (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.
plot.plot (cyclomatic 29) src/traces/pie/plot.js:22— plot.plot 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 6 function literals inside it that branch (lines 56, 168, 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.
plot.formatSliceLabel (cyclomatic 29) src/traces/sunburst/plot.js:529— plot.formatSliceLabel has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
parcoords.viewModel (cyclomatic 29) src/traces/parcoords/parcoords.js:214— parcoords.viewModel has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 234, 247, 329). 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.
convert.getTextFont (cyclomatic 29) src/traces/scattermap/convert.js:382— convert.getTextFont 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.
calc.convertToD3Sankey (cyclomatic 29) src/traces/sankey/calc.js:11— calc.convertToD3Sankey 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.
axes.axes.drawLabels::fixLabelOverlaps (cyclomatic 28) src/plots/cartesian/axes.js:4017— axes.axes.drawLabels::fixLabelOverlaps has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (axes.axes.drawLabels) 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.
range_defaults.handleRangeDefaults (cyclomatic 28) src/plots/cartesian/range_defaults.js:5— range_defaults.handleRangeDefaults has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
display_labels.drawLabel (cyclomatic 28) src/components/shapes/display_labels.js:16— display_labels.drawLabel 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.
dragbox.calcLinks (cyclomatic 28) src/plots/cartesian/dragbox.js:1252— dragbox.calcLinks 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.
polar.proto.updateRadialAxis (cyclomatic 28) src/plots/polar/polar.js:412— polar.proto.updateRadialAxis 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.
plot.transformInsideText (cyclomatic 28) src/traces/pie/plot.js:679— plot.transformInsideText has cyclomatic complexity 28 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
svg_text_utils.buildSVGText (cyclomatic 27) REDACTED:620— svg_text_utils.buildSVGText has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body's own statements and 12 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
axes.axes.getTickFormat (cyclomatic 27) src/plots/cartesian/axes.js:2364— axes.axes.getTickFormat has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 13 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (isProperStop, compareLogTicks, isProperLogStop, …). 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.
axes.drawTitle (cyclomatic 27) src/plots/cartesian/axes.js:4396— axes.drawTitle 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.
axes.swapAxisGroup (cyclomatic 27) src/plots/cartesian/axes.js:4674— axes.swapAxisGroup 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.
hover.createSpikelines (cyclomatic 27) src/components/fx/hover.js:2471— hover.createSpikelines 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.
display_labels.calcTextPosition (cyclomatic 27) src/components/shapes/display_labels.js:189— display_labels.calcTextPosition 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.
get_trace_color.getTraceColor (cyclomatic 27) src/traces/scatter/get_trace_color.js:7— get_trace_color.getTraceColor 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.
plot_api.setPlotContext (cyclomatic 27) REDACTED:475— plot_api.setPlotContext 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.
tosvg.toSVG (cyclomatic 27) src/snapshot/tosvg.js:52— tosvg.toSVG has cyclomatic complexity 27 (threshold 15). 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 literals inside it that branch (lines 106, 146). 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.
convert.makeCircleOpts (cyclomatic 27) src/traces/scattermap/convert.js:185— convert.makeCircleOpts has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw_descendants.drawDescendants (cyclomatic 27) src/traces/treemap/draw_descendants.js:17— draw_descendants.drawDescendants has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 126, a function literal at line 91, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
coerceFunction (cyclomatic 27) REDACTED:292— coerceFunction has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dates.dateTime2ms (cyclomatic 26) REDACTED:140— dates.dateTime2ms has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
index.drawing.makeSelectedPointStyleFns (cyclomatic 26) src/components/drawing/index.js:1087— index.drawing.makeSelectedPointStyleFns has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 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.
index.applyBackoff (cyclomatic 26) src/components/drawing/index.js:1457— index.applyBackoff 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.
axes.getTickLabelUV (cyclomatic 26) src/plots/cartesian/axes.js:3274— axes.getTickLabelUV 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.
plot.toMoveInsideBar (cyclomatic 26) src/traces/bar/plot.js:761— plot.toMoveInsideBar 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.
position_defaults.handlePositionDefaults (cyclomatic 26) src/plots/cartesian/position_defaults.js:8— position_defaults.handlePositionDefaults 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.
index.clean (cyclomatic 26) src/plots/cartesian/index.js:321— index.clean 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.
cloneplot.clonePlot (cyclomatic 26) src/snapshot/cloneplot.js:51— cloneplot.clonePlot 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.
plot.populateCellText (cyclomatic 26) src/traces/table/plot.js:520— plot.populateCellText has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 522, 564, 561). 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.
transition::prepareFn (cyclomatic 26) src/plots/plots.js:2285— transition::prepareFn 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.
index.getMarkerAngle (cyclomatic 25) src/components/drawing/index.js:1861— index.getMarkerAngle 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.
constraints.enforce (cyclomatic 25) src/plots/cartesian/constraints.js:443— constraints.enforce 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.
axes.arrayTicks (cyclomatic 25) src/plots/cartesian/axes.js:1459— axes.arrayTicks 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.
newselections.newSelections (cyclomatic 25) src/components/selections/draw_newselection/newselections.js:14— newselections.newSelections 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.
clean_2d_array.clean2dArray (cyclomatic 25) src/traces/heatmap/clean_2d_array.js:7— clean_2d_array.clean2dArray has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 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.
make_bound_array.makeBoundArray (cyclomatic 25) src/traces/heatmap/make_bound_array.js:6— make_bound_array.makeBoundArray 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.
defaults.supplyDefaults (cyclomatic 25) src/traces/scatter/defaults.js:19— defaults.supplyDefaults 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.
calc.calcAxisExpansion (cyclomatic 25) src/traces/scatter/calc.js:159— calc.calcAxisExpansion 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.
scrollbox.ScrollBox.enable (cyclomatic 25) src/components/updatemenus/scrollbox.js:73— scrollbox.ScrollBox.enable 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.
tick_label_defaults.handleTickLabelDefaults (cyclomatic 24) src/plots/cartesian/tick_label_defaults.js:9— tick_label_defaults.handleTickLabelDefaults 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.
autorange.padInsideLabelsOnAnchorAxis (cyclomatic 24) src/plots/cartesian/autorange.js:250— autorange.padInsideLabelsOnAnchorAxis 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.
plots.plots.linkSubplots (cyclomatic 24) src/plots/plots.js:739— plots.plots.linkSubplots has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
axes.axes.autoTicks (cyclomatic 24) src/plots/cartesian/axes.js:1556— axes.axes.autoTicks 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.
axes.formatDate (cyclomatic 24) src/plots/cartesian/axes.js:1970— axes.formatDate 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.
newshapes.createShapeObj (cyclomatic 24) src/components/shapes/draw_newshape/newshapes.js:123— newshapes.createShapeObj 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.
graph_interact.initInteractions (cyclomatic 24) src/plots/cartesian/graph_interact.js:12— graph_interact.initInteractions 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 4 function literals inside it that branch (lines 23, 36, 52, …). 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.
find_empties.findEmpties (cyclomatic 24) src/traces/heatmap/find_empties.js:12— find_empties.findEmpties 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.
close_boundaries.default (cyclomatic 24) src/traces/contour/close_boundaries.js:3— close_boundaries.default has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
to_image.toImage (cyclomatic 24) src/plot_api/to_image.js:24— to_image.toImage 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.
plot.plot (cyclomatic 24) src/traces/violin/plot.js:11— plot.plot has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 31, 58, 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.
convert.proto.update (cyclomatic 24) src/traces/scatter3d/convert.js:360— convert.proto.update 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.
updateProjection (cyclomatic 24) src/plots/geo/geo.js:209— updateProjection has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs 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.
plots.plots.supplyTraceDefaults (cyclomatic 23) src/plots/plots.js:1050— plots.plots.supplyTraceDefaults has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
plots.plots.doCalcdata (cyclomatic 23) src/plots/plots.js:2675— plots.plots.doCalcdata has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
axes.axes.drawGrid (cyclomatic 23) src/plots/cartesian/axes.js:3608— axes.axes.drawGrid has cyclomatic complexity 23 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plot.calcTextinfo (cyclomatic 23) src/traces/bar/plot.js:1124— plot.calcTextinfo 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.
type_defaults.setAutoType (cyclomatic 23) src/plots/cartesian/type_defaults.js:29— type_defaults.setAutoType 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.
buttons.handleCartesian (cyclomatic 23) src/components/modebar/buttons.js:312— buttons.handleCartesian 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.
axis_defaults.handleAxisDefaults (cyclomatic 23) src/traces/carpet/axis_defaults.js:27— axis_defaults.handleAxisDefaults 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.
make_color_map.makeColorMap (cyclomatic 23) src/traces/contour/make_color_map.js:8— make_color_map.makeColorMap 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.
plot_api.diffLayout (cyclomatic 23) REDACTED:2846— plot_api.diffLayout 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.
plot_one.plotOne::toMoveInsideSlice (cyclomatic 23) src/traces/treemap/plot_one.js:259— plot_one.plotOne::toMoveInsideSlice 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.
plot.proto.update (cyclomatic 23) src/traces/scattermap/plot.js:104— plot.proto.update has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (repaint, addCluster, removeCluster, …). 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.
plot.plot (cyclomatic 23) src/traces/scatterpolargl/plot.js:16— plot.plot has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 23). 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.
extend._extend (cyclomatic 22) src/lib/extend.js:53— extend._extend 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.
transition_axes.transitionAxes (cyclomatic 22) src/plots/cartesian/transition_axes.js:26— transition_axes.transitionAxes 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 6 function items inside it that branch (updateSubplot, transitionComplete, transitionInterrupt, …). 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.
index.finalizeSubplots (cyclomatic 22) src/plots/cartesian/index.js:43— index.finalizeSubplots 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.
polar.computeSectorBBox (cyclomatic 22) src/plots/polar/polar.js:1525— polar.computeSectorBBox 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.
plot_api.update (cyclomatic 22) REDACTED:2279— plot_api.update 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.
draw_arrow_head.drawArrowHead (cyclomatic 22) src/components/annotations/draw_arrow_head.js:34— draw_arrow_head.drawArrowHead 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ternary.proto.initInteractions (cyclomatic 22) src/plots/ternary/ternary.js:634— ternary.proto.initInteractions has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 653, clickZoomPan, zoomDone, …). 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.
defaults.supplyDefaults (cyclomatic 22) src/traces/indicator/defaults.js:15— defaults.supplyDefaults 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.
plot.plotOne (cyclomatic 22) src/traces/splom/plot.js:17— plot.plotOne 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.
render.default (cyclomatic 22) src/traces/sankey/render.js:899— render.default has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 1082, 984, 1023, …). 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.
exports (cyclomatic 22) src/traces/sankey/render.js:899— exports has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 1082, 984, 1023, …). 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.
clean_ticks.dtick (cyclomatic 21) src/plots/cartesian/clean_ticks.js:16— clean_ticks.dtick 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.
defaults.colorbarDefaults (cyclomatic 21) src/components/colorbar/defaults.js:13— defaults.colorbarDefaults 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.
defaults.colorScaleDefaults (cyclomatic 21) src/components/colorscale/defaults.js:30— defaults.colorScaleDefaults 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.
svg_text_utils.convertToTspans (cyclomatic 21) REDACTED:119— svg_text_utils.convertToTspans has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 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.
plot_schema.layoutHeadAttr (cyclomatic 21) src/plot_api/plot_schema.js:277— plot_schema.layoutHeadAttr 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.
plot.calcTexttemplate (cyclomatic 21) src/traces/bar/plot.js:1041— plot.calcTexttemplate 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.
handle_click.handleTitleClick (cyclomatic 21) src/components/legend/handle_click.js:293— handle_click.handleTitleClick has cyclomatic complexity 21 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
polar.proto.updateAngularAxis (cyclomatic 21) src/plots/polar/polar.js:602— polar.proto.updateAngularAxis has cyclomatic complexity 21 (threshold 15). 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: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
polar.proto.updateRadialDrag (cyclomatic 21) src/plots/polar/polar.js:1132— polar.proto.updateRadialDrag has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (rerangeMove, moveFn, computeRadialAxisUpdates, …). 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.
plot.joinAllPaths (cyclomatic 21) src/traces/contour/plot.js:115— plot.joinAllPaths 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.
template_api.walkStyleKeys (cyclomatic 21) src/plot_api/template_api.js:166— template_api.walkStyleKeys 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.
index.sizeDefaults (cyclomatic 21) src/components/grid/index.js:160— index.sizeDefaults 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.
defaults.default (cyclomatic 21) src/components/errorbars/defaults.js:12— defaults.default 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.
calc.calc (cyclomatic 21) src/traces/waterfall/calc.js:17— calc.calc 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.
plot.plotConnectors (cyclomatic 21) src/traces/waterfall/plot.js:25— plot.plotConnectors 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 52, 29). 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.
axisbrush.getInterval (cyclomatic 21) src/traces/parcoords/axisbrush.js:132— axisbrush.getInterval 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.
convert.convert (cyclomatic 21) src/traces/scattermap/convert.js:20— convert.convert 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.
transitionFromReact (cyclomatic 21) src/plots/plots.js:2436— transitionFromReact has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 4 function items inside it that branch (prepareFn, runFn, runFn::transitionAxes, …). 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.
attributes.colorScaleAttrs (cyclomatic 20) src/components/colorscale/attributes.js:57— attributes.colorScaleAttrs 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.
plots.plots.plotAutoSize (cyclomatic 20) src/plots/plots.js:1313— plots.plots.plotAutoSize 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: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
axes.axes.prepTicks (cyclomatic 20) src/plots/cartesian/axes.js:736— axes.axes.prepTicks 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.
line_grid_defaults.handleLineGridDefaults (cyclomatic 20) src/plots/cartesian/line_grid_defaults.js:17— line_grid_defaults.handleLineGridDefaults 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.
marker_defaults.markerDefaults (cyclomatic 20) src/traces/scatter/marker_defaults.js:15— marker_defaults.markerDefaults 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.
compute_control_points.computeControlPoints (cyclomatic 20) src/traces/carpet/compute_control_points.js:122— compute_control_points.computeControlPoints 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.
link_traces.linkTraces (cyclomatic 20) src/traces/scatter/link_traces.js:5— link_traces.linkTraces 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.
draw.draw::applyAttributes (cyclomatic 20) src/components/images/draw.js:120— draw.draw::applyAttributes 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.
plot.determineInsideTextFont (cyclomatic 20) src/traces/pie/plot.js:586— plot.determineInsideTextFont 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.
ternary.proto.adjustLayout (cyclomatic 20) src/plots/ternary/ternary.js:309— ternary.proto.adjustLayout has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, 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.
setConvert (cyclomatic 20) src/traces/carpet/set_convert.js:19— setConvert has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 21 function items inside it that branch (ab2xy, isVisible, isOccluded, …). 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.
tick_value_defaults.handleTickValueDefaults (cyclomatic 19) src/plots/cartesian/tick_value_defaults.js:8— tick_value_defaults.handleTickValueDefaults 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.
svg_text_utils.makeEditable (cyclomatic 19) REDACTED:979— svg_text_utils.makeEditable has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (appendEditable, handleClick, a function literal at line 1038, …). 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.
defaults.handleText (cyclomatic 19) src/traces/bar/defaults.js:110— defaults.handleText 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.
draw.setupTitleToggle (cyclomatic 19) src/components/legend/draw.js:668— draw.setupTitleToggle 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 5 function literals inside it that branch (lines 701, 670, 681, …). 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.
hover.hoverAvoidOverlaps::constrainGroup (cyclomatic 19) src/components/fx/hover.js:2061— hover.hoverAvoidOverlaps::constrainGroup 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.
hover.hoverOnBars (cyclomatic 19) src/traces/bar/hover.js:27— hover.hoverOnBars 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
polygon.polygon.tester::contains (cyclomatic 19) src/lib/polygon.js:84— polygon.polygon.tester::contains has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (polygon.polygon.tester) 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.
select.determineSearchTraces (cyclomatic 19) src/components/selections/select.js:783— select.determineSearchTraces 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.
convert_column_xyz.convertColumnData (cyclomatic 19) src/traces/heatmap/convert_column_xyz.js:7— convert_column_xyz.convertColumnData 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.
axis_aligned_line.default (cyclomatic 19) src/traces/carpet/axis_aligned_line.js:12— axis_aligned_line.default 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.
draw.drawButtons (cyclomatic 19) src/components/updatemenus/draw.js:219— draw.drawButtons has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
draw.default (cyclomatic 19) src/components/rangeslider/draw.js:22— draw.default 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 3 function literals inside it that branch (lines 70, 155, 173). 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.
calc.calc (cyclomatic 19) src/traces/pie/calc.js:9— calc.calc 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.
plot.determineOutsideTextFont (cyclomatic 19) src/traces/pie/plot.js:527— plot.determineOutsideTextFont 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.
draw_descendants.drawDescendants (cyclomatic 19) src/traces/icicle/draw_descendants.js:17— draw_descendants.drawDescendants has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 120, a function literal at line 85, a function literal at line 58, …). 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.
hover.hoverPoints (cyclomatic 19) src/traces/waterfall/hover.js:13— hover.hoverPoints 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.
plot.plot (cyclomatic 19) src/traces/indicator/plot.js:41— plot.plot 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 3 function literals inside it that branch (lines 54, 195, 187). 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.
defaults.supplyIsoDefaults (cyclomatic 19) src/traces/isosurface/defaults.js:16— defaults.supplyIsoDefaults 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.
defaults.supplyDefaults (cyclomatic 19) src/traces/mesh3d/defaults.js:8— defaults.supplyDefaults 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, 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.
exports (cyclomatic 19) src/components/rangeslider/draw.js:22— exports 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 8 function items inside it that branch (a function literal at line 70, (anonymous)::d2p, (anonymous)::p2d, …). 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.
relink_private.relinkPrivateKeys (cyclomatic 18) src/lib/relink_private.js:13— relink_private.relinkPrivateKeys 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.
dates.ms2DateTime (cyclomatic 18) REDACTED:251— dates.ms2DateTime 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.
index.minExtend (cyclomatic 18) src/lib/index.js:661— index.minExtend 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.
tick_mark_defaults.handleTickMarkDefaults (cyclomatic 18) src/plots/cartesian/tick_mark_defaults.js:11— tick_mark_defaults.handleTickMarkDefaults 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.
index.setFillStyle (cyclomatic 18) src/components/drawing/index.js:220— index.setFillStyle 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.
index.drawing.textPointStyle (cyclomatic 18) src/components/drawing/index.js:1272— index.drawing.textPointStyle 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 one function literal inside it that branches (line 1284). 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.
align_period.alignPeriod (cyclomatic 18) src/plots/cartesian/align_period.js:10— align_period.alignPeriod 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.
polar.proto.updateLayers (cyclomatic 18) src/plots/polar/polar.js:122— polar.proto.updateLayers has cyclomatic complexity 18 (threshold 15). Of this number, 10 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.
defaults.supplyDefaults (cyclomatic 18) src/traces/box/defaults.js:11— defaults.supplyDefaults 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.
geo.proto.updateBaseLayers (cyclomatic 18) src/plots/geo/geo.js:354— geo.proto.updateBaseLayers has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 391, a function literal at line 411, a function literal at line 374, …). 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.proto.updateFx (cyclomatic 18) src/plots/geo/geo.js:453— geo.proto.updateFx has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
map.proto.fillBelowLookup (cyclomatic 18) src/plots/map/map.js:283— map.proto.fillBelowLookup 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.
download.downloadImage (cyclomatic 18) src/snapshot/download.js:28— download.downloadImage 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 38, 65, 70). 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.
draw.makeColorBarData (cyclomatic 18) src/components/colorbar/draw.js:66— draw.makeColorBarData has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hover.hoverPoints (cyclomatic 18) src/traces/image/hover.js:8— hover.hoverPoints 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.
convert.convertPlotlyOptions (cyclomatic 18) src/traces/scatter3d/convert.js:189— convert.convertPlotlyOptions 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.
style.styleArrows (cyclomatic 18) src/traces/quiver/style.js:71— style.styleArrows has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smooth_fill_array.smoothFillArray (cyclomatic 18) src/traces/carpet/smooth_fill_array.js:9— smooth_fill_array.smoothFillArray 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.
generate_schema_types.attrsToProperties (cyclomatic 18) tasks/generate_schema_types.mjs:782— generate_schema_types.attrsToProperties 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.
generate_schema_types.mergeTraceLayoutAttributes (cyclomatic 18) tasks/generate_schema_types.mjs:953— generate_schema_types.mergeTraceLayoutAttributes 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
generate_schema_types.generateLayoutProperties (cyclomatic 18) tasks/generate_schema_types.mjs:1040— generate_schema_types.generateLayoutProperties 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.
font_attributes.default (cyclomatic 17) src/plots/font_attributes.js:18— font_attributes.default 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.
autorange.concatExtremes (cyclomatic 17) src/plots/cartesian/autorange.js:320— autorange.concatExtremes 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, 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.
plot_schema.findArrayAttributes (cyclomatic 17) src/plot_api/plot_schema.js:155— plot_schema.findArrayAttributes 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 (callback, crawlIntoTrace). 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.
plot_schema.recurseIntoValObject (cyclomatic 17) src/plot_api/plot_schema.js:335— plot_schema.recurseIntoValObject 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.
command.hasSimpleAPICommandBindings (cyclomatic 17) src/plots/command.js:136— command.hasSimpleAPICommandBindings 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.
plots.plots.computeFrame (cyclomatic 17) src/plots/plots.js:2072— plots.plots.computeFrame has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
axes.anyCounterAxLineAtZero (cyclomatic 17) src/plots/cartesian/axes.js:4514— axes.anyCounterAxLineAtZero has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (lineNearZero, lineNearZero::closeEnough). 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.
cross_trace_calc.applyAttributes (cyclomatic 17) src/traces/bar/cross_trace_calc.js:396— cross_trace_calc.applyAttributes 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.
draw.computeTextDimensions (cyclomatic 17) src/components/legend/draw.js:742— draw.computeTextDimensions 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.
display_outlines.displayOutlines::addVertexControllers (cyclomatic 17) src/components/shapes/display_outlines.js:217— display_outlines.displayOutlines::addVertexControllers 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.
polygon.polygon.tester (cyclomatic 17) src/lib/polygon.js:24— polygon.polygon.tester 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 (polygon.polygon.tester::contains) 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.
select.selectOnClick (cyclomatic 17) src/components/selections/select.js:495— select.selectOnClick 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.
index.plot (cyclomatic 17) src/plots/cartesian/index.js:129— index.plot 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.
plot.plotPoints (cyclomatic 17) src/traces/box/plot.js:171— plot.plotPoints 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 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.
convert.convert (cyclomatic 17) src/traces/choroplethmap/convert.js:23— convert.convert 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.
convert_to_constraints.default (cyclomatic 17) src/traces/contour/convert_to_constraints.js:11— convert_to_constraints.default has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
plot_api.relayout (cyclomatic 17) REDACTED:1748— plot_api.relayout 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.
svgtoimg.svgToImg (cyclomatic 17) src/snapshot/svgtoimg.js:8— svgtoimg.svgToImg 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 3 function literals inside it that branch (lines 37, 11, 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.
stack_defaults.handleStackDefaults (cyclomatic 17) src/traces/scatter/stack_defaults.js:5— stack_defaults.handleStackDefaults 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.
calc_autorange.calcArrayRefAutorange (cyclomatic 17) src/components/shapes/calc_autorange.js:63— calc_autorange.calcArrayRefAutorange 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
draw.calcLevels (cyclomatic 17) src/components/colorbar/draw.js:901— draw.calcLevels 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.
plot.scootLabels (cyclomatic 17) src/traces/pie/plot.js:960— plot.scootLabels 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 (plot.scootLabels::scootOneLabel) 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.
hover.hoverPoints (cyclomatic 17) src/traces/violin/hover.js:9— hover.hoverPoints 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.
select.select (cyclomatic 17) src/traces/splom/select.js:8— select.select 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.
plot.plotOne (cyclomatic 17) src/traces/quiver/plot.js:78— plot.plotOne has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 112, 206). 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.
generate_schema_types.discoverCommonTypes (cyclomatic 17) tasks/generate_schema_types.mjs:96— generate_schema_types.discoverCommonTypes has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, a function literal at line 137). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
generate_schema_types.formatJSDoc (cyclomatic 17) tasks/generate_schema_types.mjs:330— generate_schema_types.formatJSDoc 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.
generate_schema_types.selectSharedTypes (cyclomatic 17) tasks/generate_schema_types.mjs:650— generate_schema_types.selectSharedTypes has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cross_trace_defaults.crossTraceDefaults (cyclomatic 16) src/components/colorscale/cross_trace_defaults.js:7— cross_trace_defaults.crossTraceDefaults 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 items inside it that branch (relinkColorAttrs, replace). 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.
svg_text_utils.plainText (cyclomatic 16) REDACTED:492— svg_text_utils.plainText 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.
index.drawing.pattern (cyclomatic 16) src/components/drawing/index.js:548— index.drawing.pattern has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
index.drawing.bBox (cyclomatic 16) src/components/drawing/index.js:1569— index.drawing.bBox 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.
plot_schema.getLayoutAttributes (cyclomatic 16) src/plot_api/plot_schema.js:466— plot_schema.getLayoutAttributes 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.
command.manageCommandObserver (cyclomatic 16) src/plots/command.js:22— command.manageCommandObserver has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
plots.plots.supplyLayoutGlobalDefaults (cyclomatic 16) src/plots/plots.js:1158— plots.plots.supplyLayoutGlobalDefaults 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: plots.plots.transition (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
index.draw::scootTitle (cyclomatic 16) src/components/titles/index.js:267— index.draw::scootTitle 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: one other method here (index.draw) 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.
axes.axes.draw (cyclomatic 16) src/plots/cartesian/axes.js:2545— axes.axes.draw 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 2549, 2600, 2585). 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.
layout_defaults.default (cyclomatic 16) src/traces/bar/layout_defaults.js:11— layout_defaults.default 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.
cross_trace_calc.collectExtents (cyclomatic 16) src/traces/bar/cross_trace_calc.js:839— cross_trace_calc.collectExtents 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.
helpers.getPathString (cyclomatic 16) src/components/shapes/helpers.js:193— helpers.getPathString has cyclomatic complexity 16 (threshold 15). Of this number, 10 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.
draw.drawOne::drawShape (cyclomatic 16) src/components/shapes/draw.js:112— draw.drawOne::drawShape 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.
index.plotOne (cyclomatic 16) src/plots/cartesian/index.js:212— index.plotOne has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent 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_location_utils.feature2polygons (cyclomatic 16) src/lib/geo_location_utils.js:100— geo_location_utils.feature2polygons has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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.
scene.proto.initializeGLPlot (cyclomatic 16) src/plots/gl3d/scene.js:191— scene.proto.initializeGLPlot has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (makeUpdate, a function literal at line 252, a function literal at line 268, …). 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.
defaults.handleGl3dDefaults (cyclomatic 16) src/plots/gl3d/layout/defaults.js:40— defaults.handleGl3dDefaults 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.
template_api.mergeTemplates (cyclomatic 16) src/plot_api/template_api.js:112— template_api.mergeTemplates has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
calc_autorange.shapeBounds (cyclomatic 16) src/components/shapes/calc_autorange.js:140— calc_autorange.shapeBounds 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.
convert.convert (cyclomatic 16) src/traces/densitymap/convert.js:12— convert.convert 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.
plot.scootLabels::scootOneLabel (cyclomatic 16) src/traces/pie/plot.js:982— plot.scootLabels::scootOneLabel 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 (plot.scootLabels) 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.
style.styleOne (cyclomatic 16) src/traces/treemap/style.js:29— style.styleOne 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.
defaults.supplyDefaults (cyclomatic 16) src/traces/scattergl/defaults.js:17— defaults.supplyDefaults 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.
convert.convertStyle (cyclomatic 16) src/traces/scattergl/convert.js:34— convert.convertStyle 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.
render.createCircularClosedPathString (cyclomatic 16) src/traces/sankey/render.js:357— render.createCircularClosedPathString 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.
createHoverText::(anonymous)::finalizePosition (cyclomatic 16) src/components/fx/hover.js:1758— createHoverText::(anonymous)::finalizePosition 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.
plot (cyclomatic 16) src/plots/geo/geo.js:71— plot has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TodoComment src/components/shapes/constants.ts:13— // TODO: this means curved paths could extend beyond the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
hover.createHoverText (cognitive 245) src/components/fx/hover.js:1109— hover.createHoverText has cognitive complexity 245 (threshold 15). Drivers by points: if/else 75 (144 pts), boolean chains 58, ternaries 19 (37 pts), loops 3 (6 pts) (nesting depth added 90). Of this number, 131 points are the body's own statements and 114 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.
plot (cognitive 242) src/traces/scattergl/plot.js:45— plot has cognitive complexity 242 (threshold 15). Drivers by points: if/else 58 (144 pts), loops 17 (64 pts), boolean chains 30, ternaries 1 (4 pts) (nesting depth added 136). Of this number, 103 points are the body's own statements and 139 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calcTicks (cognitive 231) src/plots/cartesian/axes.js:997— calcTicks has cognitive complexity 231 (threshold 15). Drivers by points: if/else 69 (163 pts), boolean chains 29, ternaries 11 (29 pts), loops 6 (10 pts) (nesting depth added 116). Of this number, 192 points are the body's own statements and 39 belong to 11 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.
exports (cognitive 222) src/traces/heatmap/plot.js:30— exports has cognitive complexity 222 (threshold 15). Drivers by points: if/else 57 (114 pts), loops 18 (47 pts), boolean chains 29, ternaries 14 (28 pts), error handling 2 (4 pts) (nesting depth added 102). None of this is in the body itself: all 222 points belong to 10 function items inside it that branch (a function literal at line 34, (anonymous)::interpColor, a function literal at line 540, …). 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.
plot.default (cognitive 213) src/traces/heatmap/plot.js:30— plot.default has cognitive complexity 213 (threshold 15). Drivers by points: if/else 57 (114 pts), loops 18 (47 pts), boolean chains 29, ternaries 10 (19 pts), error handling 2 (4 pts) (nesting depth added 97). None of this is in the body itself: all 213 points belong to 4 function literals inside it that branch (lines 34, 219, 540, …). 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.
sortAxisCategoriesByValue (cognitive 184) src/plots/plots.js:2802— sortAxisCategoriesByValue has cognitive complexity 184 (threshold 15). Drivers by points: if/else 27 (109 pts), loops 11 (52 pts), ternaries 4 (14 pts), boolean chains 9 (nesting depth added 133). Of this number, 165 points are the body's own statements and 19 belong to 15 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.
_relayout (cognitive 180) REDACTED:1892— _relayout has cognitive complexity 180 (threshold 15). Drivers by points: if/else 55 (116 pts), boolean chains 27, ternaries 6 (21 pts), loops 9 (16 pts) (nesting depth added 83). Of this number, 175 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handleItemClick (cognitive 174) src/components/legend/handle_click.js:22— handleItemClick has cognitive complexity 174 (threshold 15). Drivers by points: if/else 39 (99 pts), loops 11 (35 pts), boolean chains 20, ternaries 5 (13 pts), match/switch 2 (7 pts) (nesting depth added 97). Of this number, 166 points are the body's own statements and 8 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.
drawOne (cognitive 166) src/plots/cartesian/axes.js:2649— drawOne has cognitive complexity 166 (threshold 15). Drivers by points: if/else 47 (85 pts), ternaries 18 (49 pts), boolean chains 24, loops 4 (8 pts) (nesting depth added 73). Of this number, 63 points are the body's own statements and 103 belong to 9 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
hover._hover (cognitive 162) src/components/fx/hover.js:292— hover._hover has cognitive complexity 162 (threshold 15). Drivers by points: if/else 104 (234 pts), boolean chains 68, loops 12 (25 pts), ternaries 6 (11 pts) (nesting depth added 148). 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.
_restyle (cognitive 153) REDACTED:1420— _restyle has cognitive complexity 153 (threshold 15). Drivers by points: if/else 42 (84 pts), ternaries 10 (38 pts), boolean chains 21, loops 4 (10 pts) (nesting depth added 76). Of this number, 143 points are the body's own statements and 10 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.
style (cognitive 139) src/components/legend/style.js:24— style has cognitive complexity 139 (threshold 15). Drivers by points: if/else 45 (53 pts), ternaries 33 (49 pts), boolean chains 35, match/switch 1 (2 pts) (nesting depth added 25). Most of this is not in the body itself: 1 of the 139 points is its own statement and the rest belongs to 28 function items inside it that branch (a function literal at line 649, a function literal at line 370, stylePoints, …). 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.
_hover::findHoverPoints (cognitive 138) src/components/fx/hover.js:530— _hover::findHoverPoints has cognitive complexity 138 (threshold 15). Drivers by points: if/else 37 (110 pts), boolean chains 17, loops 2 (6 pts), ternaries 1 (5 pts) (nesting depth added 81). 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.
calc (cognitive 131) src/traces/box/calc.js:12— calc has cognitive complexity 131 (threshold 15). Drivers by points: if/else 28 (67 pts), ternaries 12 (36 pts), boolean chains 18, loops 4 (10 pts) (nesting depth added 69). Of this number, 129 points are the body's own statements and 2 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.
react (cognitive 122) REDACTED:2620— react has cognitive complexity 122 (threshold 15). Drivers by points: if/else 30 (94 pts), loops 4 (18 pts), boolean chains 10 (nesting depth added 78). Of this number, 118 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
crawl (cognitive 119) REDACTED:108— crawl has cognitive complexity 119 (threshold 15). Drivers by points: if/else 25 (61 pts), loops 6 (21 pts), ternaries 3 (19 pts), boolean chains 18 (nesting depth added 67). 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.
drawOne (cognitive 118) src/components/legend/draw.js:82— drawOne has cognitive complexity 118 (threshold 15). Drivers by points: if/else 44 (67 pts), ternaries 10 (25 pts), boolean chains 24, loops 1 (2 pts) (nesting depth added 39). Of this number, 36 points are the body's own statements and 82 belong to 26 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.
layout_defaults.supplyLayoutDefaults (cognitive 117) src/plots/cartesian/layout_defaults.js:31— layout_defaults.supplyLayoutDefaults has cognitive complexity 117 (threshold 15). Drivers by points: if/else 31 (70 pts), boolean chains 22, ternaries 7 (13 pts), loops 8 (12 pts) (nesting depth added 49). Of this number, 107 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.
makePath (cognitive 116) src/traces/contour/find_all_paths.js:47— makePath has cognitive complexity 116 (threshold 15). Drivers by points: if/else 33 (82 pts), loops 9 (19 pts), boolean chains 12, ternaries 1 (3 pts) (nesting depth added 61). 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.
plot (cognitive 112) src/traces/bar/plot.js:91— plot has cognitive complexity 112 (threshold 15). Drivers by points: ternaries 23 (52 pts), if/else 33 (45 pts), boolean chains 15 (nesting depth added 41). Most of this is not in the body itself: 1 of the 112 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 135, (anonymous)::(anonymous)::calcCornerRadius, a function literal at line 109, …). 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.
getDiffFlags (cognitive 107) REDACTED:2915— getDiffFlags has cognitive complexity 107 (threshold 15). Drivers by points: if/else 37 (74 pts), boolean chains 24, loops 4 (9 pts) (nesting depth added 42). Of this number, 98 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.
applyUIRevisions (cognitive 103) REDACTED:2462— applyUIRevisions has cognitive complexity 103 (threshold 15). Drivers by points: if/else 24 (83 pts), boolean chains 15, loops 4 (5 pts) (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cleanData (cognitive 101) src/plot_api/helpers.js:169— cleanData has cognitive complexity 101 (threshold 15). Drivers by points: if/else 29 (73 pts), boolean chains 17, loops 3 (8 pts), ternaries 1 (3 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contentDefaults (cognitive 101) src/components/grid/index.js:242— contentDefaults has cognitive complexity 101 (threshold 15). Drivers by points: if/else 24 (67 pts), loops 7 (22 pts), boolean chains 7, ternaries 1 (5 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cross_trace_defaults.crossTraceDefaults (cognitive 98) src/traces/histogram/cross_trace_defaults.js:23— cross_trace_defaults.crossTraceDefaults has cognitive complexity 98 (threshold 15). Drivers by points: if/else 29 (74 pts), loops 10 (19 pts), boolean chains 16, ternaries 3 (9 pts) (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (cross_trace_defaults.crossTraceDefaults::fillBinOpts) 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.
makeLabelFns (cognitive 97) src/plots/cartesian/axes.js:3369— makeLabelFns has cognitive complexity 97 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 25, ternaries 12 (23 pts) (nesting depth added 34). Of this number, 68 points are the body's own statements and 29 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.
helpers.readPaths (cognitive 96) src/components/shapes/draw_newshape/helpers.js:49— helpers.readPaths has cognitive complexity 96 (threshold 15). Drivers by points: if/else 20 (78 pts), loops 4 (9 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.reselect (cognitive 95) src/components/selections/select.js:1089— select.reselect has cognitive complexity 95 (threshold 15). Drivers by points: if/else 22 (58 pts), loops 5 (24 pts), boolean chains 10, ternaries 2 (3 pts) (nesting depth added 56). 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.
line_points.linePoints (cognitive 95) src/traces/scatter/line_points.js:15— line_points.linePoints has cognitive complexity 95 (threshold 15). Drivers by points: if/else 81 (153 pts), boolean chains 51, loops 6 (12 pts), ternaries 5 (8 pts) (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lsInner (cognitive 95) src/plot_api/subroutines.js:48— lsInner has cognitive complexity 95 (threshold 15). Drivers by points: if/else 26 (48 pts), ternaries 9 (22 pts), boolean chains 19, loops 5 (6 pts) (nesting depth added 36). Of this number, 82 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.
convert.proto.update (cognitive 93) src/traces/surface/convert.js:423— convert.proto.update has cognitive complexity 93 (threshold 15). Drivers by points: if/else 22 (45 pts), loops 22 (42 pts), boolean chains 6 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
merge (cognitive 93) src/plots/gl3d/layout/convert.js:67— merge has cognitive complexity 93 (threshold 15). Drivers by points: if/else 39 (85 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
groupDefaults (cognitive 92) src/components/legend/defaults.js:12— groupDefaults has cognitive complexity 92 (threshold 15). Drivers by points: if/else 26 (44 pts), boolean chains 22, ternaries 12 (22 pts), loops 3 (4 pts) (nesting depth added 29). Of this number, 69 points are the body's own statements and 23 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.
plot_api.animate (cognitive 90) REDACTED:3108— plot_api.animate has cognitive complexity 90 (threshold 15). Drivers by points: if/else 45 (65 pts), loops 7 (12 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 26). Most of this is not in the body itself: 3 of the 90 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 3179, a function literal at line 3195, a function literal at line 3262, …). 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.
scene.proto.plot (cognitive 88) src/plots/gl3d/scene.js:558— scene.proto.plot has cognitive complexity 88 (threshold 15). Drivers by points: if/else 35 (61 pts), loops 9 (15 pts), boolean chains 12 (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.
convert.convertLinePositions (cognitive 88) src/traces/scattergl/convert.js:500— convert.convertLinePositions has cognitive complexity 88 (threshold 15). Drivers by points: if/else 26 (58 pts), loops 6 (15 pts), boolean chains 12, ternaries 2 (3 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
axis_defaults.rangebreaksDefaults (cognitive 87) src/plots/cartesian/axis_defaults.js:228— axis_defaults.rangebreaksDefaults has cognitive complexity 87 (threshold 15). Drivers by points: if/else 18 (64 pts), loops 3 (12 pts), boolean chains 6, match/switch 1 (5 pts) (nesting depth added 59). 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.
set_convert.setConvert (cognitive 86) src/plots/cartesian/set_convert.js:78— set_convert.setConvert has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 56, if/else 22 (25 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 56 points are the body's own statements and 30 belong to 33 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.
doAutoMargin (cognitive 86) src/plots/plots.js:1696— doAutoMargin has cognitive complexity 86 (threshold 15). Drivers by points: if/else 20 (57 pts), loops 7 (17 pts), boolean chains 6, ternaries 1 (6 pts) (nesting depth added 52). 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.
get_legend_data.getLegendData (cognitive 84) src/components/legend/get_legend_data.js:7— get_legend_data.getLegendData has cognitive complexity 84 (threshold 15). Drivers by points: if/else 22 (48 pts), loops 9 (16 pts), boolean chains 12, ternaries 4 (8 pts) (nesting depth added 37). Of this number, 73 points are the body's own statements and 11 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.
calc.calcAllAutoBins (cognitive 84) src/traces/histogram/calc.js:242— calc.calcAllAutoBins has cognitive complexity 84 (threshold 15). Drivers by points: if/else 26 (59 pts), boolean chains 12, ternaries 6 (11 pts), loops 1 (2 pts) (nesting depth added 39). Of this number, 75 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.
handleDefaults (cognitive 83) src/plots/cartesian/constraints.js:14— handleDefaults has cognitive complexity 83 (threshold 15). Drivers by points: if/else 13 (46 pts), loops 12 (24 pts), boolean chains 8, ternaries 1 (5 pts) (nesting depth added 49). Of this number, 79 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.
calc.calc (cognitive 81) src/traces/quiver/calc.js:15— calc.calc has cognitive complexity 81 (threshold 15). Drivers by points: if/else 30 (68 pts), boolean chains 9, loops 2, ternaries 1 (2 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
enforce (cognitive 81) src/plots/cartesian/constraints.js:443— enforce has cognitive complexity 81 (threshold 15). Drivers by points: if/else 14 (52 pts), loops 5 (17 pts), boolean chains 6, ternaries 1 (6 pts) (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
prepSelect::moveFn (cognitive 78) src/components/selections/select.js:207— prepSelect::moveFn has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 12 (39 pts), if/else 20 (32 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
manage.getButtonGroups (cognitive 77) src/components/modebar/manage.js:64— manage.getButtonGroups has cognitive complexity 77 (threshold 15). Drivers by points: if/else 42 (59 pts), boolean chains 11, loops 5 (7 pts) (nesting depth added 19). Of this number, 50 points are the body's own statements and 27 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.
scene.proto.render (cognitive 77) src/plots/gl3d/scene.js:299— scene.proto.render has cognitive complexity 77 (threshold 15). Drivers by points: if/else 27 (62 pts), boolean chains 14, loops 1 (nesting depth added 35). Of this number, 76 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.
singlePointStyle (cognitive 77) src/components/drawing/index.js:889— singlePointStyle has cognitive complexity 77 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 18, ternaries 5 (9 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc (cognitive 76) src/traces/scatter/calc.js:15— calc has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 9 (28 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 40). Of this number, 75 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.
hover.hoverPoints (cognitive 75) src/traces/scatter/hover.js:10— hover.hoverPoints has cognitive complexity 75 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 9 (25 pts), boolean chains 13, loops 3 (4 pts), error handling 1 (nesting depth added 33). Of this number, 40 points are the body's own statements and 35 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.
crossTraceCalc (cognitive 75) src/traces/scatter/cross_trace_calc.js:46— crossTraceCalc has cognitive complexity 75 (threshold 15). Drivers by points: loops 14 (40 pts), if/else 8 (17 pts), ternaries 3 (14 pts), boolean chains 4 (nesting depth added 46). 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.
axes.axes.drawLabels (cognitive 74) src/plots/cartesian/axes.js:3758— axes.axes.drawLabels has cognitive complexity 74 (threshold 15). Drivers by points: if/else 35 (67 pts), boolean chains 36, ternaries 11 (23 pts), loops 2 (6 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent 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 (axes.axes.drawLabels::fixLabelOverlaps) 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.
display_labels.calcTextPosition (cognitive 74) src/components/shapes/display_labels.js:189— display_labels.calcTextPosition has cognitive complexity 74 (threshold 15). Drivers by points: if/else 38 (74 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc_gridlines.calcGridlines (cognitive 73) src/traces/carpet/calc_gridlines.js:6— calc_gridlines.calcGridlines has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (43 pts), loops 10 (22 pts), boolean chains 7, ternaries 1 (nesting depth added 35). Of this number, 53 points are the body's own statements and 20 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.
handleAxisDefaults (cognitive 73) src/plots/cartesian/axis_defaults.js:42— handleAxisDefaults has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 18, ternaries 5 (9 pts), loops 2 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prepMinorTicks (cognitive 68) src/plots/cartesian/axes.js:627— prepMinorTicks has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (48 pts), ternaries 3 (12 pts), boolean chains 8 (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.
helpers.cleanLayout (cognitive 67) src/plot_api/helpers.js:28— helpers.cleanLayout has cognitive complexity 67 (threshold 15). Drivers by points: if/else 27 (51 pts), boolean chains 9, loops 4, ternaries 3 (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.
axes.periodCompatibleWithTickformat (cognitive 66) src/plots/cartesian/axes.js:4823— axes.periodCompatibleWithTickformat has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 11 (66 pts) (nesting depth added 55). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
applyContainerArrayChanges (cognitive 66) src/plot_api/manage_arrays.js:67— applyContainerArrayChanges has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (47 pts), loops 6 (13 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calcHover (cognitive 66) src/traces/scattergl/hover.js:113— calcHover has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 29 (52 pts), if/else 10, boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adjustPeriodDelta (cognitive 65) src/plots/cartesian/axes.js:795— adjustPeriodDelta has cognitive complexity 65 (threshold 15). Drivers by points: if/else 17 (41 pts), ternaries 3 (15 pts), boolean chains 9 (nesting depth added 36). Of this number, 64 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.
calc (cognitive 65) src/traces/sunburst/calc.js:18— calc has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (40 pts), ternaries 4 (10 pts), boolean chains 7, loops 3 (5 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 26). Of this number, 45 points are the body's own statements and 20 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.
defaults.handleSampleDefaults (cognitive 64) src/traces/box/defaults.js:73— defaults.handleSampleDefaults has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (43 pts), boolean chains 12, loops 2 (7 pts), match/switch 1 (2 pts) (nesting depth added 24). Of this number, 59 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.
formatLog (cognitive 64) src/plots/cartesian/axes.js:2041— formatLog has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (31 pts), ternaries 5 (17 pts), boolean chains 16 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calcLinks (cognitive 64) src/plots/cartesian/dragbox.js:1252— calcLinks has cognitive complexity 64 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 8 (19 pts), ternaries 2 (12 pts), boolean chains 11 (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.
getAutoRange (cognitive 64) src/plots/cartesian/autorange.js:52— getAutoRange has cognitive complexity 64 (threshold 15). Drivers by points: if/else 24 (47 pts), ternaries 2 (8 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handleGeoDefaults (cognitive 64) src/plots/geo/layout_defaults.js:23— handleGeoDefaults has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (38 pts), boolean chains 14, ternaries 7 (11 pts), loops 1 (nesting depth added 14). Of this number, 63 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setPositionOffset (cognitive 64) src/traces/box/cross_trace_calc.js:41— setPositionOffset has cognitive complexity 64 (threshold 15). Drivers by points: if/else 19 (38 pts), ternaries 4 (11 pts), boolean chains 9, loops 4 (6 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
make_bound_array.makeBoundArray (cognitive 63) src/traces/heatmap/make_bound_array.js:6— make_bound_array.makeBoundArray has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 5 (20 pts), ternaries 2 (7 pts), boolean chains 4 (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.
drawTitle (cognitive 63) src/plots/cartesian/axes.js:4396— drawTitle has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 9 (31 pts), if/else 16 (28 pts), boolean chains 4 (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.
computeLegendDimensions (cognitive 63) src/components/legend/draw.js:861— computeLegendDimensions has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 19, ternaries 9 (15 pts) (nesting depth added 17). Of this number, 41 points are the body's own statements and 22 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.
appendBarText (cognitive 62) src/traces/bar/plot.js:531— appendBarText has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (41 pts), boolean chains 18, ternaries 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.
buildSVGText (cognitive 62) REDACTED:620— buildSVGText has cognitive complexity 62 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 31). Of this number, 42 points are the body's own statements and 20 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calc (cognitive 62) src/traces/histogram/calc.js:18— calc has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (40 pts), ternaries 5 (9 pts), boolean chains 8, loops 5 (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.
generate_schema_types.generateSchemaTypes (cognitive 61) tasks/generate_schema_types.mjs:1135— generate_schema_types.generateSchemaTypes has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (27 pts), loops 17 (22 pts), ternaries 4 (7 pts), boolean chains 5 (nesting depth added 15). Of this number, 49 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.
axes.positionPeriodTicks (cognitive 60) src/plots/cartesian/axes.js:897— axes.positionPeriodTicks has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert.convertMarkerStyle (cognitive 60) src/traces/scattergl/convert.js:252— convert.convertMarkerStyle has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 10 (28 pts), boolean chains 4 (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.
plots.plots.supplyDefaults (cognitive 59) src/plots/plots.js:197— plots.plots.supplyDefaults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 19, loops 9 (13 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.
stack_defaults.handleStackDefaults (cognitive 59) src/traces/scatter/stack_defaults.js:5— stack_defaults.handleStackDefaults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (45 pts), loops 2 (10 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
defaults.handleShapeDefaults (cognitive 59) src/components/shapes/defaults.js:30— defaults.handleShapeDefaults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 28 (48 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 21). Most of this is not in the body itself: 12 of the 59 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 75, 110, 100). 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.
handleDefaults (cognitive 59) src/plots/polar/layout_defaults.js:24— handleDefaults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 13, loops 2 (5 pts), ternaries 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
display_labels.drawLabel (cognitive 58) src/components/shapes/display_labels.js:16— display_labels.drawLabel has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 8 (16 pts), loops 4 (12 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
templateFormatString (cognitive 57) src/lib/index.js:1098— templateFormatString has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (42 pts), ternaries 3 (8 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 24). None of this is in the body itself: all 57 points belong to one function literal inside it that branches (line 1099). 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.
padInsideLabelsOnAnchorAxis (cognitive 57) src/plots/cartesian/autorange.js:250— padInsideLabelsOnAnchorAxis has cognitive complexity 57 (threshold 15). Drivers by points: if/else 8 (32 pts), boolean chains 10, ternaries 2 (9 pts), loops 2 (6 pts) (nesting depth added 35). Of this number, 51 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
findExtremes (cognitive 57) src/plots/cartesian/autorange.js:450— findExtremes has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 15, loops 4 (8 pts), ternaries 2 (nesting depth added 18). Of this number, 44 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.
plot.plotOne (cognitive 56) src/traces/scatter/plot.js:113— plot.plotOne has cognitive complexity 56 (threshold 15). Drivers by points: if/else 45 (68 pts), boolean chains 16, loops 5 (9 pts), ternaries 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot.formatSliceLabel (cognitive 56) src/traces/sunburst/plot.js:529— plot.formatSliceLabel has cognitive complexity 56 (threshold 15). Drivers by points: if/else 22 (50 pts), boolean chains 6 (nesting depth added 28). Of this number, 52 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.
joinAllPaths (cognitive 56) src/traces/contourcarpet/plot.js:353— joinAllPaths has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 6 (10 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 26). Of this number, 46 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.
plot (cognitive 56) src/traces/image/plot.js:11— plot has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 14, loops 6 (7 pts), ternaries 3 (7 pts) (nesting depth added 14). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 17, (anonymous)::drawMagnifiedPixelsOnCanvas, a function literal at line 153, …). 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.
style.styleOne (cognitive 55) src/traces/treemap/style.js:29— style.styleOne has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 1 (6 pts), boolean chains 5 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
validateTemplate (cognitive 55) src/plot_api/template_api.js:276— validateTemplate has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 7 (13 pts), boolean chains 9 (nesting depth added 21). Of this number, 21 points are the body's own statements and 34 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.
attachFxHandlers::onMouseOver (cognitive 55) src/traces/sunburst/fx.js:34— attachFxHandlers::onMouseOver has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 11, ternaries 4 (11 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.
plots.plots.supplyTraceDefaults (cognitive 54) src/plots/plots.js:1050— plots.plots.supplyTraceDefaults has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (38 pts), ternaries 3 (9 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calc.calc (cognitive 53) src/traces/histogram2d/calc.js:12— calc.calc has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 6 (9 pts), boolean chains 8, ternaries 5 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ternary.proto.drawSpikelines (cognitive 53) src/plots/ternary/ternary.js:174— ternary.proto.drawSpikelines has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 11 (26 pts), if/else 11 (19 pts), boolean chains 7, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.hasSimpleAPICommandBindings (cognitive 51) src/plots/command.js:136— command.hasSimpleAPICommandBindings has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (45 pts), loops 2 (6 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
find_empties.findEmpties (cognitive 51) src/traces/heatmap/find_empties.js:12— find_empties.findEmpties has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (38 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convertTextStyle (cognitive 51) src/traces/scattergl/convert.js:108— convertTextStyle has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 10 (26 pts), if/else 9 (10 pts), loops 5 (9 pts), match/switch 2 (4 pts), boolean chains 2 (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.
keyed_container.keyedContainer (cognitive 50) src/lib/keyed_container.js:25— keyed_container.keyedContainer has cognitive complexity 50 (threshold 15). Drivers by points: if/else 26 (36 pts), loops 4 (7 pts), boolean chains 6, ternaries 1 (nesting depth added 13). Most of this is not in the body itself: 9 of the 50 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 155, 51, 118, …). 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.
calc.calc (cognitive 50) src/traces/heatmap/calc.js:17— calc.calc has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 13, ternaries 4 (5 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 44 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
plot_one.plotOne::makeUpdateSliceInterpolator (cognitive 50) src/traces/treemap/plot_one.js:368— plot_one.plotOne::makeUpdateSliceInterpolator has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (48 pts), boolean chains 2 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
handleCartesian (cognitive 49) src/components/modebar/buttons.js:312— handleCartesian has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (32 pts), ternaries 3 (8 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
createSpikelines (cognitive 48) src/components/fx/hover.js:2471— createSpikelines has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 4 (10 pts), boolean chains 9 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw (cognitive 48) src/components/titles/index.js:52— draw has cognitive complexity 48 (threshold 15). Drivers by points: if/else 40 (58 pts), boolean chains 23, ternaries 8 (13 pts), loops 2 (5 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.
cleanPoint (cognitive 47) src/components/fx/hover.js:2335— cleanPoint has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 11, ternaries 6 (9 pts) (nesting depth added 12). Of this number, 43 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.
drawNumbers (cognitive 47) src/traces/indicator/plot.js:518— drawNumbers has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 10, ternaries 4 (nesting depth added 9). Of this number, 19 points are the body's own statements and 28 belong to 23 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.
index.getMarkerAngle (cognitive 46) src/components/drawing/index.js:1861— index.getMarkerAngle has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 8, ternaries 1 (4 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
axes.arrayTicks (cognitive 46) src/plots/cartesian/axes.js:1459— axes.arrayTicks has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 8, loops 3 (6 pts), ternaries 3 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
autoTickRound (cognitive 46) src/plots/cartesian/axes.js:1663— autoTickRound has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 14, ternaries 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setPlotContext (cognitive 46) REDACTED:475— setPlotContext has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 4 (10 pts), boolean chains 7, ternaries 1 (2 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.
plot.transformInsideText (cognitive 45) src/traces/pie/plot.js:679— plot.transformInsideText has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 5 (13 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 18). Of this number, 36 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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.processGrid (cognitive 45) src/traces/streamtube/calc.js:82— calc.processGrid has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 4 (7 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 17). Of this number, 38 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.
autoTicks (cognitive 45) src/plots/cartesian/axes.js:1556— autoTicks has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (37 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getInterval (cognitive 45) src/traces/parcoords/axisbrush.js:132— getInterval has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 3 (12 pts), boolean chains 5, loops 2 (4 pts) (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.
smoothFill2dArray (cognitive 45) src/traces/carpet/smooth_fill_2d_array.js:17— smoothFill2dArray has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, loops 5 (7 pts), ternaries 1 (3 pts) (nesting depth added 16). Of this number, 37 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.
axes.axes.drawLabels::fixLabelOverlaps (cognitive 44) src/plots/cartesian/axes.js:4017— axes.axes.drawLabels::fixLabelOverlaps has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 12, ternaries 3 (7 pts), loops 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. This shape REPEATS in the file: one other method here (axes.axes.drawLabels) 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.
plot.attachFxHandlers (cognitive 44) src/traces/pie/plot.js:380— plot.attachFxHandlers has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 12, ternaries 6 (12 pts) (nesting depth added 12). Most of this is not in the body itself: 2 of the 44 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 396, 491, 511). 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.
calc.convertToD3Sankey (cognitive 44) src/traces/sankey/calc.js:11— calc.convertToD3Sankey has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 5 (10 pts), loops 6 (7 pts), boolean chains 4 (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.
selectOnClick (cognitive 44) src/components/selections/select.js:495— selectOnClick has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (11 pts), ternaries 2 (6 pts), boolean chains 3 (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.
joinAllPaths (cognitive 44) src/traces/contour/plot.js:115— joinAllPaths has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 4 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
coerceFunction (cognitive 44) REDACTED:292— coerceFunction has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (8 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 18). Of this number, 43 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hoverOnBoxes (cognitive 44) src/traces/box/hover.js:40— hoverOnBoxes has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 12, ternaries 6 (8 pts), loops 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
index.lib.expandObjectPaths (cognitive 43) src/lib/index.js:895— index.lib.expandObjectPaths has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (37 pts), boolean chains 4, loops 1 (2 pts) (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.
plot_schema.recurseIntoValObject (cognitive 43) src/plot_api/plot_schema.js:335— plot_schema.recurseIntoValObject has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (42 pts), 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.
newshapes.newShapes (cognitive 43) src/components/shapes/draw_newshape/newshapes.js:30— newshapes.newShapes has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 12, match/switch 2 (6 pts), loops 1, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot.plotOne (cognitive 43) src/traces/splom/plot.js:17— plot.plotOne has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 6 (17 pts), boolean chains 3 (nesting depth added 22). Of this number, 42 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
getHoverLabelText (cognitive 43) src/components/fx/hover.js:1850— getHoverLabelText has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 9, 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.
updateHoverAndMainDrag (cognitive 43) src/plots/polar/polar.js:794— updateHoverAndMainDrag has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27 (34 pts), boolean chains 5, loops 1 (2 pts), match/switch 1, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 18 function items inside it that branch (clampAndSetR0R1, prepFn, pathCornerForPolygons, …). 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.
finalizeSubplots (cognitive 43) src/plots/cartesian/index.js:43— finalizeSubplots has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 4 (5 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
axes.axes.tickText (cognitive 42) src/plots/cartesian/axes.js:1835— axes.axes.tickText has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 9, ternaries 4 (5 pts), loops 1 (2 pts) (nesting depth added 8). Of this number, 35 points are the body's own statements and 7 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.
axes.axes.getTickFormat (cognitive 42) src/plots/cartesian/axes.js:2364— axes.axes.getTickFormat has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 12, loops 2 (6 pts), ternaries 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 15). Of this number, 21 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.
cloneplot.clonePlot (cognitive 42) src/snapshot/cloneplot.js:51— cloneplot.clonePlot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 4 (8 pts), boolean chains 5, ternaries 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.
plot.plot (cognitive 42) src/traces/sankey/plot.js:134— plot.plot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 8, ternaries 2 (4 pts), loops 2 (nesting depth added 7). Most of this is not in the body itself: 7 of the 42 points are its own statements and the rest belongs to 8 function items inside it that branch (linkHoverFollow, linkHoverFollow::hoverCenterPosition, nodeHoverFollow, …). 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.
numFormat (cognitive 42) src/plots/cartesian/axes.js:2265— numFormat has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (26 pts), ternaries 4 (9 pts), boolean chains 7 (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.
addFrames (cognitive 42) REDACTED:3474— addFrames has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 8, loops 4 (8 pts), ternaries 1 (2 pts) (nesting depth added 15). Of this number, 40 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.
makeColorBarData (cognitive 42) src/components/colorbar/draw.js:66— makeColorBarData has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 5 (19 pts), if/else 7 (15 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 24). Of this number, 38 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.
parcoords (cognitive 42) src/traces/parcoords/parcoords.js:440— parcoords has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 10 (12 pts), boolean chains 11 (nesting depth added 8). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 33 function literals inside it that branch (lines 478, 555, 599, …). 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.
hover.hoverPoints (cognitive 41) src/traces/heatmap/hover.js:9— hover.hoverPoints has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 12, loops 2 (6 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
makeCircleOpts (cognitive 41) src/traces/scattermap/convert.js:185— makeCircleOpts has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7, ternaries 4 (5 pts), loops 2 (3 pts) (nesting depth added 14). Of this number, 39 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.
formatDate (cognitive 40) src/plots/cartesian/axes.js:1970— formatDate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 10, 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.
drawGrid (cognitive 40) src/plots/cartesian/axes.js:3608— drawGrid has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 7 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 17). Of this number, 31 points are the body's own statements and 9 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.
handleOneAxDefaults (cognitive 40) src/plots/cartesian/constraints.js:180— handleOneAxDefaults has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 10, ternaries 6 (9 pts), 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.
svg_text_utils.sanitizeHTML (cognitive 39) REDACTED:821— svg_text_utils.sanitizeHTML has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (33 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cross_trace_calc.applyAttributes (cognitive 39) src/traces/bar/cross_trace_calc.js:396— cross_trace_calc.applyAttributes has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (17 pts), boolean chains 2 (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.
plot.calcTextinfo (cognitive 39) src/traces/bar/plot.js:1124— plot.calcTextinfo has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 2, ternaries 2 (nesting depth added 17). Of this number, 37 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.
index.clean (cognitive 39) src/plots/cartesian/index.js:321— index.clean has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 11, loops 4 (8 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.
make_color_map.makeColorMap (cognitive 39) src/traces/contour/make_color_map.js:8— make_color_map.makeColorMap has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, ternaries 4 (6 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
template_api.walkStyleKeys (cognitive 39) src/plot_api/template_api.js:166— template_api.walkStyleKeys has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 6, loops 2 (4 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.
transition::prepareFn (cognitive 39) src/plots/plots.js:2285— transition::prepareFn has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 7, loops 3 (4 pts), ternaries 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
makeSelectedPointStyleFns (cognitive 39) src/components/drawing/index.js:1087— makeSelectedPointStyleFns has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 5 (14 pts), boolean chains 13, if/else 9 (12 pts) (nesting depth added 12). Most of this is not in the body itself: 12 of the 39 points are its own statements and the rest belongs to 3 function items inside it that branch (selectedOpacityFn, selectedSizeFn, selectedColorFn). 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.
scootLabels (cognitive 39) src/traces/pie/plot.js:960— scootLabels has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 8 (15 pts), loops 6 (13 pts), boolean chains 6 (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.
plot (cognitive 39) src/plots/cartesian/index.js:129— plot has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 4 (8 pts), boolean chains 4 (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.
getTextFont (cognitive 39) src/traces/scattermap/convert.js:382— getTextFont has cognitive complexity 39 (threshold 15). Drivers by points: if/else 27 (34 pts), ternaries 1 (3 pts), boolean chains 2 (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.
plotBoxAndWhiskers (cognitive 39) src/traces/box/plot.js:47— plotBoxAndWhiskers has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 19 (27 pts), boolean chains 7, if/else 5 (nesting depth added 8). Most of this is not in the body itself: 10 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 83). 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.
map.proto.fillBelowLookup (cognitive 37) src/plots/map/map.js:283— map.proto.fillBelowLookup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot_api._doPlot (cognitive 37) REDACTED:59— plot_api._doPlot has cognitive complexity 37 (threshold 15). Drivers by points: if/else 41 (61 pts), boolean chains 15, loops 3 (4 pts), ternaries 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plot_api._doPlot::drawFramework) 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.
generate_schema_types.mergeTraceLayoutAttributes (cognitive 37) tasks/generate_schema_types.mjs:953— generate_schema_types.mergeTraceLayoutAttributes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 3 (9 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 19). Of this number, 34 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.
plot (cognitive 37) src/traces/pie/plot.js:22— plot has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (23 pts), ternaries 8, boolean chains 6 (nesting depth added 4). None of this is in the body itself: all 37 points belong to 10 function items inside it that branch (a function literal at line 56, a function literal at line 168, a function literal at line 44, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
updateProjection (cognitive 37) src/plots/geo/geo.js:209— updateProjection has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, ternaries 1 (3 pts), loops 1 (2 pts), other 1 (nesting depth added 11). Of this number, 36 points are the body's own statements and 1 belongs to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
viewModel (cognitive 37) src/traces/parcoords/parcoords.js:214— viewModel has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 13, loops 2 (6 pts), ternaries 2 (nesting depth added 8). None of this is in the body itself: all 37 points belong to 10 function items inside it that branch (a function literal at line 234, (anonymous)::brushMove, a function literal at line 329, …). 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.
exports (cognitive 37) src/components/rangeslider/draw.js:22— exports has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 6 (16 pts), ternaries 1 (nesting depth added 18). Most of this is not in the body itself: 2 of the 37 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 70, (anonymous)::d2p, (anonymous)::p2d, …). 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.
tick_label_defaults.handleTickLabelDefaults (cognitive 36) src/plots/cartesian/tick_label_defaults.js:9— tick_label_defaults.handleTickLabelDefaults has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 7, ternaries 2 (5 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.
plot_schema.layoutHeadAttr (cognitive 36) src/plot_api/plot_schema.js:277— plot_schema.layoutHeadAttr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plots.plots.computeFrame (cognitive 36) src/plots/plots.js:2072— plots.plots.computeFrame has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (9 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.
helpers.collectionsAreEqual (cognitive 36) src/plot_api/helpers.js:512— helpers.collectionsAreEqual has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 2 (8 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 22). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot.plotConnectors (cognitive 36) src/traces/waterfall/plot.js:25— plot.plotConnectors has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 6 (nesting depth added 15). None of this is in the body itself: all 36 points belong to 2 function literals inside it that branch (lines 52, 29). 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.
prepTicks (cognitive 36) src/plots/cartesian/axes.js:736— prepTicks has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 3 (10 pts), boolean chains 6 (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.
computeControlPoints (cognitive 36) src/traces/carpet/compute_control_points.js:122— computeControlPoints has cognitive complexity 36 (threshold 15). Drivers by points: loops 9 (19 pts), ternaries 6 (13 pts), if/else 3, boolean chains 1 (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.
hoverPoints (cognitive 36) src/traces/scattergl/hover.js:8— hoverPoints has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 2 (9 pts), loops 2 (4 pts), boolean chains 2 (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.
plots.plots.autoMargin (cognitive 35) src/plots/plots.js:1610— plots.plots.autoMargin has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (23 pts), ternaries 4 (12 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
polar.proto.updateRadialAxis (cognitive 35) src/plots/polar/polar.js:412— polar.proto.updateRadialAxis has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 12, ternaries 6 (8 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.
generate_schema_types.valTypeToTS (cognitive 35) tasks/generate_schema_types.mjs:379— generate_schema_types.valTypeToTS has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (25 pts), ternaries 3 (6 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swapAxisGroup (cognitive 35) src/plots/cartesian/axes.js:4674— swapAxisGroup has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 6 (8 pts), boolean chains 7 (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.
linkSubplots (cognitive 35) src/plots/plots.js:739— linkSubplots has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (8 pts), boolean chains 7, 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.
toMoveInsideBar (cognitive 35) src/traces/bar/plot.js:761— toMoveInsideBar has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 11, ternaries 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawColorBar (cognitive 35) src/components/colorbar/draw.js:175— drawColorBar has cognitive complexity 35 (threshold 15). Drivers by points: if/else 61 (110 pts), ternaries 68 (91 pts), boolean chains 35 (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.
collectExtents (cognitive 35) src/traces/bar/cross_trace_calc.js:839— collectExtents has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (11 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 19). Of this number, 34 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.
drawDescendants (cognitive 35) src/traces/treemap/draw_descendants.js:17— drawDescendants has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 12, ternaries 6 (8 pts) (nesting depth added 4). Most of this is not in the body itself: 7 of the 35 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 126, a function literal at line 64, a function literal at line 91, …). 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.
plots.plots.graphJson (cognitive 34) src/plots/plots.js:1911— plots.plots.graphJson has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 7, ternaries 5 (7 pts) (nesting depth added 7). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 3 function items inside it that branch (stripObj, a function literal at line 1928, a function literal at line 1979). 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.
convert.proto.update (cognitive 34) src/traces/scatter3d/convert.js:360— convert.proto.update has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
calcLevels (cognitive 34) src/components/colorbar/draw.js:901— calcLevels has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (8 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
stackBars (cognitive 34) src/traces/bar/cross_trace_calc.js:582— stackBars has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 4 (7 pts), ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dates.dateTime2ms (cognitive 33) REDACTED:140— dates.dateTime2ms has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 10, error handling 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
plot.plotPoints (cognitive 33) src/traces/box/plot.js:171— plot.plotPoints has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (7 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 15). Most of this is not in the body itself: 2 of the 33 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.
click.getToggleSets (cognitive 33) src/components/annotations/click.js:76— click.getToggleSets has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (4 pts), boolean chains 3 (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.
plot.proto.update (cognitive 33) src/traces/scattermap/plot.js:104— plot.proto.update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), loops 5, boolean chains 1, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 7 function items inside it that branch (repaint, addNonCluster, removeNonCluster, …). 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.
attrsToProperties (cognitive 33) tasks/generate_schema_types.mjs:782— attrsToProperties has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 3, ternaries 1 (2 pts), 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.
ms2DateTime (cognitive 33) REDACTED:251— ms2DateTime has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 6 (7 pts), loops 2 (6 pts), boolean chains 2, error handling 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.
makeTemplate (cognitive 33) src/plot_api/template_api.js:24— makeTemplate has cognitive complexity 33 (threshold 15). Drivers by points: loops 4 (16 pts), if/else 6 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 20). 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, 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.
symbol_defs.align (cognitive 32) src/components/drawing/symbol_defs.js:721— symbol_defs.align has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 11, loops 1 (nesting depth added 6). Of this number, 31 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.
draw_arrow_head.drawArrowHead (cognitive 32) src/components/annotations/draw_arrow_head.js:34— draw_arrow_head.drawArrowHead has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 11). Of this number, 30 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.
scrollbox.ScrollBox.enable (cognitive 32) src/components/updatemenus/scrollbox.js:73— scrollbox.ScrollBox.enable has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 5, ternaries 5 (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.
setFillStyle (cognitive 32) src/components/drawing/index.js:220— setFillStyle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (12 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
applyBackoff (cognitive 32) src/components/drawing/index.js:1457— applyBackoff has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 9, ternaries 4 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
initBase (cognitive 32) src/traces/bar/cross_trace_calc.js:181— initBase has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (10 pts), ternaries 4 (9 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preserve_drawing_buffer.preserveDrawingBuffer (cognitive 31) src/lib/preserve_drawing_buffer.js:6— preserve_drawing_buffer.preserveDrawingBuffer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
defaults.colorScaleDefaults (cognitive 31) src/components/colorscale/defaults.js:30— defaults.colorScaleDefaults has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 8 (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.
type_defaults.setAutoType (cognitive 31) src/plots/cartesian/type_defaults.js:29— type_defaults.setAutoType has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 8, 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.
scene.computeTraceBounds (cognitive 31) src/plots/gl3d/scene.js:497— scene.computeTraceBounds has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (9 pts), boolean chains 3 (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.
make_crossings.makeCrossings (cognitive 31) src/traces/contour/make_crossings.js:9— make_crossings.makeCrossings has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (6 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.
close_boundaries.default (cognitive 31) src/traces/contour/close_boundaries.js:3— close_boundaries.default has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 8, loops 3 (6 pts), match/switch 2 (3 pts) (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.
tosvg.toSVG (cognitive 31) src/snapshot/tosvg.js:52— tosvg.toSVG has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 106, 146). 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.
link_traces.linkTraces (cognitive 31) src/traces/scatter/link_traces.js:5— link_traces.linkTraces has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 8, loops 2 (nesting depth added 10). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot.plot (cognitive 31) src/components/errorbars/plot.js:9— plot.plot has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 63, 18). 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.
hover.hoverPoints (cognitive 31) src/traces/violin/hover.js:9— hover.hoverPoints has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 1 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.handleAxisDefaults (cognitive 31) src/traces/splom/defaults.js:70— defaults.handleAxisDefaults has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 16, ternaries 3 (6 pts), loops 4 (5 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: one other method here (defaults.handleAxisDefaults::fillAxisStashes) 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.
supplyLayoutGlobalDefaults (cognitive 31) src/plots/plots.js:1158— supplyLayoutGlobalDefaults has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 2 (8 pts), boolean chains 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.
feature2polygons (cognitive 31) src/lib/geo_location_utils.js:100— feature2polygons has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 5 (12 pts), ternaries 1 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 14). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 3 function items inside it that branch (appendPolygon, appendPolygon, appendPolygon). 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.
dates.findExactDates (cognitive 30) REDACTED:549— dates.findExactDates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), error handling 1 (3 pts), boolean chains 1, 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.
autorange.concatExtremes (cognitive 30) src/plots/cartesian/autorange.js:320— autorange.concatExtremes has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (17 pts), boolean chains 7, if/else 3 (6 pts) (nesting depth added 14). Of this number, 19 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.
range_defaults.handleRangeDefaults (cognitive 30) src/plots/cartesian/range_defaults.js:5— range_defaults.handleRangeDefaults has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 16, if/else 8 (14 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.
newselections.newSelections (cognitive 30) src/components/selections/draw_newselection/newselections.js:14— newselections.newSelections has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, match/switch 2 (6 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
get_trace_color.getTraceColor (cognitive 30) src/traces/scatter/get_trace_color.js:7— get_trace_color.getTraceColor has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (10 pts), ternaries 3 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot_api.update (cognitive 30) REDACTED:2279— plot_api.update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (26 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.
calc.calc (cognitive 30) src/traces/scattergl/calc.js:21— calc.calc has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, boolean chains 9, loops 3 (5 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.
render.sankeyModel::computeLinkConcentrations (cognitive 30) src/traces/sankey/render.js:131— render.sankeyModel::computeLinkConcentrations has cognitive complexity 30 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 3 (11 pts) (nesting depth added 18). 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: one other method here (render.sankeyModel) 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.
defaults.handleText (cognitive 29) src/traces/bar/defaults.js:110— defaults.handleText has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6 (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.
handle_click.handleTitleClick (cognitive 29) src/components/legend/handle_click.js:293— handle_click.handleTitleClick has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 9, ternaries 2 (4 pts), loops 1 (nesting depth added 8). Of this number, 25 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.
hover.hoverAvoidOverlaps::constrainGroup (cognitive 29) src/components/fx/hover.js:2061— hover.hoverAvoidOverlaps::constrainGroup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 7 (11 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. This shape REPEATS in the file: one other method here (hover.hoverAvoidOverlaps) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
graph_interact.initInteractions (cognitive 29) src/plots/cartesian/graph_interact.js:12— graph_interact.initInteractions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 36, 23, 52, …). 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.
clean_2d_array.clean2dArray (cognitive 29) src/traces/heatmap/clean_2d_array.js:7— clean_2d_array.clean2dArray has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, loops 4 (7 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
to_image.toImage (cognitive 29) src/plot_api/to_image.js:24— to_image.toImage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 11 (nesting depth added 2). Of this number, 18 points are the body's own statements and 11 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.
plot.plot (cognitive 29) src/traces/violin/plot.js:11— plot.plot has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 6, loops 2 (4 pts), ternaries 3 (nesting depth added 4). None of this is in the body itself: all 29 points belong to 3 function literals inside it that branch (lines 58, 31, 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.
parcats.mouseoverPath (cognitive 29) src/traces/parcats/parcats.js:404— parcats.mouseoverPath has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (4 pts), ternaries 1 (4 pts), boolean chains 2 (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.
generate_schema_types.generateLayoutProperties (cognitive 29) tasks/generate_schema_types.mjs:1040— generate_schema_types.generateLayoutProperties has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 5 (7 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.
diffLayout (cognitive 29) REDACTED:2846— diffLayout has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 9, 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.
selectSharedTypes (cognitive 29) tasks/generate_schema_types.mjs:650— selectSharedTypes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 13). Of this number, 22 points are the body's own statements and 7 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.
setOffsetAndWidth (cognitive 29) src/traces/bar/cross_trace_calc.js:322— setOffsetAndWidth has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (8 pts), boolean chains 6, 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.
nested_property.npSet.<returned closure> (cognitive 28) src/lib/nested_property.js:132— nested_property.npSet.<returned closure> has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
relink_private.relinkPrivateKeys (cognitive 28) src/lib/relink_private.js:13— relink_private.relinkPrivateKeys has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 5, 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.
index.drawing.bBox (cognitive 28) src/components/drawing/index.js:1569— index.drawing.bBox has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plots.plots.extendObjectWithContainers (cognitive 28) src/plots/plots.js:2181— plots.plots.extendObjectWithContainers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (7 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.
layout_defaults.default (cognitive 28) src/traces/bar/layout_defaults.js:11— layout_defaults.default has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, ternaries 2 (4 pts), 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.
align_period.alignPeriod (cognitive 28) src/plots/cartesian/align_period.js:10— align_period.alignPeriod has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 9 (12 pts), boolean chains 3 (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.
transition_axes.transitionAxes (cognitive 28) src/plots/cartesian/transition_axes.js:26— transition_axes.transitionAxes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 6, loops 5, boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (updateSubplot, transitionComplete, transitionInterrupt, …). 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.
newshapes.createShapeObj (cognitive 28) src/components/shapes/draw_newshape/newshapes.js:123— newshapes.createShapeObj has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 10, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.prepSelect (cognitive 28) src/components/selections/select.js:58— select.prepSelect has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 18, if/else 5 (6 pts), ternaries 4 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
scene.proto.initializeGLPlot (cognitive 28) src/plots/gl3d/scene.js:191— scene.proto.initializeGLPlot has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 6 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 252, makeUpdate, a function literal at line 268, …). 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.
plot.plot (cognitive 28) src/traces/indicator/plot.js:41— plot.plot has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 5, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 54, 195, 187). 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.
style.styleArrows (cognitive 28) src/traces/quiver/style.js:71— style.styleArrows has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (14 pts), boolean chains 8, if/else 5 (6 pts) (nesting depth added 9). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 85). 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.
smooth_fill_array.smoothFillArray (cognitive 28) src/traces/carpet/smooth_fill_array.js:9— smooth_fill_array.smoothFillArray has cognitive complexity 28 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 7 (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.
computeTextDimensions (cognitive 28) src/components/legend/draw.js:742— computeTextDimensions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 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.
crossTraceCalc (cognitive 28) src/traces/bar/cross_trace_calc.js:23— crossTraceCalc has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (5 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.
dragend (cognitive 28) src/traces/parcoords/axisbrush.js:248— dragend has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 3 (5 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.
tester::contains (cognitive 28) src/lib/polygon.js:84— tester::contains has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 5, 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.
npSet (cognitive 28) src/lib/nested_property.js:131— npSet has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 12). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 132). 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.
findBin (cognitive 28) src/lib/search.js:24— findBin has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 7 (11 pts), loops 1 (2 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.
svg_text_utils.plainText (cognitive 27) REDACTED:492— svg_text_utils.plainText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 5, ternaries 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.
plot_schema.getLayoutAttributes (cognitive 27) src/plot_api/plot_schema.js:466— plot_schema.getLayoutAttributes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (9 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plots.plots.doCalcdata (cognitive 27) src/plots/plots.js:2675— plots.plots.doCalcdata has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 8 (10 pts), boolean chains 6 (nesting depth added 5). Of this number, 18 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hover.loneHover (cognitive 27) src/components/fx/hover.js:127— hover.loneHover has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (11 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 138, 241). 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.
position_defaults.handlePositionDefaults (cognitive 27) src/plots/cartesian/position_defaults.js:8— position_defaults.handlePositionDefaults has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, 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.
template_api.mergeTemplates (cognitive 27) src/plot_api/template_api.js:112— template_api.mergeTemplates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 12). Of this number, 14 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.
render.sankeyModel (cognitive 27) src/traces/sankey/render.js:30— render.sankeyModel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (42 pts), loops 14 (26 pts), ternaries 3, boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (render.sankeyModel::computeLinkConcentrations) 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.
updateRadialDrag (cognitive 27) src/plots/polar/polar.js:1132— updateRadialDrag has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 7 function items inside it that branch (rerangeMove, moveFn, computeRadialAxisUpdates, …). 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.
plotOne (cognitive 27) src/plots/cartesian/index.js:212— plotOne has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). Of this number, 25 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.
validateFunction (cognitive 27) REDACTED:356— validateFunction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (8 pts), loops 2 (4 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.
array.concat (cognitive 26) src/lib/array.js:195— array.concat has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 5 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.determineSearchTraces (cognitive 26) src/components/selections/select.js:783— select.determineSearchTraces has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 8, 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.
index.makeSubplotLayer (cognitive 26) src/plots/cartesian/index.js:559— index.makeSubplotLayer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (23 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.
marker_defaults.markerDefaults (cognitive 26) src/traces/scatter/marker_defaults.js:15— marker_defaults.markerDefaults has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw.drawButtons (cognitive 26) src/components/updatemenus/draw.js:219— draw.drawButtons has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 4, ternaries 2 (nesting depth added 3). Of this number, 20 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, 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.
plot.groupScale (cognitive 26) src/traces/pie/plot.js:1117— plot.groupScale has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc.calc (cognitive 26) src/traces/waterfall/calc.js:17— calc.calc has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, 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.
hover.hoverPoints (cognitive 26) src/traces/waterfall/hover.js:13— hover.hoverPoints has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, ternaries 3 (nesting depth added 10). Of this number, 25 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.
convert.convertTextPosition (cognitive 26) src/traces/scattergl/convert.js:693— convert.convertTextPosition has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (23 pts), loops 1 (2 pts), if/else 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.
select.selectPoints (cognitive 26) src/traces/scattermap/select.js:81— select.selectPoints has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitionFromReact (cognitive 26) src/plots/plots.js:2436— transitionFromReact has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, loops 4 (nesting depth added 5). None of this is in the body itself: all 26 points belong to 4 function items inside it that branch (prepareFn, runFn, runFn::transitionAxes, …). 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.
createCircularClosedPathString (cognitive 26) src/traces/sankey/render.js:357— createCircularClosedPathString has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, ternaries 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.
minExtend (cognitive 26) src/lib/index.js:661— minExtend has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, 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.
manageCommandObserver (cognitive 26) src/plots/command.js:22— manageCommandObserver has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). Of this number, 16 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.
computeDataBindings (cognitive 26) src/plots/command.js:328— computeDataBindings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (5 pts), ternaries 2 (5 pts) (nesting depth added 10). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 355). 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.
draw::applyAttributes (cognitive 26) src/components/images/draw.js:120— draw::applyAttributes has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 8, boolean chains 6, match/switch 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.
plots.doCrossTraceCalc (cognitive 25) src/plots/plots.js:3012— plots.doCrossTraceCalc has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (9 pts), ternaries 1 (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.
axes.formatAngle (cognitive 25) src/plots/cartesian/axes.js:2158— axes.formatAngle has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
axes.axes.draw (cognitive 25) src/plots/cartesian/axes.js:2545— axes.axes.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, ternaries 1 (nesting depth added 10). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2549, 2585, 2600). 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.
hover.hoverAvoidOverlaps (cognitive 25) src/components/fx/hover.js:1943— hover.hoverAvoidOverlaps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 27 (50 pts), loops 14 (29 pts), boolean chains 6, ternaries 4 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (hover.hoverAvoidOverlaps::constrainGroup) 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.
helpers.writePaths (cognitive 25) src/components/shapes/draw_newshape/helpers.js:16— helpers.writePaths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 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.
subroutines.redrawReglTraces (cognitive 25) src/plot_api/subroutines.js:768— subroutines.redrawReglTraces has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
polar.computeSectorBBox (cognitive 25) src/plots/polar/polar.js:1525— polar.computeSectorBBox has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 12. 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.
axis_defaults.handleAxisDefaults (cognitive 25) src/traces/carpet/axis_defaults.js:27— axis_defaults.handleAxisDefaults has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 3, 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.
convert_column_xyz.convertColumnData (cognitive 25) src/traces/heatmap/convert_column_xyz.js:7— convert_column_xyz.convertColumnData has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (6 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.
defaults.handleGl3dDefaults (cognitive 25) src/plots/gl3d/layout/defaults.js:40— defaults.handleGl3dDefaults has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
interp2d.iterateInterp2d (cognitive 25) src/traces/heatmap/interp2d.js:56— interp2d.iterateInterp2d has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc_autorange.calcArrayRefAutorange (cognitive 25) src/components/shapes/calc_autorange.js:63— calc_autorange.calcArrayRefAutorange has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 8). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
draw.draw (cognitive 25) src/components/images/draw.js:9— draw.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 10, ternaries 3, loops 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.supplyDefaults (cognitive 25) src/traces/indicator/defaults.js:15— defaults.supplyDefaults has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, 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.
calc.calc (cognitive 25) src/traces/splom/calc.js:16— calc.calc has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 8). 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, split the body into named stages: move each independent 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.convert (cognitive 25) src/traces/scattermap/convert.js:20— convert.convert has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9 (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.
parcats.dragDimension (cognitive 25) src/traces/parcats/parcats.js:1153— parcats.dragDimension has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 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.
tickFirst (cognitive 25) src/plots/cartesian/axes.js:1762— tickFirst has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (6 pts), boolean chains 3, 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.
calcTexttemplate (cognitive 25) src/traces/bar/plot.js:1041— calcTexttemplate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, ternaries 4 (8 pts), boolean chains 6 (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.
initInteractions (cognitive 25) src/plots/ternary/ternary.js:634— initInteractions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 2). None of this is in the body itself: all 25 points belong to 14 function items inside it that branch (prepFn, zoomMove, plotDrag, …). 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.
extend._extend (cognitive 24) src/lib/extend.js:53— extend._extend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, 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.
calc.calc (cognitive 24) src/components/colorscale/calc.js:8— calc.calc has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
plots.getFormatObj (cognitive 24) src/plots/plots.js:539— plots.getFormatObj has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). Of this number, 16 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.clearSelectionsCache (cognitive 24) src/components/selections/select.js:720— select.clearSelectionsCache has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3 (nesting depth added 12). Of this number, 20 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
calc.calcCommon (cognitive 24) src/traces/ohlc/calc.js:47— calc.calcCommon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 2, 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.
geo.proto.updateFx (cognitive 24) src/plots/geo/geo.js:453— geo.proto.updateFx has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 12 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
set_contours.setContours (cognitive 24) src/traces/contour/set_contours.js:6— set_contours.setContours has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 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.
plot_api.relayout (cognitive 24) REDACTED:1748— plot_api.relayout has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.supplyDefaults (cognitive 24) src/traces/scatterternary/defaults.js:15— defaults.supplyDefaults has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
plot.plot (cognitive 24) src/traces/scatterpolargl/plot.js:16— plot.plot has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 7, loops 2 (nesting depth added 2). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 23). 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.
autoBin (cognitive 24) src/plots/cartesian/axes.js:436— autoBin has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
populateCellText (cognitive 24) src/traces/table/plot.js:520— populateCellText has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 9, if/else 4 (nesting depth added 2). None of this is in the body itself: all 24 points belong to 7 function literals inside it that branch (lines 522, 564, 561, …). 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.
nested_property.npGet.<returned closure> (cognitive 23) src/lib/nested_property.js:76— nested_property.npGet.<returned closure> has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
axes.getTickLabelUV (cognitive 23) src/plots/cartesian/axes.js:3274— axes.getTickLabelUV has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 6, ternaries 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.
convert_to_constraints.default (cognitive 23) src/traces/contour/convert_to_constraints.js:11— convert_to_constraints.default has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
plot.makeLinesAndLabels (cognitive 23) src/traces/contour/plot.js:202— plot.makeLinesAndLabels has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). Of this number, 14 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot_api.addAxRangeSequence (cognitive 23) REDACTED:1845— plot_api.addAxRangeSequence has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 1850). 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.
defaults.supplyDefaults (cognitive 23) src/traces/scatter/defaults.js:19— defaults.supplyDefaults has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, ternaries 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.
cross_trace_defaults.crossTraceDefaults (cognitive 23) src/traces/scatter/cross_trace_defaults.js:8— cross_trace_defaults.crossTraceDefaults has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 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.
calc.calcAxisExpansion (cognitive 23) src/traces/scatter/calc.js:159— calc.calcAxisExpansion has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
parcats.mouseoverCategoryBand (cognitive 23) src/traces/parcats/parcats.js:997— parcats.mouseoverCategoryBand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (23 pts) (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.
parcats.updatePathViewModels (cognitive 23) src/traces/parcats/parcats.js:1689— parcats.updatePathViewModels has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 9). 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.
layout_defaults.handleDefaults (cognitive 23) src/plots/smith/layout_defaults.js:28— layout_defaults.handleDefaults has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, 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.
autoShiftNumericBins (cognitive 23) src/plots/cartesian/axes.js:539— autoShiftNumericBins has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 1 (3 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.
updateAngularAxis (cognitive 23) src/plots/polar/polar.js:602— updateAngularAxis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 9 (10 pts), boolean chains 3 (nesting depth added 2). Of this number, 20 points are the body's own statements and 3 belong to 15 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.
setupTitleToggle (cognitive 23) src/components/legend/draw.js:668— setupTitleToggle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 701, 670, 690, …). 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.
setContourLevels (cognitive 23) src/traces/surface/convert.js:384— setContourLevels has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
npGet (cognitive 23) src/lib/nested_property.js:75— npGet has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 76). 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.
drawDescendants (cognitive 23) src/traces/icicle/draw_descendants.js:17— drawDescendants has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 120, a function literal at line 58, a function literal at line 85, …). 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.
svg_text_utils.convertToTspans (cognitive 22) REDACTED:119— svg_text_utils.convertToTspans has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 180, showText). 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.
plots.plots.plotAutoSize (cognitive 22) src/plots/plots.js:1313— plots.plots.plotAutoSize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, 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.
cross_trace_calc.setGroupPositions (cognitive 22) src/traces/bar/cross_trace_calc.js:71— cross_trace_calc.setGroupPositions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (4 pts), match/switch 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.
draw.setupDragElement::moveShape (cognitive 22) src/components/shapes/draw.js:495— draw.setupDragElement::moveShape has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 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.
include_components.makeIncludeComponents.includeComponents (cognitive 22) src/plots/cartesian/include_components.js:19— include_components.makeIncludeComponents.includeComponents has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, 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.
convert.convert (cognitive 22) src/traces/choroplethmap/convert.js:23— convert.convert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tick_marks.computeTickMarks (cognitive 22) src/plots/gl3d/layout/tick_marks.js:28— tick_marks.computeTickMarks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 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.
plot.labelFormatter (cognitive 22) src/traces/contour/plot.js:384— plot.labelFormatter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 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.
calc.calc (cognitive 22) src/traces/funnel/calc.js:9— calc.calc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, 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.
plot.plotOne::makeUpdateTextInterpolator (cognitive 22) src/traces/sunburst/plot.js:409— plot.plotOne::makeUpdateTextInterpolator has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (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.
parcoords.calcAllTicks (cognitive 22) src/traces/parcoords/parcoords.js:397— parcoords.calcAllTicks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert.convertPlotlyOptions (cognitive 22) src/traces/scatter3d/convert.js:189— convert.convertPlotlyOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 4 (6 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
generate_schema_types.discoverCommonTypes::visit (cognitive 22) tasks/generate_schema_types.mjs:100— generate_schema_types.discoverCommonTypes::visit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate_schema_types.mergeSubsets (cognitive 22) tasks/generate_schema_types.mjs:735— generate_schema_types.mergeSubsets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
exports (cognitive 22) src/traces/sankey/render.js:899— exports has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (14 pts), if/else 4, boolean chains 3, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 24 function literals inside it that branch (lines 1082, 1023, 984, …). 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.
plot (cognitive 22) src/plots/geo/geo.js:71— plot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 8). Of this number, 21 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.
font_attributes.default (cognitive 21) src/plots/font_attributes.js:18— font_attributes.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 5 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angles._path (cognitive 21) src/lib/angles.js:106— angles._path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 2, 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.
svg_text_utils.makeEditable (cognitive 21) REDACTED:979— svg_text_utils.makeEditable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 5, ternaries 1. Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (appendEditable, handleClick, a function literal at line 1038, …). 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.
cross_trace_calc.normalizeBars (cognitive 21) src/traces/bar/cross_trace_calc.js:714— cross_trace_calc.normalizeBars has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (nesting depth added 9). 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.
create_spline_evaluator.default (cognitive 21) src/traces/carpet/create_spline_evaluator.js:16— create_spline_evaluator.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 21, 61, 90, …). 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.
create_i_derivative_evaluator.default (cognitive 21) src/traces/carpet/create_i_derivative_evaluator.js:33— create_i_derivative_evaluator.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 35, 76, 103, …). 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.
create_j_derivative_evaluator.default (cognitive 21) src/traces/carpet/create_j_derivative_evaluator.js:3— create_j_derivative_evaluator.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 5, 47, 76, …). 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.
helpers.clearAxisTypes (cognitive 21) src/plot_api/helpers.js:482— helpers.clearAxisTypes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
download.downloadImage (cognitive 21) src/snapshot/download.js:28— download.downloadImage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 38, 65, 70). 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.
calc_autorange.shapeBounds (cognitive 21) src/components/shapes/calc_autorange.js:140— calc_autorange.shapeBounds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, 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.
defaults.default (cognitive 21) src/components/errorbars/defaults.js:12— defaults.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
base_plot.clean (cognitive 21) src/traces/splom/base_plot.js:175— base_plot.clean 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.
render.default (cognitive 21) src/traces/sankey/render.js:899— render.default has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 4, boolean chains 3, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 1082, 1023, 984, …). 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.
scootLabels::scootOneLabel (cognitive 21) src/traces/pie/plot.js:982— scootLabels::scootOneLabel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, ternaries 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.
formatSliceLabel (cognitive 21) src/traces/pie/plot.js:1222— formatSliceLabel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
colorScaleAttrs (cognitive 21) src/components/colorscale/attributes.js:57— colorScaleAttrs has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 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.
tick_value_defaults.handleTickValueDefaults (cognitive 20) src/plots/cartesian/tick_value_defaults.js:8— tick_value_defaults.handleTickValueDefaults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 4 (nesting depth added 1). Of this number, 17 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.
cross_trace_calc.setBaseAndTop (cognitive 20) src/traces/bar/cross_trace_calc.js:546— cross_trace_calc.setBaseAndTop has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hover.getCoord (cognitive 20) src/components/fx/hover.js:2710— hover.getCoord has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 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.
polygon.polygon.tester (cognitive 20) src/lib/polygon.js:24— polygon.polygon.tester has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 10, loops 3, 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.
select.getLayoutPolygons (cognitive 20) src/components/selections/select.js:1339— select.getLayoutPolygons has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (8 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.
calc.handleSingleValueOverlays (cognitive 20) src/traces/histogram/calc.js:433— calc.handleSingleValueOverlays has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc.cdf (cognitive 20) src/traces/histogram/calc.js:540— calc.cdf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (10 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.
draw.default (cognitive 20) src/components/rangeslider/draw.js:22— draw.default has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (10 pts) (nesting depth added 8). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 70, 155, 173). 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.
index.sizeDefaults (cognitive 20) src/components/grid/index.js:160— index.sizeDefaults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
hover.hoverPoints (cognitive 20) src/traces/image/hover.js:8— hover.hoverPoints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (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.
select.select (cognitive 20) src/traces/splom/select.js:8— select.select has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
lines.default.makeConstraints (cognitive 20) src/traces/parcoords/lines.js:516— lines.default.makeConstraints has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
lines.default.render (cognitive 20) src/traces/parcoords/lines.js:579— lines.default.render has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 4 (7 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.
defaults.supplyDefaults (cognitive 20) src/traces/mesh3d/defaults.js:8— defaults.supplyDefaults has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
alignHoverText (cognitive 20) src/components/fx/hover.js:2225— alignHoverText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 5). None of this is in the body itself: all 20 points belong to 3 function items inside it that branch (a function literal at line 2235, pX, pY). 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.
toMoveOutsideBar (cognitive 20) src/traces/bar/plot.js:925— toMoveOutsideBar has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 7, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
exports.makeConstraints (cognitive 20) src/traces/parcoords/lines.js:516— exports.makeConstraints has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 4 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
handlePick (cognitive 20) src/traces/scatter3d/convert.js:42— handlePick has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
hoverOnBars (cognitive 20) src/traces/bar/hover.js:27— hoverOnBars has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 8, boolean chains 2 (nesting depth added 1). Of this number, 14 points are the body's own statements and 6 belong to 17 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.
clean_ticks.dtick (cognitive 19) src/plots/cartesian/clean_ticks.js:16— clean_ticks.dtick has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, 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.
plot_schema.findArrayAttributes::crawlIntoTrace (cognitive 19) src/plot_api/plot_schema.js:183— plot_schema.findArrayAttributes::crawlIntoTrace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (4 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
manage.isSelectable (cognitive 19) src/components/modebar/manage.js:282— manage.isSelectable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.isOnlyThisBinSelected (cognitive 19) src/components/selections/select.js:894— select.isOnlyThisBinSelected has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
domain.defaults (cognitive 19) src/plots/domain.js:100— domain.defaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.selectPoints (cognitive 19) src/traces/box/select.js:3— select.selectPoints has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
xy_defaults.handleXYDefaults (cognitive 19) src/traces/carpet/xy_defaults.js:5— xy_defaults.handleXYDefaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, 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.
geo_location_utils.extractTraceFeature (cognitive 19) src/lib/geo_location_utils.js:209— geo_location_utils.extractTraceFeature has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 3 (4 pts), match/switch 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hover.hoverPoints (cognitive 19) src/traces/choropleth/hover.js:8— hover.hoverPoints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (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.
layout_defaults.handleLayerDefaults (cognitive 19) src/plots/map/layout_defaults.js:66— layout_defaults.handleLayerDefaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 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.
bin_label_vals.getBinSpanLabelRound (cognitive 19) src/traces/histogram/bin_label_vals.js:24— bin_label_vals.getBinSpanLabelRound has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 61). 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.
helpers.swapXYData (cognitive 19) src/plot_api/helpers.js:346— helpers.swapXYData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plot_api._doPlot::drawFramework (cognitive 19) REDACTED:213— plot_api._doPlot::drawFramework has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (plot_api._doPlot) 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.
calc.calc (cognitive 19) src/traces/violin/calc.js:9— calc.calc 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). To reduce it, split the body into named stages: move each independent 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.convertStyle (cognitive 19) src/traces/scattergl/convert.js:34— convert.convertStyle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
select.select (cognitive 19) src/traces/scattergl/select.js:6— select.select has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, 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.
base_plot.makeGridData (cognitive 19) src/traces/splom/base_plot.js:91— base_plot.makeGridData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 8). 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.
defaults.supplyDefaults (cognitive 19) src/traces/scattermap/defaults.js:13— defaults.supplyDefaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, 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.
getExtendProperties (cognitive 19) REDACTED:804— getExtendProperties has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
formatJSDoc (cognitive 19) tasks/generate_schema_types.mjs:330— formatJSDoc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7 (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.
determineInsideTextFont (cognitive 19) src/traces/pie/plot.js:586— determineInsideTextFont has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
estimateAxisPaddingForText (cognitive 19) src/traces/bar/cross_trace_calc.js:785— estimateAxisPaddingForText has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 6, if/else 4 (6 pts) (nesting depth added 6). Of this number, 15 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.
drawOne::drawShape (cognitive 19) src/components/shapes/draw.js:112— drawOne::drawShape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (6 pts), boolean chains 5 (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.
exports.renderGLParcoords (cognitive 19) src/traces/parcoords/lines.js:579— exports.renderGLParcoords has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts), loops 2, 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.
nested_property.nestedProperty (cognitive 18) src/lib/nested_property.js:20— nested_property.nestedProperty has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.lib.subplotSort (cognitive 18) src/lib/index.js:1196— index.lib.subplotSort has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, 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.
index.drawing.textPointStyle (cognitive 18) src/components/drawing/index.js:1272— index.drawing.textPointStyle has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1284). 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.
plots.plots.cleanPlot (cognitive 18) src/plots/plots.js:696— plots.plots.cleanPlot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 3 (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.
axis_autotype.autoType (cognitive 18) src/plots/cartesian/axis_autotype.js:13— axis_autotype.autoType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
axes.syncTicks (cognitive 18) src/plots/cartesian/axes.js:1412— axes.syncTicks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sieve.Sieve (cognitive 18) src/traces/bar/sieve.js:21— sieve.Sieve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 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.
override_cursor.overrideCursor (cognitive 18) src/lib/override_cursor.js:14— override_cursor.overrideCursor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hoverlabel_defaults.handleHoverLabelDefaults (cognitive 18) src/components/fx/hoverlabel_defaults.js:7— hoverlabel_defaults.handleHoverLabelDefaults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
select.updateSelectedState (cognitive 18) src/components/selections/select.js:941— select.updateSelectedState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (7 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.
geo_location_utils.locationToFeature (cognitive 18) src/lib/geo_location_utils.js:47— geo_location_utils.locationToFeature has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 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.
geo.proto.updateBaseLayers (cognitive 18) src/plots/geo/geo.js:354— geo.proto.updateBaseLayers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, ternaries 3 (4 pts), boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 391, a function literal at line 411, a function literal at line 374, …). 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.
axis_aligned_line.default (cognitive 18) src/traces/carpet/axis_aligned_line.js:12— axis_aligned_line.default has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 14, if/else 2 (3 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
plot_api.restyle (cognitive 18) REDACTED:1286— plot_api.restyle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 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.
convert.convert (cognitive 18) src/traces/densitymap/convert.js:12— convert.convert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 4, 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.
hover.hoverPoints (cognitive 18) src/traces/splom/hover.js:8— hover.hoverPoints has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert.generateIsoMeshes::addCube (cognitive 18) src/traces/isosurface/convert.js:592— convert.generateIsoMeshes::addCube has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
find_locale_strings.findLocaleStrings (cognitive 18) tasks/find_locale_strings.js:21— find_locale_strings.findLocaleStrings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3 (nesting depth added 5). None of this is in the body itself: all 18 points belong to 2 function literals inside it that branch (lines 31, 22). 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.
anyCounterAxLineAtZero (cognitive 18) src/plots/cartesian/axes.js:4514— anyCounterAxLineAtZero has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (lineNearZero, lineNearZero::closeEnough). 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.
findMainSubplot (cognitive 18) src/plots/plots.js:861— findMainSubplot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
determineOutsideTextFont (cognitive 18) src/traces/pie/plot.js:527— determineOutsideTextFont has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 18. 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.
drawTexts (cognitive 18) src/components/legend/draw.js:561— drawTexts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_runCrossTraceCalc (cognitive 18) src/traces/sunburst/calc.js:241— _runCrossTraceCalc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.colorbarDefaults (cognitive 17) src/components/colorbar/defaults.js:13— defaults.colorbarDefaults has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 3, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
axes.makeAxisGroups (cognitive 17) src/plots/cartesian/axes.js:4630— axes.makeAxisGroups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cross_trace_calc.updatePositionAxis (cognitive 17) src/traces/bar/cross_trace_calc.js:501— cross_trace_calc.updatePositionAxis has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (8 pts), loops 3 (6 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helpers.getPathString (cognitive 17) src/components/shapes/helpers.js:193— helpers.getPathString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 24 (32 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. This shape REPEATS in the file: one other method here (helpers.getPathString::getConverter) 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.
draw.drawOne::drawSelection (cognitive 17) src/components/selections/draw.js:70— draw.drawOne::drawSelection has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.makeSubplotData (cognitive 17) src/plots/cartesian/index.js:481— index.makeSubplotData has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 3 (6 pts), boolean chains 3 (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.
polar.proto.updateAngularDrag (cognitive 17) src/plots/polar/polar.js:1303— polar.proto.updateAngularDrag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (moveFn, computeRotationUpdates). 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.
constraint_defaults.handleConstraintValueDefaults (cognitive 17) src/traces/contour/constraint_defaults.js:47— constraint_defaults.handleConstraintValueDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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.
plot.makeLinesAndLabels (cognitive 17) src/traces/contourcarpet/plot.js:136— plot.makeLinesAndLabels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 205). 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.
plot_api.storeCurrent (cognitive 17) REDACTED:1381— plot_api.storeCurrent has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), loops 2 (4 pts), if/else 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_defaults.handleAnnotationCommonDefaults (cognitive 17) src/components/annotations/common_defaults.js:7— common_defaults.handleAnnotationCommonDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calc_autorange.calcAutorange (cognitive 17) src/components/shapes/calc_autorange.js:10— calc_autorange.calcAutorange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 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.
draw.findDimensions (cognitive 17) src/components/updatemenus/draw.js:467— draw.findDimensions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (nesting depth added 1). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
compute_error.makeComputeError (cognitive 17) src/components/errorbars/compute_error.js:19— compute_error.makeComputeError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6 (nesting depth added 4). 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, split the body into named stages: move each independent 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.calc (cognitive 17) src/traces/scatterternary/calc.js:13— calc.calc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cross_trace_calc.crossTraceCalc (cognitive 17) src/traces/waterfall/cross_trace_calc.js:5— cross_trace_calc.crossTraceCalc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.handleAxisDefaults::fillAxisStashes (cognitive 17) src/traces/splom/defaults.js:102— defaults.handleAxisDefaults::fillAxisStashes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (defaults.handleAxisDefaults) 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.
defaults.supplyDefaults (cognitive 17) src/traces/treemap/defaults.js:15— defaults.supplyDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, 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.
parcats.dragDimensionEnd (cognitive 17) src/traces/parcats/parcats.js:1250— parcats.dragDimensionEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). 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.
extendTraces::updateArray (cognitive 17) REDACTED:933— extendTraces::updateArray has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prependTraces::updateArray (cognitive 17) REDACTED:989— prependTraces::updateArray has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diffData (cognitive 17) REDACTED:2789— diffData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 4). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawAngularGauge (cognitive 17) src/traces/indicator/plot.js:341— drawAngularGauge has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 6, boolean chains 4 (nesting depth added 2). Of this number, 10 points are the body's own statements and 7 belong to 14 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.
setCornerradius (cognitive 17) src/traces/bar/cross_trace_calc.js:135— setCornerradius has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 2 (5 pts), 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.
handleGeo (cognitive 17) src/components/modebar/buttons.js:622— handleGeo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (3 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.
plotOne (cognitive 17) src/traces/quiver/plot.js:78— plotOne has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 5. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 112, 206, 214, …). 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.
plots.emptySubplotLists (cognitive 16) src/plots/plots.js:494— plots.emptySubplotLists has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (8 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.
plots.plots.supplyDataDefaults (cognitive 16) src/plots/plots.js:897— plots.plots.supplyDataDefaults 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 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.
index.dragElement.init::onDone (cognitive 16) src/components/dragelement/index.js:190— index.dragElement.init::onDone has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 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.
line_grid_defaults.handleLineGridDefaults (cognitive 16) src/plots/cartesian/line_grid_defaults.js:17— line_grid_defaults.handleLineGridDefaults has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
helpers.fixDatesForPaths (cognitive 16) src/components/shapes/draw_newshape/helpers.js:329— helpers.fixDatesForPaths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 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.
helpers.getPathString::getConverter (cognitive 16) src/components/shapes/helpers.js:203— helpers.getPathString::getConverter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (helpers.getPathString) 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.
modebar.proto.createButton (cognitive 16) src/components/modebar/modebar.js:147— modebar.proto.createButton has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
select.makeFillRangeItems.<returned closure> (cognitive 16) src/components/selections/select.js:1502— select.makeFillRangeItems.<returned closure> has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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.
index.drawFramework (cognitive 16) src/plots/cartesian/index.js:388— index.drawFramework has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 4). Of this number, 9 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.
fillcolor_defaults.fillColorDefaults (cognitive 16) src/traces/scatter/fillcolor_defaults.js:15— fillcolor_defaults.fillColorDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (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.
calc.convertTickWidth (cognitive 16) src/traces/ohlc/calc.js:124— calc.convertTickWidth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 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.
map.proto.updateData (cognitive 16) src/plots/map/map.js:370— map.proto.updateData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 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.
get_map_fit_bounds.getMapFitBounds (cognitive 16) src/plots/map/get_map_fit_bounds.ts:29— get_map_fit_bounds.getMapFitBounds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, 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.
scene.proto.isCameraChanged (cognitive 16) src/plots/gl3d/scene.js:912— scene.proto.isCameraChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
defaults.handleAnnotationDefaults (cognitive 16) src/components/annotations/defaults.js:18— defaults.handleAnnotationDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convert_coords.convertCoords (cognitive 16) src/components/images/convert_coords.js:24— convert_coords.convertCoords has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, 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.
calc.crossTraceCalc (cognitive 16) src/traces/pie/calc.js:107— calc.crossTraceCalc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ternary.proto.adjustLayout (cognitive 16) src/plots/ternary/ternary.js:309— ternary.proto.adjustLayout has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 4, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
defaults.supplyDefaults (cognitive 16) src/traces/scattergeo/defaults.js:13— defaults.supplyDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (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.
convert.makeSymbolGeoJSON (cognitive 16) src/traces/scattermap/convert.js:276— convert.makeSymbolGeoJSON has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
base_plot.subplotUpdateFx (cognitive 16) src/traces/sankey/base_plot.js:44— base_plot.subplotUpdateFx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 85, 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.
hover.hoverPoints (cognitive 16) src/traces/scattercarpet/hover.js:6— hover.hoverPoints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). 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.
saveRangeInitial (cognitive 16) src/plots/cartesian/axes.js:385— saveRangeInitial has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 2 (6 pts), if/else 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildSubplotGroups (cognitive 16) tasks/generate_schema_types.mjs:891— buildSubplotGroups has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 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.
makeFillRangeItems (cognitive 16) src/components/selections/select.js:1501— makeFillRangeItems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 1502). 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.
clickOrDoubleClick (cognitive 16) src/components/legend/draw.js:516— clickOrDoubleClick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (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.
getStartStep (cognitive 16) src/traces/contour/find_all_paths.js:231— getStartStep has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling clique: index-basic.js, index-cartesian.js, index-finance.js, index-geo.js, index-gl2d.js, index-gl3d.js, index-strict.js lib/index-basic.js— 7 files — `lib/index-basic.js`, `lib/index-cartesian.js`, `lib/index-finance.js`, `lib/index-geo.js`, `lib/index-gl2d.js`, `lib/index-gl3d.js`, `lib/index-strict.js` — all change together with no explicit dependency: a fully-connected co-change clique, not 21 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Change-coupling hub: plot.js → attributes.js, calc.js, defaults.js src/traces/quiver/plot.js— `src/traces/quiver/plot.js` changes together with 3 other files — `src/traces/quiver/attributes.js`, `src/traces/quiver/calc.js`, `src/traces/quiver/defaults.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
No structured logging — No logging call was found in the 988 JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) 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.
Duplication concentrated across 47 sibling directories (202 clone groups) src/traces/icicle/draw_descendants.js:3— 202 duplicated blocks under src/traces/ have copies in at least two of the sibling directories bar, barpolar, box, candlestick, carpet, choropleth (+41 more sibling(s) not listed) — 170 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 202 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 202 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 202 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.
Duplication concentrated across 5 sibling directories (51 clone groups) src/plots/polar/polar.js:673— 51 duplicated blocks under src/ have copies in at least two of the sibling directories components, lib, plot_api, plots, traces — 28 of them are reported below, and 23 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 51 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 51 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 51 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.
Duplication concentrated across 10 sibling directories (22 clone groups) src/components/selections/draw_newselection/newselections.js:82— 22 duplicated blocks under src/components/ have copies in at least two of the sibling directories annotations, colorbar, images, legend, modebar, rangeselector (+4 more sibling(s) not listed) — 14 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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.
Duplication concentrated across 7 sibling directories (22 clone groups) src/plots/polar/index.js:9— 22 duplicated blocks under src/plots/ have copies in at least two of the sibling directories cartesian, geo, gl3d, map, polar, smith (+1 more sibling(s) not listed) — 17 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 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 22 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.
Wholesale file copy (131 identical lines × 2 files) src/traces/icicle/draw_descendants.js:3— src/traces/icicle/draw_descendants.js:3 · src/traces/treemap/draw_descendants.js:3 — these 2 files are line-for-line copies of one another — 131 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (82 matched lines × 2 locations) · ×1
Duplicated block with local edits (82 matched lines × 2 locations) src/traces/funnelarea/plot.js:37— src/traces/funnelarea/plot.js:37 · src/traces/pie/plot.js:33 — the two spans are one implementation copied and then locally edited — 736 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 (69 matched lines × 2 locations) · ×1
Duplicated block with local edits (69 matched lines × 2 locations) src/traces/cone/convert.js:12— src/traces/cone/convert.js:12 · src/traces/streamtube/convert.js:13 — the two spans are one implementation copied and then locally edited — 528 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 (68 matched lines × 2 locations) · ×1
Duplicated block with local edits (68 matched lines × 2 locations) src/traces/choroplethmap/plot.js:7— src/traces/choroplethmap/plot.js:7 · src/traces/densitymap/plot.js:6 — the two spans are one implementation copied and then locally edited — 509 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 (68 lines × 2 locations) src/traces/isosurface/convert.js:25— src/traces/isosurface/convert.js:25 · src/traces/volume/convert.js:14 — 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 (63 lines × 2 locations) src/components/fx/hover.js:2489— src/components/fx/hover.js:2489 · src/components/fx/hover.js:2568 — 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.
Wholesale file copy (63 identical lines × 2 files) src/traces/icicle/defaults.js:3— src/traces/icicle/defaults.js:3 · src/traces/treemap/defaults.js:3 — these 2 files are line-for-line copies of one another — 63 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Duplicated block (61 lines × 2 locations) src/traces/bar/plot.js:298— src/traces/bar/plot.js:298 · src/traces/bar/plot.js:396 — 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 (54 lines × 2 locations) src/traces/scattercarpet/attributes.js:62— src/traces/scattercarpet/attributes.js:62 · src/traces/scatterternary/attributes.js:90 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (53 lines × 2 locations) src/traces/table/attributes.js:38— src/traces/table/attributes.js:38 · src/traces/table/attributes.js:106 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (50 matched lines × 2 locations) · ×1
Duplicated block with local edits (50 matched lines × 2 locations) src/traces/contour/plot.js:202— src/traces/contour/plot.js:202 · src/traces/contourcarpet/plot.js:136 — the two spans are one implementation copied and then locally edited — 462 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 (46 lines × 2 locations) src/traces/scatterpolar/defaults.js:15— src/traces/scatterpolar/defaults.js:15 · src/traces/scattersmith/defaults.js:15 — 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 (39 matched lines × 2 locations) · ×1
Duplicated block with local edits (39 matched lines × 2 locations) src/plots/polar/index.js:9— src/plots/polar/index.js:9 · src/plots/smith/index.js:9 — 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.
Duplicated block (39 lines × 2 locations) src/traces/funnelarea/defaults.js:10— src/traces/funnelarea/defaults.js:10 · src/traces/pie/defaults.js:52 — 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 (36 lines × 2 locations) src/traces/scatterpolar/hover.js:5— src/traces/scatterpolar/hover.js:5 · src/traces/scattersmith/hover.js:5 — 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 (35 matched lines × 2 locations) · ×1
Duplicated block with local edits (35 matched lines × 2 locations) src/traces/choropleth/plot.js:25— src/traces/choropleth/plot.js:25 · src/traces/scattergeo/plot.js:70 — the two spans are one implementation copied and then locally edited — 274 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 (32 matched lines × 2 locations) · ×1
Duplicated block with local edits (32 matched lines × 2 locations) src/traces/carpet/create_i_derivative_evaluator.js:94— src/traces/carpet/create_i_derivative_evaluator.js:94 · src/traces/carpet/create_j_derivative_evaluator.js:39 — the two spans are one implementation copied and then locally edited — 318 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (31 matched lines × 2 locations) · ×1
Duplicated block with local edits (31 matched lines × 2 locations) src/components/selections/draw_newselection/newselections.js:82— src/components/selections/draw_newselection/newselections.js:82 · src/components/shapes/draw_newshape/newshapes.js:69 — the two spans are one implementation copied and then locally edited — 184 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 (29 lines × 2 locations) src/traces/funnel/layout_attributes.js:12— src/traces/funnel/layout_attributes.js:12 · src/traces/waterfall/layout_attributes.js:11 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (28 lines × 2 locations) src/traces/icicle/style.js:9— src/traces/icicle/style.js:9 · src/traces/sunburst/style.js:9 — 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 (26 matched lines × 2 locations) · ×1
Duplicated block with local edits (26 matched lines × 2 locations) src/traces/carpet/create_j_derivative_evaluator.js:18— src/traces/carpet/create_j_derivative_evaluator.js:18 · src/traces/carpet/create_j_derivative_evaluator.js:81 — the two spans are one implementation copied and then locally edited — 318 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 (26 lines × 2 locations) src/traces/choropleth/select.js:9— src/traces/choropleth/select.js:9 · src/traces/scattergeo/select.js:16 — 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.
Complex function _hover (cyclomatic 106, cognitive 162) src/components/fx/hover.js:292— _hover has cyclomatic complexity 106 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 (anonymous) (cyclomatic 104, cognitive 201) src/traces/heatmap/plot.js:34— (anonymous) has cyclomatic complexity 104 and cognitive complexity 201; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 _relayout (cyclomatic 93, cognitive 175) REDACTED:1892— _relayout has cyclomatic complexity 93 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 calcTicks (cyclomatic 91, cognitive 192) src/plots/cartesian/axes.js:997— calcTicks has cyclomatic complexity 91 and cognitive complexity 192; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 handleItemClick (cyclomatic 72, cognitive 166) src/components/legend/handle_click.js:22— handleItemClick has cyclomatic complexity 72 and cognitive complexity 166; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function _restyle (cyclomatic 65, cognitive 143) REDACTED:1420— _restyle has cyclomatic complexity 65 and cognitive complexity 143; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function createHoverText (cyclomatic 65, cognitive 132) src/components/fx/hover.js:1109— createHoverText has cyclomatic complexity 65 and cognitive complexity 132; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function supplyLayoutDefaults (cyclomatic 64, cognitive 106) src/plots/cartesian/layout_defaults.js:31— supplyLayoutDefaults has cyclomatic complexity 64 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 findHoverPoints (cyclomatic 58, cognitive 138) src/components/fx/hover.js:530— findHoverPoints has cyclomatic complexity 58 and cognitive complexity 138; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 singlePointStyle (cyclomatic 58, cognitive 77) src/components/drawing/index.js:889— singlePointStyle has cyclomatic complexity 58 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function calc (cyclomatic 57, cognitive 129) src/traces/box/calc.js:12— calc has cyclomatic complexity 57 and cognitive complexity 129; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 plot (cyclomatic 57, cognitive 103) src/traces/scattergl/plot.js:45— plot has cyclomatic complexity 57 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 positionCB (cyclomatic 56, cognitive 75) src/components/colorbar/draw.js:604— positionCB has cyclomatic complexity 56 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function crawl (cyclomatic 55, cognitive 119) REDACTED:108— crawl has cyclomatic complexity 55 and cognitive complexity 119; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function getDiffFlags (cyclomatic 54, cognitive 98) REDACTED:2915— getDiffFlags has cyclomatic complexity 54 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function makePath (cyclomatic 53, cognitive 116) src/traces/contour/find_all_paths.js:47— makePath has cyclomatic complexity 53 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function lsInner (cyclomatic 53, cognitive 82) src/plot_api/subroutines.js:48— lsInner has cyclomatic complexity 53 and cognitive complexity 82; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 supplyDefaults (cyclomatic 52, cognitive 59) src/plots/plots.js:197— supplyDefaults has cyclomatic complexity 52 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 cleanData (cyclomatic 51, cognitive 101) src/plot_api/helpers.js:169— cleanData has cyclomatic complexity 51 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 handleAxisDefaults (cyclomatic 50, cognitive 73) src/plots/cartesian/axis_defaults.js:42— handleAxisDefaults has cyclomatic complexity 50 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 updateSubplots (cyclomatic 49, cognitive 96) src/plots/cartesian/dragbox.js:878— updateSubplots has cyclomatic complexity 49 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 49, cognitive 95) src/traces/bar/plot.js:135— (anonymous) has cyclomatic complexity 49 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 makeLabelFns (cyclomatic 49, cognitive 68) src/plots/cartesian/axes.js:3369— makeLabelFns has cyclomatic complexity 49 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 plotDrag (cyclomatic 49, cognitive 66) src/plots/cartesian/dragbox.js:557— plotDrag has cyclomatic complexity 49 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 update (cyclomatic 47, cognitive 93) src/traces/surface/convert.js:423— update has cyclomatic complexity 47 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function plot (cyclomatic 47, cognitive 88) src/plots/gl3d/scene.js:558— plot has cyclomatic complexity 47 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 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 handleGeoDefaults (cyclomatic 47, cognitive 63) src/plots/geo/layout_defaults.js:23— handleGeoDefaults has cyclomatic complexity 47 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 crossTraceDefaults (cyclomatic 46, cognitive 98) src/traces/histogram/cross_trace_defaults.js:23— crossTraceDefaults has cyclomatic complexity 46 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function groupDefaults (cyclomatic 46, cognitive 69) src/components/legend/defaults.js:12— groupDefaults has cyclomatic complexity 46 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 drawOne (cyclomatic 46, cognitive 63) src/plots/cartesian/axes.js:2649— drawOne has cyclomatic complexity 46 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 linePoints (cyclomatic 44, cognitive 95) src/traces/scatter/line_points.js:15— linePoints has cyclomatic complexity 44 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 cleanLayout (cyclomatic 44, cognitive 67) src/plot_api/helpers.js:28— cleanLayout has cyclomatic complexity 44 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 calcHover (cyclomatic 44, cognitive 66) src/traces/scattergl/hover.js:113— calcHover has cyclomatic complexity 44 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 calc (cyclomatic 44, cognitive 62) src/traces/histogram/calc.js:18— calc has cyclomatic complexity 44 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 (anonymous) (cyclomatic 43, cognitive 93) src/plots/cartesian/axes.js:2926— (anonymous) has cyclomatic complexity 43 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function drawGraphicalElements (cyclomatic 42, cognitive 98) src/components/annotations/draw.js:261— drawGraphicalElements has cyclomatic complexity 42 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function calcAllAutoBins (cyclomatic 42, cognitive 76) src/traces/histogram/calc.js:242— calcAllAutoBins has cyclomatic complexity 42 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 handleSampleDefaults (cyclomatic 42, cognitive 59) src/traces/box/defaults.js:73— handleSampleDefaults has cyclomatic complexity 42 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 applyUIRevisions (cyclomatic 41, cognitive 103) REDACTED:2462— applyUIRevisions has cyclomatic complexity 41 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 merge (cyclomatic 41, cognitive 93) src/plots/gl3d/layout/convert.js:67— merge has cyclomatic complexity 41 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/plots/cartesian/axes.js · ×1
src/plots/cartesian/axes.js: 4185 lines of code src/plots/cartesian/axes.js:1— src/plots/cartesian/axes.js has 4185 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: 3320 lines of code REDACTED:1— REDACTED has 3320 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/plots/plots.js: 2605 lines of code src/plots/plots.js:1— src/plots/plots.js has 2605 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/components/fx/hover.js: 2417 lines of code src/components/fx/hover.js:1— src/components/fx/hover.js has 2417 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· src/traces/parcats/parcats.js · ×1
src/traces/parcats/parcats.js: 1879 lines of code src/traces/parcats/parcats.js:1— src/traces/parcats/parcats.js has 1879 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· src/components/drawing/index.js · ×1
src/components/drawing/index.js: 1684 lines of code src/components/drawing/index.js:1— src/components/drawing/index.js has 1684 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/plots/polar/polar.js: 1342 lines of code src/plots/polar/polar.js:1— src/plots/polar/polar.js has 1342 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· tasks/generate_schema_types.mjs · ×1
tasks/generate_schema_types.mjs: 1313 lines of code tasks/generate_schema_types.mjs:1— tasks/generate_schema_types.mjs has 1313 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· src/components/selections/select.js · ×1
src/components/selections/select.js: 1300 lines of code src/components/selections/select.js:1— src/components/selections/select.js has 1300 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/plots/cartesian/layout_attributes.js · ×1
src/plots/cartesian/layout_attributes.js: 1260 lines of code src/plots/cartesian/layout_attributes.js:1— src/plots/cartesian/layout_attributes.js has 1260 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/lib/index.js: 1197 lines of code src/lib/index.js:1— src/lib/index.js has 1197 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· src/plots/cartesian/dragbox.js · ×1
src/plots/cartesian/dragbox.js: 1194 lines of code src/plots/cartesian/dragbox.js:1— src/plots/cartesian/dragbox.js has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/traces/pie/plot.js: 1102 lines of code src/traces/pie/plot.js:1— src/traces/pie/plot.js has 1102 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/traces/bar/plot.js: 1037 lines of code src/traces/bar/plot.js:1— src/traces/bar/plot.js has 1037 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· src/traces/sankey/render.js · ×1
src/traces/sankey/render.js: 997 lines of code src/traces/sankey/render.js:1— src/traces/sankey/render.js has 997 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· src/components/legend/draw.js · ×1
src/components/legend/draw.js: 980 lines of code src/components/legend/draw.js:1— src/components/legend/draw.js has 980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/plots/gl3d/scene.js: 962 lines of code src/plots/gl3d/scene.js:1— src/plots/gl3d/scene.js has 962 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: 931 lines of code REDACTED:1— REDACTED has 931 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· src/plots/cartesian/set_convert.js · ×1
src/plots/cartesian/set_convert.js: 895 lines of code src/plots/cartesian/set_convert.js:1— src/plots/cartesian/set_convert.js has 895 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· src/traces/isosurface/convert.js · ×1
src/traces/isosurface/convert.js: 889 lines of code src/traces/isosurface/convert.js:1— src/traces/isosurface/convert.js has 889 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· src/components/colorbar/draw.js · ×1
src/components/colorbar/draw.js: 873 lines of code src/components/colorbar/draw.js:1— src/components/colorbar/draw.js has 873 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· src/traces/bar/cross_trace_calc.js · ×1
src/traces/bar/cross_trace_calc.js: 785 lines of code src/traces/bar/cross_trace_calc.js:1— src/traces/bar/cross_trace_calc.js has 785 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· src/traces/indicator/plot.js · ×1
src/traces/indicator/plot.js: 774 lines of code src/traces/indicator/plot.js:1— src/traces/indicator/plot.js has 774 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· src/plots/ternary/ternary.js · ×1
src/plots/ternary/ternary.js: 771 lines of code src/plots/ternary/ternary.js:1— src/plots/ternary/ternary.js has 771 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· src/components/modebar/buttons.js · ×1
src/components/modebar/buttons.js: 766 lines of code src/components/modebar/buttons.js:1— src/components/modebar/buttons.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/plots/map/map.js: 754 lines of code src/plots/map/map.js:1— src/plots/map/map.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.
src/traces/table/plot.js: 742 lines of code src/traces/table/plot.js:1— src/traces/table/plot.js has 742 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· src/plot_api/subroutines.js · ×1
src/plot_api/subroutines.js: 733 lines of code src/plot_api/subroutines.js:1— src/plot_api/subroutines.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.
R3 · Large Files· src/components/drawing/symbol_defs.js · ×1
src/components/drawing/symbol_defs.js: 728 lines of code src/components/drawing/symbol_defs.js:1— src/components/drawing/symbol_defs.js has 728 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/plots/geo/geo.js: 708 lines of code src/plots/geo/geo.js:1— src/plots/geo/geo.js has 708 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· src/traces/scatter/attributes.js · ×1
src/traces/scatter/attributes.js: 670 lines of code src/traces/scatter/attributes.js:1— src/traces/scatter/attributes.js has 670 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· src/components/annotations/draw.js · ×1
src/components/annotations/draw.js: 660 lines of code src/components/annotations/draw.js:1— src/components/annotations/draw.js has 660 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· src/components/shapes/draw.js · ×1
src/components/shapes/draw.js: 651 lines of code src/components/shapes/draw.js:1— src/components/shapes/draw.js has 651 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· src/traces/parcoords/parcoords.js · ×1
src/traces/parcoords/parcoords.js: 651 lines of code src/traces/parcoords/parcoords.js:1— src/traces/parcoords/parcoords.js has 651 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· src/components/legend/style.js · ×1
src/components/legend/style.js: 639 lines of code src/components/legend/style.js:1— src/components/legend/style.js has 639 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· src/traces/scattergl/convert.js · ×1
src/traces/scattergl/convert.js: 635 lines of code src/traces/scattergl/convert.js:1— src/traces/scattergl/convert.js has 635 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· src/plots/cartesian/autorange.js · ×1
src/plots/cartesian/autorange.js: 631 lines of code src/plots/cartesian/autorange.js:1— src/plots/cartesian/autorange.js has 631 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· src/plots/cartesian/index.js · ×1
src/plots/cartesian/index.js: 625 lines of code src/plots/cartesian/index.js:1— src/plots/cartesian/index.js has 625 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· src/traces/parcoords/lines.js · ×1
src/traces/parcoords/lines.js: 600 lines of code src/traces/parcoords/lines.js:1— src/traces/parcoords/lines.js has 600 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· src/traces/surface/convert.js · ×1
src/traces/surface/convert.js: 580 lines of code src/traces/surface/convert.js:1— src/traces/surface/convert.js has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~166 LoC) REDACTED— no import path from any entry point (132 application, 18 tooling, 184 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 (~94 LoC) tasks/shard_jasmine_tests.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~85 LoC) lib/locales/pt-br.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~84 LoC) lib/locales/hr.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~81 LoC) lib/locales/sv.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~76 LoC) lib/locales/sw.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~74 LoC) lib/locales/zh-cn.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~72 LoC) lib/locales/ko.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~63 LoC) lib/locales/nl.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~58 LoC) lib/index-strict.js— no import path from any entry point (132 application, 18 tooling, 184 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 (~30 LoC) lib/locales/vi.js— no import path from any entry point (132 application, 18 tooling, 184 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
Unused dependency 'assert' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'box-intersect' — Declared in stackgl_modules/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.
Unused dependency 'gl-axes3d' — Declared in stackgl_modules/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.
Unused dependency 'gl-shader' — Declared in stackgl_modules/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.
Unused dependency 'gl-spikes3d' — Declared in stackgl_modules/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.
Unused dependency 'glslify' — Declared in stackgl_modules/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.
Unused dependency 'incremental-convex-hull' — Declared in stackgl_modules/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.
Unused dependency 'is-mobile' — Declared in stackgl_modules/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.
Unused dependency 'matrix-camera-controller' — Declared in stackgl_modules/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.
Unused dependency 'ndarray-extract-contour' — Declared in stackgl_modules/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.
Unused dependency 'ndarray-gradient' — Declared in stackgl_modules/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.
Unused dependency 'ndarray-ops' — Declared in stackgl_modules/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.
Unused dependency 'ndarray-pack' — Declared in stackgl_modules/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.
Unused dependency 'ndarray-sort' — Declared in stackgl_modules/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.
Unused dependency 'right-now' — Declared in stackgl_modules/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.
Unused dependency 'robust-determinant' — Declared in stackgl_modules/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.
Unused dependency 'robust-in-sphere' — Declared in stackgl_modules/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.
Unused dependency 'robust-linear-solve' — Declared in stackgl_modules/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.
Unused dependency 'robust-orientation' — Declared in stackgl_modules/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.
Unused dependency 'simplicial-complex-contour' — Declared in stackgl_modules/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.
Unused dependency 'surface-nets' — Declared in stackgl_modules/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.
Unused dependency 'vectorize-text' — Declared in stackgl_modules/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.
Unused dependency 'zero-crossings' — Declared in stackgl_modules/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.
Orphaned file src/traces/isosurface/convert.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/indicator/plot.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/annotations/draw.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/plots/cartesian/index.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/scatter/attributes.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/drawing/symbol_defs.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/plots/cartesian/autorange.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/contour/plot.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/sunburst/plot.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/sliders/draw.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/surface/convert.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/updatemenus/draw.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/parcoords/axisbrush.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/scatter/line_points.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/treemap/plot_one.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/annotations/attributes.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/plots/layout_attributes.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/contourcarpet/plot.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/box/attributes.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/parcats/calc.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/carpet/axis_attributes.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/components/grid/index.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/traces/box/calc.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/plots/cartesian/layout_defaults.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate src/traces/quiver/plot.js:34— `!!transitionOpts && transitionOpts.duration > 0` appears character-identically in 2 files — src/traces/quiver/plot.js, src/traces/scatter/plot.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 src/traces/parcats/defaults.js:85— `!Array.isArray(dimensions) || !dimensions.length` appears character-identically in 2 files — src/traces/parcats/defaults.js, src/traces/parcoords/defaults.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 src/traces/contourcarpet/calc.js:20— `!carpet || !carpet.visible || carpet.visible === 'legendonly'` appears character-identically in 2 files — src/traces/contourcarpet/calc.js, src/traces/scattercarpet/calc.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 src/traces/sunburst/plot.js:31— `!fullLayout.uniformtext.mode && helpers.hasTransition(transitionOpts)` appears character-identically in 3 files — src/traces/sunburst/plot.js, src/traces/treemap/draw.js, src/traces/treemap/plot_one.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 src/traces/icicle/defaults.js:23— `!labels || !labels.length || !parents || !parents.length` appears character-identically in 3 files — src/traces/icicle/defaults.js, src/traces/sunburst/defaults.js, src/traces/treemap/defaults.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 src/traces/scattercarpet/hover.js:8— `!scatterPointData || scatterPointData[0].index === false` appears character-identically in 5 files — src/traces/scattercarpet/hover.js, src/traces/scatterpolar/hover.js, src/traces/scatterpolargl/hover.js, src/traces/scattersmith/hover.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 src/traces/funnel/plot.js:36— `!trace.connector || !trace.connector.visible` appears character-identically in 2 files — src/traces/funnel/plot.js, src/traces/waterfall/plot.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 src/traces/funnelarea/defaults.js:23— `!traceOut._hasLabels && traceOut._hasValues` appears character-identically in 2 files — src/traces/funnelarea/defaults.js, src/traces/pie/defaults.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 src/traces/cone/defaults.js:22— `!u || !u.length || !v || !v.length || !w || !w.length || !x || !x.length || !y || !y.length || !z || !z.length` appears character-identically in 2 files — src/traces/cone/defaults.js, src/traces/streamtube/defaults.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 src/components/annotations/convert_coords.js:23— `(newType === 'linear') && (ax.type === 'log')` appears character-identically in 2 files — src/components/annotations/convert_coords.js, src/components/images/convert_coords.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 src/components/annotations/convert_coords.js:22— `(newType === 'log') && (ax.type === 'linear')` appears character-identically in 2 files — src/components/annotations/convert_coords.js, src/components/images/convert_coords.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 src/traces/choropleth/defaults.js:25— `(typeof geojson === 'string' && geojson !== '') || Lib.isPlainObject(geojson)` appears character-identically in 2 files — src/traces/choropleth/defaults.js, src/traces/scattergeo/defaults.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 src/traces/bar/defaults.js:120— `Array.isArray(textposition) || textposition === 'auto'` appears character-identically in 2 files — src/traces/bar/defaults.js, src/traces/pie/defaults.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 src/traces/icicle/style.js:30— `Lib.castOption(trace, ptNumber, 'marker.line.color') || Color.defaultLine` appears character-identically in 3 files — src/traces/icicle/style.js, src/traces/sunburst/style.js, src/traces/treemap/style.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 src/traces/icicle/style.js:31— `Lib.castOption(trace, ptNumber, 'marker.line.width') || 0` appears character-identically in 3 files — src/traces/icicle/style.js, src/traces/sunburst/style.js, src/traces/treemap/style.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 src/plots/cartesian/dragbox.js:1217— `SHOWZOOMOUTTIP && gd.data && gd._context.showTips` appears character-identically in 2 files — src/plots/cartesian/dragbox.js, src/plots/ternary/ternary.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 src/plots/cartesian/autorange.js:81— `autorange === 'reversed' || autorange === 'min reversed' || autorange === 'max reversed'` appears character-identically in 3 files — src/plots/cartesian/autorange.js, src/plots/cartesian/autorange_options_defaults.js, src/plots/cartesian/set_convert.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 src/plots/cartesian/autorange.js:258— `ax._id !== plotinfo.xaxis._id && ax._id !== plotinfo.yaxis._id` appears character-identically in 2 files — src/plots/cartesian/autorange.js, src/plots/cartesian/axes.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 src/components/modebar/buttons.js:340— `ax._rangeInitial0 === undefined && ax._rangeInitial1 === undefined` appears character-identically in 3 files — src/components/modebar/buttons.js, src/plots/cartesian/axes.js, src/plots/cartesian/dragbox.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 src/components/rangeslider/helpers.js:49— `ax.title.text.match(svgTextUtils.BR_TAG_ALL) || []` appears character-identically in 2 files — src/components/rangeslider/helpers.js, src/plots/cartesian/axes.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 src/components/fx/hover.js:2716— `ax.type === 'category' || ax.type === 'multicategory'` appears character-identically in 4 files — src/components/fx/hover.js, src/components/shapes/calc_autorange.js, src/components/shapes/defaults.js, src/plots/cartesian/axes.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 src/plots/cartesian/axis_defaults.js:90— `axType === 'category' || axType === 'multicategory'` appears character-identically in 2 files — src/plots/cartesian/axis_defaults.js, src/plots/cartesian/tick_value_defaults.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 src/plots/polar/polar.js:1078— `clickMode.indexOf('select') > -1 && numClicks === 1` appears character-identically in 2 files — src/plots/polar/polar.js, src/plots/ternary/ternary.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 src/plots/cartesian/axis_defaults.js:50— `containerOut.type || axTemplate.type || '-'` appears character-identically in 2 files — src/plots/cartesian/axis_defaults.js, src/plots/cartesian/range_defaults.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 src/traces/icicle/draw_descendants.js:173— `formatSliceLabel(pt, entry, trace, cd, fullLayout) || ''` appears character-identically in 2 files — src/traces/icicle/draw_descendants.js, src/traces/treemap/draw_descendants.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.
redundant comment src/components/drawing/index.js:1271— "draw text at points" repeats the code it sits on: 3 of its 3 words (draw, text, points) are already in `drawing.textPointStyle = function (s, trace, gd)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/legend/get_legend_data.js:86— "collapse all groups into one if all groups are blank" repeats the code it sits on: 3 of its 3 words (collapse, groups, blank) are already in `var shouldCollapse = !hasOneNonBlankGroup || !grouped;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/legend/handle_click.js:316— "isolate this legend or set all legends to visible" repeats the code it sits on: 4 of its 5 words (legend, set, legends, visible) are already in `const anyVisibleElsewhere = allLegendItems.some(function (item)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/modebar/share_chart/dialog.js:135— "Build the dialog box and append it to the overlay" repeats the code it sits on: 4 of its 5 words (build, dialog, box, overlay) are already in `buildDialogBox(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/rangeslider/draw.js:205— "setup drag element" repeats the code it sits on: 3 of its 3 words (setup, drag, element) are already in `setupDragElement(rangeSlider, gd, axisOpts, opts);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/shapes/display_labels.js:20— "If no label text or texttemplate, return" repeats the code it sits on: 4 of its 5 words (label, text, texttemplate, return) are already in `if (!(options.label.text || options.label.texttemplate)) return;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/updatemenus/constants.ts:48— "Gap between header and buttons" repeats the code it sits on: 3 of its 3 words (gap, header, buttons) are already in `export const gapButtonHeader = 5;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/components/updatemenus/draw.js:599— "set item positions (mutates posOpts)" repeats the code it sits on: 5 of its 6 words (set, item, positions, pos, opts) are already in `function setItemPosition(item, menuOpts, posOpts, overrideOpts)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/lib/slugify.js:60— "Replace any remaining whitespace with the word sep char" repeats the code it sits on: 5 of its 6 words (replace, whitespace, word, sep, char) are already in `.replace(WHITESPACE_REGEX, WORD_SEP_CHAR)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:153— "save initial show spikes once per graph" repeats the code it sits on: 5 of its 6 words (save, initial, show, spikes, graph) are already in `if (graphWasEmpty) Axes.saveShowSpikeInitial(gd);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:677— "check that gd has attribute 'data' and 'data' is array" repeats the code it sits on: 4 of its 5 words (check, gd, data, array) are already in `if (!Array.isArray(gd.data))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment REDACTED:713— "check that gd has attribute 'data' and 'data' is array" repeats the code it sits on: 4 of its 5 words (check, gd, data, array) are already in `if (!Array.isArray(gd.data))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plot_api/plot_template.js:84— "cycle through traces in the template set for this type" repeats the code it sits on: 4 of its 5 words (traces, template, set, type) are already in `var typei = traceCounts[traceType] % typeTemplates.length;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plot_api/to_image.js:90— "extend config for static plot" repeats the code it sits on: 4 of its 4 words (extend, config, static, plot) are already in `var configImage = Lib.extendFlat({}, config, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plots/geo/constants.ts:244— "locationmode to layer name" repeats the code it sits on: 3 of its 3 words (locationmode, layer, name) are already in `export const locationmodeToLayer = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plots/geo/zoom.js:72— "zoom for scoped projections" repeats the code it sits on: 3 of its 3 words (zoom, scoped, projections) are already in `function zoomScoped(geo, projection)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plots/plots.js:381— 5 comments in this file only repeat the code they sit on (lines 381, 384, 400, 2784, 2970), for example "remove bgLayer". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/plots/polar/polar.js:268— "'inner' radius in px (when polar.hole is set)" repeats the code it sits on: 5 of its 6 words (inner, radius, polar, hole, set) are already in `var innerRadius = _this.innerRadius = _this.getHole(polarLayout) * radius;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/traces/isosurface/convert.js:889— "insert grid points" repeats the code it sits on: 3 of its 3 words (insert, grid, points) are already in `insertGridPoints();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/traces/parcats/calc.js:422— "Increment count for this item" repeats the code it sits on: 3 of its 3 words (increment, count, item) are already in `uniqueValueCounts[item]++;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/traces/parcats/parcats.js:1236— "Update view models" repeats the code it sits on: 3 of its 3 words (update, view, models) are already in `updateDimensionViewModels(d.parcatsViewModel);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/traces/parcats/parcats.js:1766— "Create path models" repeats the code it sits on: 3 of its 3 words (create, path, models) are already in `var pathViewModels = new Array(pathModels.length);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment src/traces/quiver/plot.js:107— "Adjust scale factor if arrowref is 'paper'" repeats the code it sits on: 4 of its 5 words (scale, factor, arrowref, paper) are already in `const scaleFactor = (arrowref === 'paper') ? trace._scaleFactor * Math.sqrt(Math.abs(xa._m * ya._m)) : trace._scaleFacto …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment tasks/pretest.js:9— "Make artifact folders for image tests" repeats the code it sits on: 4 of its 5 words (make, folders, image, tests) are already in `function makeTestImageFolders()`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment test/jasmine/tests/drawing_test.js:40— "append <base> with href" repeats the code it sits on: 3 of its 3 words (append, base, href) are already in `var base = d3Select('body')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Deprecated: inflight REDACTED:4513— inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:5101— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:5391— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:5884— glob 8.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: prebuild-install REDACTED:6228— prebuild-install 7.1.3 is resolved in REDACTED and is marked deprecated by its publisher: "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: rimraf REDACTED:6641— rimraf 3.0.2 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:6676— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: glob REDACTED:1478— glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: inflight REDACTED:1834— inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: read-package-json REDACTED:2553— read-package-json 2.1.2 is resolved in REDACTED and is marked deprecated by its publisher: "This package is no longer supported. Please use @npmcli/package-json instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Deprecated: geographiclib REDACTED:570— geographiclib 1.48.0 is resolved in REDACTED and is marked deprecated by its publisher: "This package has been split into geographic-geodesic + geographiclib-dms; use one or both of these instead of geographiclib. WARNING: there's a potential buffer overrun on this package. SWITCH TO THE NEW PACKAGES NOW.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 30 significant file(s) lose their only recent owner: tasks/generate_schema_types.mjs, src/traces/scattergl/convert.js, src/plots/geo/zoom.js, src/components/color/index.js, REDACTED, tasks/sync_packages.js, src/plots/geo/constants.ts, src/plots/geo/layout_defaults.js (+22 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: src/traces/bar/cross_trace_calc.js, src/plot_api/template_api.js, src/fonts/ploticon.js, src/components/fx/helpers.js, src/plots/map/layers.js, src/traces/parcoords/plot.js, src/lib/events.js, src/lib/slugify.js (+1 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: src/plots/cartesian/constraints.js, src/traces/splom/plot.js, src/plots/cartesian/position_defaults.js. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file src/plots/map/styles/arcgis-sat-hybrid.js:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file src/plots/gl3d/scene.js:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file src/traces/table/plot.js:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Outdated (npm): @types/d3 package.json:96— @types/d3 is pinned at 3.5.53; registry.npmjs.org publishes 7.4.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (48 single-owned of 368 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 368 of the 992 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/plots/ternary/layout_attributes.js, src/traces/contour/convert_to_constraints.js, src/traces/parcats/parcats.js, src/components/modebar/modebar.js, src/components/shapes/draw_newshape/newshapes.js, src/lib/notifier.js.
No ADRs found package.json:78— 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 78).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (126428 LoC, 640 module-visible types across 92 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Concentrated knowledge decay — 259 of 419 significant files have no living knowledge, while the repository is still being changed at a low rate (384 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 259 separate risks. Counted over 419 of the 992 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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 .github/workflows/check-draftlog.yml:4— No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 6 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 package.json:87— `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 app-layer HTTPS enforcement detected devtools/regl_codegen/server.mjs:67— `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.)
Hand-rolled JSON/XML parsing via regex src/traces/table/plot.js:528— 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 (npm): @plotly/point-cluster — @plotly/point-cluster is pinned at 3.1.9; registry.npmjs.org publishes 4.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): buffer — buffer is pinned at 5.7.1; registry.npmjs.org publishes 6.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-force — d3-force is pinned at 1.2.1; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-format — d3-format is pinned at 1.4.5; registry.npmjs.org publishes 3.1.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-geo — d3-geo is pinned at 1.12.1; registry.npmjs.org publishes 3.1.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-geo-projection — d3-geo-projection is pinned at 2.9.0; registry.npmjs.org publishes 4.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-hierarchy — d3-hierarchy is pinned at 1.1.9; registry.npmjs.org publishes 3.1.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-interpolate — d3-interpolate is pinned at 3.0.1; registry.npmjs.org publishes 3.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-time — d3-time is pinned at 1.1.0; registry.npmjs.org publishes 3.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): d3-time-format — d3-time-format is pinned at 2.3.0; registry.npmjs.org publishes 4.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): maplibre-gl — maplibre-gl is pinned at 6.11.2; registry.npmjs.org publishes 6.18.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): ndarray — ndarray is pinned at 1.1.0; registry.npmjs.org publishes 1.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
Outdated (npm): probe-image-size — probe-image-size is pinned at 7.4.0; registry.npmjs.org publishes 7.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
doc comments repeat the names src/components/shapes/calc_autorange.js:59— 3 of 355 documented parameters and 10 of 278 summaries in `plotly.js` only repeat the member or parameter name (e.g. "shape object" for `shape`). 19 documentation tag(s) are empty. 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 19 file(s) — `lib/index.d.ts`, `src/components/modebar/attributes.ts`, `src/components/shapes/constants.ts`, `src/components/updatemenus/constants.ts`, `src/constants/alignment.ts`, … (+14 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1dd79-ba4c-7cb8-9527-68b303f870f0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 7 · Warnings: 1479 · Recommendations: 356 · Info: 14 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 04:31 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.