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

Leonxlnx/athenaion

Measured 17 November 2026, 03:32 UTC, at code version 9b8bd23

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

Code coverage is not measured: Suite not runnable in-image.

CAI score 39.8out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A medium codebase: 43,271 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Code Health, 26.3

Findings by how serious they are

2 critical 670 serious 46 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

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

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

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

51of 51 dimensions measured by tools.
709of 718 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
51dimensions across 6 lenses, read from 43,271 lines of product code in 1 project.
Chapters

Executive summary

Leonxlnx/athenaion falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 39.8 out of 100 and is rated Weak, and neither of its two critical findings concerns security.

Code Health, at 26.3, is the weakest lens and counts most in the score. The best first steps are adding type checking and simplifying the most tangled functions, each worth about 4.4 points. Raising Code Health to 70 would lift the score to about 50.8.

The two loops of files that import each other need breaking.

The product code is 43,271 lines, about €37,000 to rebuild.

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

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

If Code Health rose from 26.3 to 70, the lowest score rated Strong, the score would rise from 39.8 to about 50.8.

Code composition: what the lines of code are
Product code 100%Tests 0%
Rebuild cost: about €37,000 · Estimate
Cost to rebuild€12,000 to €62,000, for 204 to 648 hours of work, about 0.3 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 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.
SizeMedium: 43,271 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 4.4 points · Medium effort · Type Safety
2
Resolve the 40 finding(s) in Cyclomatic Complexity.
Raises the score by about 4.4 points · Medium effort · Cyclomatic Complexity
3
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 3.9 points · Medium effort · CI/CD gates

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €37,000 to build again, about 0.3 person-years of work. Its weakest lens is Code Health, at 26.3 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 4.4 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
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 43,757 lines over the last 90 days, which is about 177,459 lines a year. At that pace, the extra work comes to an estimated 22.2 to 133.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

At a glance — Code Health · 26.3 · Weak · gated by D1, D2, R1, R2, R3 ·

At a glance — Architecture · 87.6 · Strong ·

At a glance — Maturity · 59.1 · Adequate · gated by M2 ·

At a glance — Readiness · 34.5 · Weak · gated by R6, P1, P3 ·

At a glance — Security · 98.3 · Exemplary ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection1Medium

Roadmap

Top priorities: Bring the 263 bodies over 15 down to 15 or less in Cognitive Complexity — start with scatterWorld (cognitive 746), buildChain (cognitive 497), voxel.meshChunk (cognitive 346); Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Resolve the 40 finding(s) in Cyclomatic Complexity.

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

Do thisHelpsEffortDimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+4.4 ptsMediumType Safety
Resolve the 40 finding(s) in Cyclomatic Complexity.+4.4 ptsMediumCyclomatic Complexity
Add a CI workflow that builds and runs the test suite on every push/PR.+3.9 ptsMediumCI/CD gates
Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+3.9 ptsMediumSecurity & performance tooling
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.+3.9 ptsMediumTooling
Bring the 263 bodies over 15 down to 15 or less in Cognitive Complexity — start with scatterWorld (cognitive 746), buildChain (cognitive 497), voxel.meshChunk (cognitive 346).+6.8 ptsHighCognitive Complexity
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.6 ptsMediumAsync & latency hygiene
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.+2.3 ptsMediumArchitecture documentation

File quality

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

FileScoreBandWorst signal
src/vegetation/scatter.js7.0MixedCyclomatic Complexity: scatterWorld (cyclomatic 273)
src/aqueducts/arcade.js7.0MixedCyclomatic Complexity: buildStructure (cyclomatic 106)
src/arch/temple.js7.0MixedCyclomatic Complexity: peripteralTemple (cyclomatic 97)
src/modules/flora.js7.0MixedCyclomatic Complexity: scatterCover (cyclomatic 91)
src/acropolis/stair.js7.0MixedCyclomatic Complexity: buildLanding (cyclomatic 42)
src/city/landmarks.js7.0MixedCyclomatic Complexity: landmarks.placeLandmarks (cyclomatic 39)
src/arch/geom.js7.0MixedCyclomatic Complexity: sweep (cyclomatic 35)
src/modules/statues.js7.0MixedCyclomatic Complexity: statues.build (cyclomatic 34)
src/modules/waterfalls.js7.0MixedCyclomatic Complexity: build (cyclomatic 95)
src/sculpt/figure.js7.0MixedCyclomatic Complexity: makeFigure (cyclomatic 80)
src/arch/entablature.js7.0MixedCyclomatic Complexity: doricRun (cyclomatic 62)
src/acropolis/podium.js7.0MixedCyclomatic Complexity: buildPodium (cyclomatic 59)
src/acropolis/buildings.js7.0MixedCyclomatic Complexity: buildPlatform (cyclomatic 49)
src/terrain/erosion.js7.0MixedCyclomatic Complexity: droplets (cyclomatic 33)
src/ruins/columns.js7.0MixedCyclomatic Complexity: drumSDF (cyclomatic 23)
src/terrain/voxel.js7.0MixedCyclomatic Complexity: meshChunk (cyclomatic 114)
src/modules/city.js7.0MixedCyclomatic Complexity: build (cyclomatic 76)
src/acropolis/houses.js7.0MixedCyclomatic Complexity: houses.buildHouse (cyclomatic 69)
src/world/heightfield.js7.0MixedCyclomatic Complexity: heightfield.acropolis (cyclomatic 18)
src/acropolis/walls.js7.1MixedCyclomatic Complexity: buildChain (cyclomatic 208)

How the grades work

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

Critical — 2

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

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

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 51 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

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

What we checked — 51 dimensions across the health lenses
D1D2D3D4D6D12D13D14D15D19D24D27D28D29D30D35D43D44AX10AX3AX4GD1IC1M1M2M3M4P1P3PF3R1R10R2R3R4R5R6R7R8R9X1X12X16X18X2X21X25X28X29X3X30

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e790-5c3b-78eb-9bce-cec770137855.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 0% of production LoC (42 test / 43,271 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
  • D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 2 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 2 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D20 ADR Quality — 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 ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. Read, stating neither a host nor a published package: `package.json`.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — 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. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (43271 LoC, 206 module-visible types across 20 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D34 Knowledge Freshness — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits to judge knowledge freshness (2 commit(s) sampled).
  • D35 Change Coupling — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 2 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
  • 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 serve`) 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: "> athenaion@0.1.0 serve / > node REDACTED / Serving <repo> at http://localhost:8080/" 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 (serve). the dev server (`npm run serve`) 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: "> athenaion@0.1.0 serve / > node REDACTED / Serving <repo> at http://localhost:8080/" No runtime evidence was gathered.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 43 further occurrence(s) are not listed individually; the score already reflects all 83.
  • 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. 220 further occurrence(s) are not listed individually; the score already reflects all 260.
  • 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. 4 further occurrence(s) are not listed individually; the score already reflects all 44.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 171 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.

Dimensions

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

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

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

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

337 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was scatterWorld at 273.

scatterWorld::place (cyclomatic 43) · ×2src/vegetation/scatter.js:212
growOlive::grow (cyclomatic 33) · ×2src/flora/olive.js:115
build (cyclomatic 30) · ×2src/modules/banners.js:65
scatterWorld (cyclomatic 273)src/vegetation/scatter.js:47
buildChain (cyclomatic 208)src/acropolis/walls.js:112

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

What to do

  1. Bring the 22 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with scatterWorld (cyclomatic 273), buildChain (cyclomatic 208), build (cyclomatic 191). — 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.

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

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

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

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

489 method(s) exceeded the cognitive complexity threshold of 15; the worst was scatterWorld at 746.

growOlive::grow (cognitive 61) · ×2src/flora/olive.js:115
buildColossusBastion::face (cognitive 46) · ×2src/acropolis/bastion.js:141
scatterWorld::place (cognitive 43) · ×2src/vegetation/scatter.js:212
scatter.scatterWorld::excluded (cognitive 20) · ×2src/vegetation/scatter.js:87
scatterWorld (cognitive 746)src/vegetation/scatter.js:47

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

What to do

  1. Bring the 263 bodies over 15 down to 15 or less in Cognitive Complexity — start with scatterWorld (cognitive 746), buildChain (cognitive 497), voxel.meshChunk (cognitive 346). — 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 263 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.

D3 · God Classes5.1 / 10Adequate✓ Tool-verified

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

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

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

48 over-large unit(s) detected — types, modules or files that carry too much.

FunctionTooLong: scatter.scatterWorld · ×39src/vegetation/scatter.js:47
FileTooLong: modules/flora.js · ×7src/modules/flora.js
MethodTooLong: Pipeline.constructor · ×2src/core/pipeline.js:146

What to do

  1. Resolve the 39 FunctionTooLong finding(s) in God Classes — start with figure.js (2), waterfalls.js (2), arcade.js (2). — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 7 FileTooLong finding(s) in God Classes — start with flora.js, statues.js, heightfield.js. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 2 MethodTooLong finding(s) in God Classes — start with pipeline.js, banner.js. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

0 duplicated block group(s) detected. 0.0 % of the production lines (0 of 43,271) are in a reported copy.

✓ On the Gold path — maintain.

Detailed fixes: d4_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

0 of 43 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D12 · Dependency Hygiene9.9 / 10Exemplary✓ Tool-verified

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

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

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

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

Outdated (npm): puppeteer-core · ×2

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D24 · Comment Value10.0 9.5 / 10Exemplary✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 96% · ceiling Documented

1 of 1985 judged comments only repeat the code they sit on (0.1 %). 144 comment(s) in another language or script were not judged.

redundant commentsrc/water/surface.js:434
doc comments repeat the namessrc/arch/temple.js:260

✓ On the Gold path — maintain.

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)9.5 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

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

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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.

IC1 · Incompleteness & stubs6.2 / 10Adequate✓ Tool-verified

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

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

  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×17) — src/acropolis/stair.js:357, src/arch/entablature.js:163, src/arch/ornament.js:206, …
  • `build` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×3) — src/modules/aqueducts.js:117, src/modules/clouds.js:537, src/modules/sets.js:24

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.
M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

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

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

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

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

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

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

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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

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

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `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:10

What to do

  • Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `fs.existsSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/bake/head.js:15
  • `fs.readdirSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/bake/head.js:25
  • `fs.unlinkSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/bake/head.js:25
  • `fs.openSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:38
  • `fs.writeSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:38
  • `fs.closeSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:38
  • `fs.readFileSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:42
  • `fs.rmSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:42
  • `fs.mkdirSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:100
  • `fs.writeFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:101
  • `fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:104
  • `execFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/session.mjs:106

What to do

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

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

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

  • 0 typed · 183 plain JS — the untyped files are src/acropolis/arcade.js, src/acropolis/balustrade.js, src/acropolis/bastion.js, src/acropolis/bridge.js, src/acropolis/buildings.js, src/acropolis/cliffdress.js (+177 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication8.7 / 10Strong✓ Tool-verified

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

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

  • 28 duplicated blocks under src/ have copies in at least two of the sibling directories acropolis, arch, city, core, flora, materials (+10 more sibling(s) not listed) — 21 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 28 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 28 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 28 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/ruins/sdf.js:37
  • src/arch/temple.js:257 · src/arch/temple.js:450 — the two spans are one implementation copied and then locally edited — 706 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/arch/temple.js:257
  • src/flora/surface.js:39 · src/flora/surface.js:141 — the two spans are one implementation copied and then locally edited — 582 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/flora/surface.js:39
  • src/water/churn.js:90 · src/water/mist.js:212 — 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/water/churn.js:90
  • src/props/brazier.js:51 · src/props/urn.js:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/props/brazier.js:51
  • src/ruins/sdf.js:37 · src/sculpt/head.js:539 — the two spans are one implementation copied and then locally edited — 289 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/ruins/sdf.js:37
  • src/city/fleet.js:34 · src/city/fleet.js:165 — the two spans are one implementation copied and then locally edited — 355 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/city/fleet.js:34
  • src/arch/geom.js:480 · src/sculpt/sdf.js:137 — the two spans are one implementation copied and then locally edited — 241 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/arch/geom.js:480
  • src/acropolis/geo.js:103 · src/arch/geom.js:117 — the two spans are one implementation copied and then locally edited — 147 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/acropolis/geo.js:103
  • src/modules/statues.js:667 · src/modules/statues.js:696 — 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/modules/statues.js:667
  • src/ruins/sdf.js:72 · src/sculpt/bakeutil.js:73 — 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/ruins/sdf.js:72
  • tools/render-video.mjs:43 · tools/session.mjs:30 — the two spans are one implementation copied and then locally edited — 197 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — tools/render-video.mjs:43
  • src/props/lamp.js:66 · src/props/urn.js:72 — 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/props/lamp.js:66
  • src/water/flow.js:14 · src/world/heightfield.js:37 — the two spans are one implementation copied and then locally edited — 232 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/water/flow.js:14
  • src/core/pipeline.js:171 · src/core/pipeline.js:219 — 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/core/pipeline.js:171
  • src/props/brazier.js:113 · src/props/urn.js:61 — 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/props/brazier.js:113
  • src/props/brazier.js:125 · src/props/lamp.js:66 · src/props/urn.js:72 — the 3 copies are spread across 3 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/props/brazier.js:125
  • src/sculpt/props.js:245 · src/sculpt/props.js:282 — the two spans are one implementation copied and then locally edited — 199 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/sculpt/props.js:245
  • src/core/sky.js:342 · src/water/mist.js:254 — 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/core/sky.js:342
  • src/flora/heroes.js:100 · src/modules/ruins.js:373 — 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/flora/heroes.js:100
  • src/props/brazier.js:321 · src/props/urn.js:395 — 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/props/brazier.js:321
  • src/city/harbour.js:280 · src/city/harbour.js:292 — the two spans are one implementation copied and then locally edited — 127 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/city/harbour.js:280
  • src/city/plan.js:98 · src/city/plan.js:110 — the two spans are one implementation copied and then locally edited — 125 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/city/plan.js:98
  • src/core/noise.js:28 · src/core/noise.js:57 — the two spans are one implementation copied and then locally edited — 164 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/core/noise.js:28
  • src/modules/birds.js:85 · src/props/urn.js:301 — 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/modules/birds.js:85
  • src/modules/clouds.js:156 · src/modules/clouds.js:201 — 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/modules/clouds.js:156
  • src/props/brazier.js:66 · src/props/urn.js:37 · src/ruins/grass.js:29 — the 3 copies are spread across 3 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/props/brazier.js:66
  • src/sculpt/sdf.js:38 · src/vegetation/util.js:50 — the two spans are one implementation copied and then locally edited — 268 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/sculpt/sdf.js:38
  • src/terrain/voxel.js:314 · src/terrain/voxel.js:322 — the two spans are one implementation copied and then locally edited — 200 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/terrain/voxel.js:314
  • src/acropolis/geo.js:92 · src/city/geobuilder.js:78 — 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/acropolis/geo.js:92
  • src/props/banner.js:49 · src/terrain/farfield.js:41 — 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/props/banner.js:49
  • src/props/lamp.js:11 · src/props/urn.js:17 — 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/props/lamp.js:11
  • src/world/heightfield.js:509 · src/world/heightfield.js:623 — 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/world/heightfield.js:509
  • src/acropolis/buildings.js:222 · src/acropolis/buildings.js:277 — 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/acropolis/buildings.js:222
  • src/acropolis/geo.js:225 · src/sculpt/sdf.js:39 — the two spans are one implementation copied and then locally edited — 231 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/acropolis/geo.js:225
  • src/aqueducts/geom.js:126 · src/aqueducts/geom.js:136 — 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/aqueducts/geom.js:126
  • src/arch/acanthus.js:107 · src/arch/geom.js:239 — 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/arch/acanthus.js:107
  • src/arch/acanthus.js:155 · src/arch/orders.js:191 — the two spans are one implementation copied and then locally edited — 100 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/arch/acanthus.js:155
  • src/arch/geom.js:216 · src/arch/geom.js:326 — 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/arch/geom.js:216
  • src/city/fleet.js:271 · src/props/urn.js:300 · src/ruins/ivy.js:219 — the 3 copies are spread across 3 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/city/fleet.js:271

What to do

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

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

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

  • scatterWorld has cyclomatic complexity 273 and cognitive complexity 746; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/vegetation/scatter.js:47
  • buildChain has cyclomatic complexity 206 and cognitive complexity 491; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/acropolis/walls.js:112
  • generateFarGrid has cyclomatic complexity 157 and cognitive complexity 233; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/terrain/farfield.js:102
  • mkVol has cyclomatic complexity 131 and cognitive complexity 153; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/city/buildings.js:120
  • buildHouse has cyclomatic complexity 128 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/city/buildings.js:50
  • build has cyclomatic complexity 117 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/modules/acropolis.js:45
  • meshChunk has cyclomatic complexity 114 and cognitive complexity 344; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/terrain/voxel.js:19
  • buildStructure has cyclomatic complexity 102 and cognitive complexity 282; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/aqueducts/arcade.js:57
  • peripteralTemple has cyclomatic complexity 97 and cognitive complexity 146; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/arch/temple.js:267
  • scatterCover has cyclomatic complexity 89 and cognitive complexity 169; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/modules/flora.js:135
  • makeFigure has cyclomatic complexity 80 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/sculpt/figure.js:159
  • buildEastGarden has cyclomatic complexity 77 and cognitive complexity 131; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/acropolis/garden.js:33
  • build has cyclomatic complexity 71 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/modules/city.js:122
  • build has cyclomatic complexity 70 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/modules/waterfalls.js:57
  • buildTerraceHouses has cyclomatic complexity 69 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/acropolis/houses.js:268
  • buildHouse has cyclomatic complexity 68 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/acropolis/houses.js:122
  • buildBridgeDeck has cyclomatic complexity 61 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/aqueducts/arcade.js:562
  • doricRun has cyclomatic complexity 61 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/arch/entablature.js:66
  • compute has cyclomatic complexity 60 and cognitive complexity 153; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/arch/ao.js:69
  • buildPodium has cyclomatic complexity 59 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/acropolis/podium.js:41
  • buildHarbour has cyclomatic complexity 58 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/city/harbour.js:113
  • traceStream has cyclomatic complexity 55 and cognitive complexity 140; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/water/trace.js:67
  • gateTower has cyclomatic complexity 55 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/arch/elements.js:222
  • buildBastion has cyclomatic complexity 54 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/acropolis/plaza.js:137
  • buildTree has cyclomatic complexity 52 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/vegetation/trees.js:49
  • wallRun has cyclomatic complexity 51 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/acropolis/masonry.js:35
  • buildFlowMap has cyclomatic complexity 51 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/water/flow.js:53
  • emblem 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/sculpt/props.js:47
  • placePortFleet has cyclomatic complexity 51 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/city/fleet.js:153
  • placeFleet has cyclomatic complexity 50 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/city/fleet.js:24
  • prostyleTemple has cyclomatic complexity 50 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/arch/temple.js:456
  • buildPlatform has cyclomatic complexity 49 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/acropolis/buildings.js:70
  • scatterBoulders has cyclomatic complexity 49 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/terrain/boulders.js:41
  • tholos has cyclomatic complexity 48 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/arch/tholos.js:19
  • buildAqueductTop has cyclomatic complexity 47 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/aqueducts/arcade.js:346
  • buildShip has cyclomatic complexity 47 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/city/ships.js:150
  • headSDF has cyclomatic complexity 45 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/sculpt/head.js:274
  • createRock has cyclomatic complexity 45 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/materials/stone.js:374
  • buildSheet has cyclomatic complexity 43 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/water/fallMesh.js:126
  • place has cyclomatic complexity 43 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/vegetation/scatter.js:212
R3 · Large Files3.0 / 10Weak✓ Tool-verified

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

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

  • src/world/heightfield.js has 826 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/world/heightfield.js:1
  • src/modules/flora.js has 792 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/modules/flora.js:1
  • src/modules/statues.js has 738 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/modules/statues.js:1
  • src/aqueducts/arcade.js has 735 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/aqueducts/arcade.js:1
  • src/sculpt/figure.js has 705 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/sculpt/figure.js:1
  • src/core/pipeline.js has 701 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/core/pipeline.js:1
  • src/vegetation/scatter.js has 694 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/vegetation/scatter.js:1
  • src/modules/clouds.js has 611 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/modules/clouds.js:1
  • src/city/house.js has 603 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/city/house.js:1
  • src/city/landmarks.js has 586 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/city/landmarks.js:1
  • src/water/surface.js has 586 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/water/surface.js:1
  • src/sculpt/head.js has 572 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/sculpt/head.js:1
  • src/modules/waterfalls.js has 552 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/modules/waterfalls.js:1
  • src/acropolis/walls.js has 534 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/acropolis/walls.js:1
  • src/props/owl.js has 534 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/props/owl.js:1
  • src/water/fallMesh.js has 529 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/water/fallMesh.js:1
  • src/arch/temple.js has 524 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/arch/temple.js:1
  • src/acropolis/stair.js has 504 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/acropolis/stair.js:1
  • src/materials/stone.js has 497 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/materials/stone.js:1
  • src/modules/city.js has 491 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/modules/city.js:1
  • src/terrain/material.js has 489 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/terrain/material.js:1
  • src/arch/geom.js has 478 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/arch/geom.js:1
  • src/vegetation/atlas.js has 466 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/vegetation/atlas.js:1
  • src/props/banner.js has 460 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/props/banner.js:1
  • src/city/buildings.js has 459 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/city/buildings.js:1
  • src/core/sky.js has 455 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/core/sky.js:1
  • src/arch/entablature.js has 451 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/arch/entablature.js:1
  • src/modules/temple.js has 450 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/modules/temple.js:1
  • src/modules/ruins.js has 425 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/modules/ruins.js:1
  • src/modules/acropolis.js has 413 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/modules/acropolis.js:1
  • src/props/urn.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/props/urn.js:1
  • src/sculpt/props.js has 402 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/sculpt/props.js:1

What to do

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

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

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

  • 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. (×14) — src/core/engine.js:1, src/ruins/headpreview.mjs:1, src/main.js:1, …

What to do

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

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

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

R6 · Tooling0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

  • Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
R7 · Dead Code7.9 / 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 15 application, 0 tooling and 1 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
  • no import path from any entry point (15 application, 0 tooling, 1 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 (×4) — src/terrain/preview.mjs, src/bake/terrain.js, src/bake/head.js, …
  • no import path from any entry point (15 application, 0 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/bake/terrain.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/terrain/nodeworker.mjs
  • Nothing imports this binding — it is safe to review for removal. (×34) — src/acropolis/geo.js:226, src/acropolis/geo.js:235, src/acropolis/geo.js:291, …

What to do

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

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

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

R9 · Circular Imports6.6 / 10Adequate✓ Tool-verified

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

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

  • src/arch/elements.js → src/arch/temple.js → src/arch/elements.js — src/arch/elements.js:8
  • src/city/plan.js → src/city/port.js → src/city/plan.js — src/city/plan.js:7

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `buildTerrain` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/modules/terrain.js:20
  • `loadOrBuild` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — src/core/cache.js:63

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

X25 · Inert configuration knob7.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

  • `makeGarment` accepts `ctx.fem` from the caller and keeps it in `fem` on line 458, where only it can read the value — but nothing ever reads `fem`. Setting `ctx.fem` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `fem` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.fem` from the accepted options so callers stop setting a knob that does nothing. — src/sculpt/figure.js:458
  • `makeGarment` accepts `ctx.trunk` from the caller and keeps it in `trunk` on line 458, where only it can read the value — but nothing ever reads `trunk`. Setting `ctx.trunk` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `trunk` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.trunk` from the accepted options so callers stop setting a knob that does nothing. — src/sculpt/figure.js:458
  • `makeGarment` accepts `ctx.shR` from the caller and keeps it in `shR` on line 458, where only it can read the value — but nothing ever reads `shR`. Setting `ctx.shR` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `shR` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.shR` from the accepted options so callers stop setting a knob that does nothing. — src/sculpt/figure.js:458

What to do

  • Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling5.4 / 10Adequate✓ Tool-verified

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

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

  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — src/main.js:105
  • 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. (×8) — src/terrain/far.js:29, src/modules/banners.js:134, src/modules/banners.js:138, …

What to do

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health26.3Weak — gated by D1, D2, R1, R2, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87.6StrongSolid.
Maturity59.1Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness34.5Weak — gated by R6, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security98.3ExemplaryStrongest area.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 1 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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

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

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 73 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 (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (14 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.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not applicable — JavaScript has no interface declaration, so there is no declared member list whose width this check could measure
  • 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 serve`) 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: "> athenaion@0.1.0 serve / > node REDACTED / Serving <repo> at http://localhost:8080/" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D16 Bus Factor — single-contributor repository — bus factor is not applicable
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • 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.
  • D20 ADR Quality — Repository kind not determined
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 6 candidate(s) found and not reported.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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) — 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.
  • D34 Knowledge Freshness — too few commits to judge knowledge freshness
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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.)
  • 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
  • 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 — no CI workflow found
  • P2 Observability — This repository's JavaScript/TypeScript source (1 module(s), 171 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: 171 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not 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
  • X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 2 finding(s)
R9 · Circular Imports · Import cycle (2 files) · ×2
  • Import cycle (2 files) src/arch/elements.js:8 — src/arch/elements.js → src/arch/temple.js → src/arch/elements.js
  • Import cycle (2 files) src/city/plan.js:7 — src/city/plan.js → src/city/port.js → src/city/plan.js
Serious — 670 finding(s)
D3 · God Classes · FunctionTooLong · ×39
  • FunctionTooLong: scatter.scatterWorld src/vegetation/scatter.js:47 — FunctionTooLong — scatterWorld runs 486 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 386 over it, 4.86× 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: buildings.buildHouse src/city/buildings.js:50 — FunctionTooLong — buildHouse runs 316 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: acropolis.build src/modules/acropolis.js:45 — FunctionTooLong — build runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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: cypress.buildCypress src/vegetation/cypress.js:43 — FunctionTooLong — buildCypress runs 267 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: walls.buildChain src/acropolis/walls.js:112 — FunctionTooLong — buildChain runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× 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: figure.makeFigure src/sculpt/figure.js:159 — FunctionTooLong — makeFigure 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: voxel.meshChunk src/terrain/voxel.js:19 — FunctionTooLong — meshChunk runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farfield.generateFarGrid src/terrain/farfield.js:102 — FunctionTooLong — generateFarGrid runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.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: figure.makeGarment src/sculpt/figure.js:457 — FunctionTooLong — makeGarment runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: trees.buildTree src/vegetation/trees.js:49 — FunctionTooLong — buildTree runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× 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: shot2.buildShot2 src/sets/shot2.js:18 — FunctionTooLong — buildShot2 runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: waterfalls.build src/modules/waterfalls.js:57 — FunctionTooLong — build runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ruins.buildHeadSet src/modules/ruins.js:119 — FunctionTooLong — buildHeadSet runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× 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: harbour.buildHarbour src/city/harbour.js:113 — FunctionTooLong — buildHarbour runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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: city.build src/modules/city.js:122 — FunctionTooLong — build runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: arcade.buildStructure src/aqueducts/arcade.js:57 — FunctionTooLong — buildStructure runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.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: flow.buildFlowMap src/water/flow.js:53 — FunctionTooLong — buildFlowMap runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: tholos.tholos src/arch/tholos.js:19 — FunctionTooLong — tholos runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: temple.build src/modules/temple.js:199 — FunctionTooLong — build runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: garden.buildEastGarden src/acropolis/garden.js:33 — FunctionTooLong — buildEastGarden runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: portico.buildPortico src/ruins/portico.js:65 — FunctionTooLong — buildPortico runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: temple.peripteralTemple src/arch/temple.js:267 — FunctionTooLong — peripteralTemple runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: plaza.buildBastion src/acropolis/plaza.js:137 — FunctionTooLong — buildBastion runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.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: waterfalls.addMist src/modules/waterfalls.js:300 — FunctionTooLong — addMist runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.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: podium.buildPodium src/acropolis/podium.js:41 — FunctionTooLong — buildPodium runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 14 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Both branches are identical · ×17
  • Both branches are identical — the condition decides nothing src/acropolis/stair.js:357 — 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/arch/entablature.js:163 — 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/arch/ornament.js:206 — 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/arch/temple.js:447 — 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/city/landmarks.js:55 — 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/flora/rocks.js:138 — 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/modules/birds.js:46 — 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/modules/statues.js:623 — 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/props/bannerArt.js:119 — 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/props/bannerArt.js:318 — 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/props/brazier.js:173 — 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/props/brazier.js:201 — 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/props/owl.js:161 — 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/props/owl.js:267 — 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/props/owl.js:358 — 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/sculpt/bakeutil.js:97 — 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/sculpt/figure.js:466 — 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.
R4 · Test Coverage · No test reaches this file · ×14
  • No test reaches this file src/core/engine.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 src/ruins/headpreview.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 src/main.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 src/terrain/preview.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 src/bake/terrain.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 src/video/sequence.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 src/core/footprints.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 src/video/player.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 src/world/index.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 src/terrain/viz.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 src/bake/head.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 src/core/quality.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 src/bake/statues.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 src/terrain/nodeworker.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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×12
  • Sync-over-async blocking src/bake/head.js:15 — `fs.existsSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/bake/head.js:25 — `fs.readdirSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/bake/head.js:25 — `fs.unlinkSync` in `bake` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:38 — `fs.openSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:38 — `fs.writeSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:38 — `fs.closeSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:42 — `fs.readFileSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:42 — `fs.rmSync` in `acquire` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:100 — `fs.mkdirSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:101 — `fs.writeFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:104 — `fs.existsSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/session.mjs:106 — `execFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
X3 · Exception handling · Swallowed exception (empty catch) · ×9
  • Swallowed exception (empty catch) src/main.js:105 — `.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) src/terrain/far.js:29 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/modules/banners.js:134 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/modules/banners.js:138 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/modules/terrain.js:40 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/core/cache.js:68 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/core/lighting.js:146 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/acropolis/buildings.js:173 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/acropolis/materials.js:376 — 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.
D3 · God Classes · FileTooLong · ×7
  • FileTooLong: modules/flora.js src/modules/flora.js — FileTooLong — 634 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 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: modules/statues.js src/modules/statues.js — FileTooLong — 588 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 88 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: world/heightfield.js src/world/heightfield.js — FileTooLong — 585 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 85 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: core/pipeline.js src/core/pipeline.js — FileTooLong — 559 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 65% of them inside a single declaration: Pipeline (145-591). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: aqueducts/arcade.js src/aqueducts/arcade.js — FileTooLong — 556 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 56 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sculpt/figure.js src/sculpt/figure.js — FileTooLong — 553 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 53 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: vegetation/scatter.js src/vegetation/scatter.js — FileTooLong — 513 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 95% of them inside a single declaration: scatterWorld (47-715). The bar is 500 significant lines; this is 13 over it, 1.03× 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.
R10 · Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) · ×5
  • Duplicated block with local edits (8 matched lines × 2 locations) src/city/harbour.js:280 — src/city/harbour.js:280 · src/city/harbour.js:292 — the two spans are one implementation copied and then locally edited — 127 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (8 matched lines × 2 locations) src/city/plan.js:98 — src/city/plan.js:98 · src/city/plan.js:110 — the two spans are one implementation copied and then locally edited — 125 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (8 matched lines × 2 locations) src/core/noise.js:28 — src/core/noise.js:28 · src/core/noise.js:57 — the two spans are one implementation copied and then locally edited — 164 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (8 matched lines × 2 locations) src/sculpt/sdf.js:38 — src/sculpt/sdf.js:38 · src/vegetation/util.js:50 — the two spans are one implementation copied and then locally edited — 268 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 (8 matched lines × 2 locations) src/terrain/voxel.js:314 — src/terrain/voxel.js:314 · src/terrain/voxel.js:322 — the two spans are one implementation copied and then locally edited — 200 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×4
  • Duplicated block (7 lines × 2 locations) src/acropolis/geo.js:92 — src/acropolis/geo.js:92 · src/city/geobuilder.js:78 — 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 (7 lines × 2 locations) src/props/banner.js:49 — src/props/banner.js:49 · src/terrain/farfield.js:41 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) src/props/lamp.js:11 — src/props/lamp.js:11 · src/props/urn.js:17 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) src/world/heightfield.js:509 — src/world/heightfield.js:509 · src/world/heightfield.js:623 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×4
  • Duplicated block (6 lines × 2 locations) src/acropolis/buildings.js:222 — src/acropolis/buildings.js:222 · src/acropolis/buildings.js:277 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) src/aqueducts/geom.js:126 — src/aqueducts/geom.js:126 · src/aqueducts/geom.js:136 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) src/arch/acanthus.js:107 — src/arch/acanthus.js:107 · src/arch/geom.js:239 — 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 (6 lines × 2 locations) src/arch/geom.js:216 — src/arch/geom.js:216 · src/arch/geom.js:326 — 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.
IC1 · Incompleteness & stubs · Fake-async · ×3
  • Fake-async — async method never awaits src/modules/aqueducts.js:117 — `build` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/modules/clouds.js:537 — `build` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/modules/sets.js:24 — `build` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×3
  • Duplicated block (9 lines × 2 locations) src/core/sky.js:342 — src/core/sky.js:342 · src/water/mist.js:254 — 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 (9 lines × 2 locations) src/flora/heroes.js:100 — src/flora/heroes.js:100 · src/modules/ruins.js:373 — 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 (9 lines × 2 locations) src/props/brazier.js:321 — src/props/brazier.js:321 · src/props/urn.js:395 — 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.
X25 · Inert configuration knob · Option is kept and never read · ×3
  • Option is kept and never read src/sculpt/figure.js:458 — `makeGarment` accepts `ctx.fem` from the caller and keeps it in `fem` on line 458, where only it can read the value — but nothing ever reads `fem`. Setting `ctx.fem` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `fem` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.fem` from the accepted options so callers stop setting a knob that does nothing.
  • Option is kept and never read src/sculpt/figure.js:458 — `makeGarment` accepts `ctx.trunk` from the caller and keeps it in `trunk` on line 458, where only it can read the value — but nothing ever reads `trunk`. Setting `ctx.trunk` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `trunk` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.trunk` from the accepted options so callers stop setting a knob that does nothing.
  • Option is kept and never read src/sculpt/figure.js:458 — `makeGarment` accepts `ctx.shR` from the caller and keeps it in `shR` on line 458, where only it can read the value — but nothing ever reads `shR`. Setting `ctx.shR` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `shR` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `ctx.shR` from the accepted options so callers stop setting a knob that does nothing.
D1 · Cyclomatic Complexity · scatterWorld · ×2
  • scatterWorld::place (cyclomatic 43) src/vegetation/scatter.js:212 — scatterWorld::place has cyclomatic complexity 43 (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.
  • scatterWorld::hero (cyclomatic 19) src/vegetation/scatter.js:266 — scatterWorld::hero has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · growOlive · ×2
  • growOlive::grow (cyclomatic 33) src/flora/olive.js:115 — growOlive::grow 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.
  • growOlive::leavesAlong (cyclomatic 24) src/flora/olive.js:188 — growOlive::leavesAlong has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build (cyclomatic 30) · ×2
  • build (cyclomatic 30) src/modules/banners.js:65 — build 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.
  • build (cyclomatic 30) src/props/brazier.js:262 — build has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · growOlive · ×2
  • growOlive::grow (cognitive 61) src/flora/olive.js:115 — growOlive::grow has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (39 pts), ternaries 3 (9 pts), boolean chains 7, loops 3 (5 pts), other 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • growOlive::leavesAlong (cognitive 52) src/flora/olive.js:188 — growOlive::leavesAlong has cognitive complexity 52 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 6 (18 pts), loops 5 (8 pts), boolean chains 2, other 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildColossusBastion · ×2
  • buildColossusBastion::face (cognitive 46) src/acropolis/bastion.js:141 — buildColossusBastion::face has cognitive complexity 46 (threshold 15). Drivers by points: loops 7 (16 pts), ternaries 4 (15 pts), if/else 6 (8 pts), boolean chains 7 (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.
  • buildColossusBastion::face (cognitive 17) src/acropolis/bastion.js:100 — buildColossusBastion::face has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · scatterWorld · ×2
  • scatterWorld::place (cognitive 43) src/vegetation/scatter.js:212 — scatterWorld::place has cognitive complexity 43 (threshold 15). Drivers by points: other 13, if/else 12, boolean chains 9, ternaries 7 (9 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • scatterWorld::hero (cognitive 26) src/vegetation/scatter.js:266 — scatterWorld::hero has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), other 5, boolean chains 4, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scatter.scatterWorld · ×2
  • scatter.scatterWorld::excluded (cognitive 20) src/vegetation/scatter.js:87 — scatter.scatterWorld::excluded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (scatter.scatterWorld::blocksShots) 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.
  • scatter.scatterWorld::blocksShots (cognitive 20) src/vegetation/scatter.js:153 — scatter.scatterWorld::blocksShots has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (scatter.scatterWorld::excluded) 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.
D3 · God Classes · MethodTooLong · ×2
  • MethodTooLong: Pipeline.constructor src/core/pipeline.js:146 — MethodTooLong — constructor 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.
  • MethodTooLong: BannerSet.build src/props/banner.js:310 — MethodTooLong — build runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (12 matched lines × 2 locations) src/acropolis/geo.js:103 — src/acropolis/geo.js:103 · src/arch/geom.js:117 — the two spans are one implementation copied and then locally edited — 147 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 (12 matched lines × 2 locations) tools/render-video.mjs:43 — tools/render-video.mjs:43 · tools/session.mjs:30 — the two spans are one implementation copied and then locally edited — 197 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 (12 lines × 2 locations) · ×2
  • Duplicated block (12 lines × 2 locations) src/modules/statues.js:667 — src/modules/statues.js:667 · src/modules/statues.js:696 — 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 (12 lines × 2 locations) src/ruins/sdf.js:72 — src/ruins/sdf.js:72 · src/sculpt/bakeutil.js:73 — 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 (10 lines × 2 locations) · ×2
  • Duplicated block (10 lines × 2 locations) src/core/pipeline.js:171 — src/core/pipeline.js:171 · src/core/pipeline.js:219 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) src/props/brazier.js:113 — src/props/brazier.js:113 · src/props/urn.js:61 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×2
  • Duplicated block (8 lines × 2 locations) src/modules/birds.js:85 — src/modules/birds.js:85 · src/props/urn.js:301 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) src/modules/clouds.js:156 — src/modules/clouds.js:156 · src/modules/clouds.js:201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (6 matched lines × 2 locations) src/acropolis/geo.js:225 — src/acropolis/geo.js:225 · src/sculpt/sdf.js:39 — the two spans are one implementation copied and then locally edited — 231 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 (6 matched lines × 2 locations) src/arch/acanthus.js:155 — src/arch/acanthus.js:155 · src/arch/orders.js:191 — the two spans are one implementation copied and then locally edited — 100 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.
X2 · Cancellation propagation · Async function without AbortSignal · ×2
  • Async function without AbortSignal: buildTerrain src/modules/terrain.js:20 — `buildTerrain` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: loadOrBuild src/core/cache.js:63 — `loadOrBuild` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D1 · Cyclomatic Complexity · scatterWorld (cyclomatic 273) · ×1
  • scatterWorld (cyclomatic 273) src/vegetation/scatter.js:47 — scatterWorld has cyclomatic complexity 273 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildChain (cyclomatic 208) · ×1
  • buildChain (cyclomatic 208) src/acropolis/walls.js:112 — buildChain has cyclomatic complexity 208 (threshold 15). Of this number, 206 points are the body's own statements and 2 belong to 15 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build (cyclomatic 191) · ×1
  • build (cyclomatic 191) src/modules/acropolis.js:45 — build has cyclomatic complexity 191 (threshold 15). Of this number, 117 points are the body's own statements and 74 belong to 57 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generateFarGrid (cyclomatic 157) · ×1
  • generateFarGrid (cyclomatic 157) src/terrain/farfield.js:102 — generateFarGrid has cyclomatic complexity 157 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildHouse · ×1
  • buildHouse::mkVol (cyclomatic 131) src/city/buildings.js:120 — buildHouse::mkVol has cyclomatic complexity 131 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildings.buildHouse (cyclomatic 128) · ×1
  • buildings.buildHouse (cyclomatic 128) src/city/buildings.js:50 — buildings.buildHouse has cyclomatic complexity 128 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · meshChunk (cyclomatic 114) · ×1
  • meshChunk (cyclomatic 114) src/terrain/voxel.js:19 — meshChunk has cyclomatic complexity 114 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildStructure (cyclomatic 106) · ×1
  • buildStructure (cyclomatic 106) src/aqueducts/arcade.js:57 — buildStructure has cyclomatic complexity 106 (threshold 15). Of this number, 102 points are the body's own statements and 4 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · peripteralTemple (cyclomatic 97) · ×1
  • peripteralTemple (cyclomatic 97) src/arch/temple.js:267 — peripteralTemple has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build (cyclomatic 95) · ×1
  • build (cyclomatic 95) src/modules/waterfalls.js:57 — build has cyclomatic complexity 95 (threshold 15). Of this number, 70 points are the body's own statements and 25 belong to 25 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · trees.buildTree (cyclomatic 93) · ×1
  • trees.buildTree (cyclomatic 93) src/vegetation/trees.js:49 — trees.buildTree has cyclomatic complexity 93 (threshold 15). Of this number, 52 points are the body's own statements and 41 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scatterCover (cyclomatic 91) · ×1
  • scatterCover (cyclomatic 91) src/modules/flora.js:135 — scatterCover has cyclomatic complexity 91 (threshold 15). Of this number, 89 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildEastGarden (cyclomatic 89) · ×1
  • buildEastGarden (cyclomatic 89) src/acropolis/garden.js:33 — buildEastGarden has cyclomatic complexity 89 (threshold 15). Of this number, 77 points are the body's own statements and 12 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · makeFigure (cyclomatic 80) · ×1
  • makeFigure (cyclomatic 80) src/sculpt/figure.js:159 — makeFigure has cyclomatic complexity 80 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · build (cyclomatic 76) · ×1
  • build (cyclomatic 76) src/modules/city.js:122 — build has cyclomatic complexity 76 (threshold 15). Of this number, 71 points are the body's own statements and 5 belong to 24 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · houses.buildHouse (cyclomatic 69) · ×1
  • houses.buildHouse (cyclomatic 69) src/acropolis/houses.js:122 — houses.buildHouse has cyclomatic complexity 69 (threshold 15). Of this number, 68 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildTerraceHouses (cyclomatic 69) · ×1
  • buildTerraceHouses (cyclomatic 69) src/acropolis/houses.js:268 — buildTerraceHouses has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildCypress (cyclomatic 68) · ×1
  • buildCypress (cyclomatic 68) src/vegetation/cypress.js:43 — buildCypress has cyclomatic complexity 68 (threshold 15). Of this number, 17 points are the body's own statements and 51 belong to 30 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · placePortFleet (cyclomatic 67) · ×1
  • placePortFleet (cyclomatic 67) src/city/fleet.js:153 — placePortFleet has cyclomatic complexity 67 (threshold 15). Of this number, 51 points are the body's own statements and 16 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · arcade.buildBridgeDeck (cyclomatic 64) · ×1
  • arcade.buildBridgeDeck (cyclomatic 64) src/aqueducts/arcade.js:562 — arcade.buildBridgeDeck has cyclomatic complexity 64 (threshold 15). Of this number, 61 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doricRun (cyclomatic 62) · ×1
  • doricRun (cyclomatic 62) src/arch/entablature.js:66 — doricRun has cyclomatic complexity 62 (threshold 15). Of this number, 61 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · placeFleet (cyclomatic 61) · ×1
  • placeFleet (cyclomatic 61) src/city/fleet.js:24 — placeFleet has cyclomatic complexity 61 (threshold 15). Of this number, 50 points are the body's own statements and 11 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · compute (cyclomatic 60) · ×1
  • compute (cyclomatic 60) src/arch/ao.js:69 — compute has cyclomatic complexity 60 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · bastion.buildColossusBastion (cyclomatic 59) · ×1
  • bastion.buildColossusBastion (cyclomatic 59) src/acropolis/bastion.js:38 — bastion.buildColossusBastion has cyclomatic complexity 59 (threshold 15). Of this number, 24 points are the body's own statements and 35 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildPodium (cyclomatic 59) · ×1
  • buildPodium (cyclomatic 59) src/acropolis/podium.js:41 — buildPodium has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildHarbour (cyclomatic 58) · ×1
  • buildHarbour (cyclomatic 58) src/city/harbour.js:113 — buildHarbour has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateTower (cyclomatic 56) · ×1
  • gateTower (cyclomatic 56) src/arch/elements.js:222 — gateTower has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · meshSDF (cyclomatic 56) · ×1
  • meshSDF (cyclomatic 56) src/sculpt/mesher.js:15 — meshSDF has cyclomatic complexity 56 (threshold 15). Of this number, 42 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · traceStream (cyclomatic 56) · ×1
  • traceStream (cyclomatic 56) src/water/trace.js:67 — traceStream has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flow.buildFlowMap (cyclomatic 55) · ×1
  • flow.buildFlowMap (cyclomatic 55) src/water/flow.js:53 — flow.buildFlowMap has cyclomatic complexity 55 (threshold 15). Of this number, 51 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildBastion (cyclomatic 55) · ×1
  • buildBastion (cyclomatic 55) src/acropolis/plaza.js:137 — buildBastion has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
D1 · Cyclomatic Complexity · props.emblem (cyclomatic 54) · ×1
  • props.emblem (cyclomatic 54) src/sculpt/props.js:47 — props.emblem has cyclomatic complexity 54 (threshold 15). Of this number, 51 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wallRun (cyclomatic 53) · ×1
  • wallRun (cyclomatic 53) src/acropolis/masonry.js:35 — wallRun has cyclomatic complexity 53 (threshold 15). Of this number, 51 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · createRock (cyclomatic 52) · ×1
  • createRock (cyclomatic 52) src/materials/stone.js:374 — createRock has cyclomatic complexity 52 (threshold 15). Of this number, 45 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · arcade.buildAqueductTop (cyclomatic 51) · ×1
  • arcade.buildAqueductTop (cyclomatic 51) src/aqueducts/arcade.js:346 — arcade.buildAqueductTop has cyclomatic complexity 51 (threshold 15). Of this number, 49 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · prostyleTemple (cyclomatic 51) · ×1
  • prostyleTemple (cyclomatic 51) src/arch/temple.js:456 — prostyleTemple has cyclomatic complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ruins.buildHeadSet (cyclomatic 50) · ×1
  • ruins.buildHeadSet (cyclomatic 50) src/modules/ruins.js:119 — ruins.buildHeadSet has cyclomatic complexity 50 (threshold 15). Of this number, 24 points are the body's own statements and 26 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tholos (cyclomatic 50) · ×1
  • tholos (cyclomatic 50) src/arch/tholos.js:19 — tholos has cyclomatic complexity 50 (threshold 15). Of this number, 48 points are the body's own statements and 2 belong to 16 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · build (cyclomatic 50) · ×1
  • build (cyclomatic 50) src/modules/temple.js:199 — build has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 5 of the 50 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 342, a function literal at line 321, a function literal at line 247, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · scatterBoulders (cyclomatic 50) · ×1
  • scatterBoulders (cyclomatic 50) src/terrain/boulders.js:41 — scatterBoulders has cyclomatic complexity 50 (threshold 15). Of this number, 49 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildPlatform (cyclomatic 49) · ×1
  • buildPlatform (cyclomatic 49) src/acropolis/buildings.js:70 — buildPlatform 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.
D1 · Cyclomatic Complexity · edgeIvySlots (cyclomatic 48) · ×1
  • edgeIvySlots (cyclomatic 48) src/modules/flora.js:326 — edgeIvySlots has cyclomatic complexity 48 (threshold 15). Of this number, 40 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildShip (cyclomatic 47) · ×1
  • buildShip (cyclomatic 47) src/city/ships.js:150 — buildShip has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · head.headSDF (cyclomatic 45) · ×1
  • head.headSDF (cyclomatic 45) src/sculpt/head.js:274 — head.headSDF has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · lots.makeLots (cyclomatic 45) · ×1
  • lots.makeLots (cyclomatic 45) src/city/lots.js:57 — lots.makeLots has cyclomatic complexity 45 (threshold 15). Of this number, 42 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · headpreview.renderView (cyclomatic 43) · ×1
  • headpreview.renderView (cyclomatic 43) src/ruins/headpreview.mjs:33 — headpreview.renderView has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rockCluster (cyclomatic 43) · ×1
  • rockCluster (cyclomatic 43) src/flora/rocks.js:62 — rockCluster has cyclomatic complexity 43 (threshold 15). Of this number, 35 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildSheet (cyclomatic 43) · ×1
  • buildSheet (cyclomatic 43) src/water/fallMesh.js:126 — buildSheet has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildLanding (cyclomatic 42) · ×1
  • buildLanding (cyclomatic 42) src/acropolis/stair.js:256 — buildLanding 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.
D1 · Cyclomatic Complexity · pediment (cyclomatic 42) · ×1
  • pediment (cyclomatic 42) src/arch/entablature.js:251 — pediment 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.
D1 · Cyclomatic Complexity · geo.chamferBox (cyclomatic 40) · ×1
  • geo.chamferBox (cyclomatic 40) src/acropolis/geo.js:241 — geo.chamferBox has cyclomatic complexity 40 (threshold 15). Of this number, 32 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stair.buildFlight (cyclomatic 40) · ×1
  • stair.buildFlight (cyclomatic 40) src/acropolis/stair.js:162 — stair.buildFlight 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.
D1 · Cyclomatic Complexity · landmarks.placeLandmarks (cyclomatic 39) · ×1
  • landmarks.placeLandmarks (cyclomatic 39) src/city/landmarks.js:336 — landmarks.placeLandmarks has cyclomatic complexity 39 (threshold 15). Of this number, 20 points are the body's own statements and 19 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stoa (cyclomatic 39) · ×1
  • stoa (cyclomatic 39) src/arch/elements.js:132 — stoa has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · site.contours (cyclomatic 38) · ×1
  • site.contours (cyclomatic 38) src/acropolis/site.js:28 — site.contours has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build (cyclomatic 38) · ×1
  • build (cyclomatic 38) src/props/banner.js:310 — build 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.
D1 · Cyclomatic Complexity · shaftSegment (cyclomatic 37) · ×1
  • shaftSegment (cyclomatic 37) src/arch/ruins.js:47 — shaftSegment has cyclomatic complexity 37 (threshold 15). Of this number, 17 points are the body's own statements and 20 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build (cyclomatic 37) · ×1
  • build (cyclomatic 37) src/modules/water.js:29 — build has cyclomatic complexity 37 (threshold 15). Of this number, 24 points are the body's own statements and 13 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · growIvy (cyclomatic 37) · ×1
  • growIvy (cyclomatic 37) src/ruins/ivy.js:124 — growIvy has cyclomatic complexity 37 (threshold 15). Of this number, 32 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildPodiumAndPaving (cyclomatic 37) · ×1
  • buildPodiumAndPaving (cyclomatic 37) src/ruins/portico.js:270 — buildPodiumAndPaving has cyclomatic complexity 37 (threshold 15). Of this number, 30 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stair.buildStair (cyclomatic 36) · ×1
  • stair.buildStair (cyclomatic 36) src/acropolis/stair.js:89 — stair.buildStair has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · crepidoma (cyclomatic 36) · ×1
  • crepidoma (cyclomatic 36) src/arch/temple.js:93 — crepidoma has cyclomatic complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shieldGeometry (cyclomatic 36) · ×1
  • shieldGeometry (cyclomatic 36) src/sculpt/props.js:179 — shieldGeometry has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sweep (cyclomatic 35) · ×1
  • sweep (cyclomatic 35) src/arch/geom.js:302 — sweep 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.
D1 · Cyclomatic Complexity · bankTerraces (cyclomatic 35) · ×1
  • bankTerraces (cyclomatic 35) src/city/port.js:103 — bankTerraces has cyclomatic complexity 35 (threshold 15). Of this number, 30 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.
D1 · Cyclomatic Complexity · lod.planChunks · ×1
  • lod.planChunks::reqCell (cyclomatic 34) src/terrain/lod.js:55 — lod.planChunks::reqCell has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · waterfalls.addMist (cyclomatic 34) · ×1
  • waterfalls.addMist (cyclomatic 34) src/modules/waterfalls.js:300 — waterfalls.addMist has cyclomatic complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · statues.build (cyclomatic 34) · ×1
  • statues.build (cyclomatic 34) src/modules/statues.js:543 — statues.build has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · corinthianCapital (cyclomatic 34) · ×1
  • corinthianCapital (cyclomatic 34) src/arch/acanthus.js:191 — corinthianCapital has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · droplets (cyclomatic 33) · ×1
  • droplets (cyclomatic 33) src/terrain/erosion.js:153 — droplets has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · clouds.build (cyclomatic 32) · ×1
  • clouds.build (cyclomatic 32) src/modules/clouds.js:537 — clouds.build has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 557, 556). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · islandBridge (cyclomatic 32) · ×1
  • islandBridge (cyclomatic 32) src/acropolis/bridge.js:17 — islandBridge has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 13 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flutedShaft (cyclomatic 32) · ×1
  • flutedShaft (cyclomatic 32) src/arch/orders.js:33 — flutedShaft has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · birds.gullGeometry (cyclomatic 31) · ×1
  • birds.gullGeometry (cyclomatic 31) src/modules/birds.js:9 — birds.gullGeometry has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildTerraceBuildings (cyclomatic 31) · ×1
  • buildTerraceBuildings (cyclomatic 31) src/acropolis/buildings.js:167 — buildTerraceBuildings has cyclomatic complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ionicRun (cyclomatic 31) · ×1
  • ionicRun (cyclomatic 31) src/arch/entablature.js:183 — ionicRun has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseSpill (cyclomatic 31) · ×1
  • parseSpill (cyclomatic 31) src/modules/waterfalls.js:26 — parseSpill has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ruinStoneMaterial (cyclomatic 31) · ×1
  • ruinStoneMaterial (cyclomatic 31) src/ruins/materials.js:284 — ruinStoneMaterial has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 286). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · buildShot2 (cyclomatic 31) · ×1
  • buildShot2 (cyclomatic 31) src/sets/shot2.js:18 — buildShot2 has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 9 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · rapids.planCascade (cyclomatic 30) · ×1
  • rapids.planCascade (cyclomatic 30) src/water/rapids.js:181 — rapids.planCascade has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · temple (cyclomatic 30) · ×1
  • temple (cyclomatic 30) src/city/landmarks.js:41 — temple has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rapids.buildRapidsRocks (cyclomatic 29) · ×1
  • rapids.buildRapidsRocks (cyclomatic 29) src/water/rapids.js:18 — rapids.buildRapidsRocks has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · atlas.buildTexture (cyclomatic 29) · ×1
  • atlas.buildTexture (cyclomatic 29) src/vegetation/atlas.js:225 — atlas.buildTexture 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.
D1 · Cyclomatic Complexity · buildPrecinctBuildings (cyclomatic 29) · ×1
  • buildPrecinctBuildings (cyclomatic 29) src/acropolis/buildings.js:235 — buildPrecinctBuildings has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · planWallLine (cyclomatic 29) · ×1
  • planWallLine (cyclomatic 29) src/acropolis/walls.js:45 — planWallLine has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · finalize (cyclomatic 29) · ×1
  • finalize (cyclomatic 29) src/arch/build.js:46 — finalize has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 22 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · box (cyclomatic 29) · ×1
  • box (cyclomatic 29) src/arch/geom.js:137 — box has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildIvy (cyclomatic 29) · ×1
  • buildIvy (cyclomatic 29) src/modules/flora.js:494 — buildIvy has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · placeStatues (cyclomatic 29) · ×1
  • placeStatues (cyclomatic 29) src/modules/statues.js:386 — placeStatues has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ribbon (cyclomatic 29) · ×1
  • ribbon (cyclomatic 29) src/water/fallMesh.js:34 — ribbon has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · leaf (cyclomatic 28) · ×1
  • leaf (cyclomatic 28) src/arch/acanthus.js:16 — leaf has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 11 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildColumn (cyclomatic 28) · ×1
  • buildColumn (cyclomatic 28) src/arch/orders.js:295 — buildColumn has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · placeSculpture (cyclomatic 28) · ×1
  • placeSculpture (cyclomatic 28) src/modules/statues.js:498 — placeSculpture has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _update (cyclomatic 28) · ×1
  • _update (cyclomatic 28) src/vegetation/instances.js:157 — _update has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · traceFall (cyclomatic 28) · ×1
  • traceFall (cyclomatic 28) src/water/trace.js:232 — traceFall has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · previewGrid (cyclomatic 28) · ×1
  • previewGrid (cyclomatic 28) src/terrain/preview.mjs:7 — previewGrid has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · podium.dressPrecinct (cyclomatic 27) · ×1
  • podium.dressPrecinct (cyclomatic 27) src/acropolis/podium.js:342 — podium.dressPrecinct has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pediment.composePediment · ×1
  • pediment.composePediment::layer (cyclomatic 27) src/sculpt/pediment.js:27 — pediment.composePediment::layer has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · temple.islandEnsemble (cyclomatic 27) · ×1
  • temple.islandEnsemble (cyclomatic 27) src/modules/temple.js:71 — temple.islandEnsemble has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · boot (cyclomatic 27) · ×1
  • boot (cyclomatic 27) src/main.js:12 — boot has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 13 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tiledRoof (cyclomatic 27) · ×1
  • tiledRoof (cyclomatic 27) src/arch/entablature.js:365 — tiledRoof has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cella (cyclomatic 27) · ×1
  • cella (cyclomatic 27) src/arch/temple.js:209 — cella has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · applyShot (cyclomatic 27) · ×1
  • applyShot (cyclomatic 27) src/core/engine.js:152 — applyShot has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · viewIvySlots (cyclomatic 27) · ×1
  • viewIvySlots (cyclomatic 27) src/modules/flora.js:451 — viewIvySlots has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildColossusBastion · ×1
  • buildColossusBastion::face (cyclomatic 26) src/acropolis/bastion.js:141 — buildColossusBastion::face has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Pipeline.resolve (cyclomatic 25) · ×1
  • Pipeline.resolve (cyclomatic 25) src/core/pipeline.js:488 — Pipeline.resolve has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · buildHeroes (cyclomatic 25) · ×1
  • buildHeroes (cyclomatic 25) src/modules/flora.js:542 — buildHeroes has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · surface.surfaceMap (cyclomatic 24) · ×1
  • surface.surfaceMap (cyclomatic 24) src/flora/surface.js:38 — surface.surfaceMap has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 43, 57). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · statues.test (cyclomatic 24) · ×1
  • statues.test (cyclomatic 24) src/modules/statues.js:610 — statues.test has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · drawLaurelWreath (cyclomatic 24) · ×1
  • drawLaurelWreath (cyclomatic 24) src/props/owl.js:335 — drawLaurelWreath has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · portico.buildPortico (cyclomatic 23) · ×1
  • portico.buildPortico (cyclomatic 23) src/ruins/portico.js:65 — portico.buildPortico has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · bannerArt.drawHeader (cyclomatic 23) · ×1
  • bannerArt.drawHeader (cyclomatic 23) src/props/bannerArt.js:165 — bannerArt.drawHeader has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flora.columnIvySlots (cyclomatic 23) · ×1
  • flora.columnIvySlots (cyclomatic 23) src/modules/flora.js:292 — flora.columnIvySlots has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 299, 295). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · flora.build (cyclomatic 23) · ×1
  • flora.build (cyclomatic 23) src/modules/flora.js:622 — flora.build has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · util.addBlob (cyclomatic 23) · ×1
  • util.addBlob (cyclomatic 23) src/vegetation/util.js:90 — util.addBlob has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · viewSurface (cyclomatic 23) · ×1
  • viewSurface (cyclomatic 23) src/flora/surface.js:140 — viewSurface has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 145, (anonymous)::onBeforeRender, a function literal at line 143, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · build (cyclomatic 23) · ×1
  • build (cyclomatic 23) src/props/urn.js:339 — build has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · drumSDF (cyclomatic 23) · ×1
  • drumSDF (cyclomatic 23) src/ruins/columns.js:31 — drumSDF has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stair.parapet (cyclomatic 22) · ×1
  • stair.parapet (cyclomatic 22) src/acropolis/stair.js:374 — stair.parapet has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pavePrecinct (cyclomatic 22) · ×1
  • pavePrecinct (cyclomatic 22) src/acropolis/podium.js:288 — pavePrecinct has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stoneSDF (cyclomatic 22) · ×1
  • stoneSDF (cyclomatic 22) src/ruins/stones.js:18 — stoneSDF has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · stair.stepSlab (cyclomatic 21) · ×1
  • stair.stepSlab (cyclomatic 21) src/acropolis/stair.js:483 — stair.stepSlab has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · arcade.makeSpec (cyclomatic 21) · ×1
  • arcade.makeSpec (cyclomatic 21) src/aqueducts/arcade.js:12 — arcade.makeSpec has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · field.protectFlat (cyclomatic 21) · ×1
  • field.protectFlat (cyclomatic 21) src/terrain/field.js:189 — field.protectFlat has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · flora.cliffGreenery (cyclomatic 21) · ×1
  • flora.cliffGreenery (cyclomatic 21) src/modules/flora.js:396 — flora.cliffGreenery has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dressSheerFaces (cyclomatic 21) · ×1
  • dressSheerFaces (cyclomatic 21) src/acropolis/cliffdress.js:118 — dressSheerFaces has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildGateTower (cyclomatic 21) · ×1
  • buildGateTower (cyclomatic 21) src/aqueducts/arcade.js:706 — buildGateTower has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pilasterSDF (cyclomatic 21) · ×1
  • pilasterSDF (cyclomatic 21) src/ruins/columns.js:174 — pilasterSDF has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 185, (anonymous)::fl). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · arcade.buildArcade (cyclomatic 20) · ×1
  • arcade.buildArcade (cyclomatic 20) src/acropolis/arcade.js:87 — arcade.buildArcade has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · walls.isoLines (cyclomatic 20) · ×1
  • walls.isoLines (cyclomatic 20) src/city/walls.js:11 — walls.isoLines has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · heightmap.captureHeightMap (cyclomatic 20) · ×1
  • heightmap.captureHeightMap (cyclomatic 20) src/water/heightmap.js:46 — heightmap.captureHeightMap has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rapids.planWeirs (cyclomatic 20) · ×1
  • rapids.planWeirs (cyclomatic 20) src/water/rapids.js:123 — rapids.planWeirs has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · util.addTube (cyclomatic 20) · ×1
  • util.addTube (cyclomatic 20) src/vegetation/util.js:185 — util.addTube has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · lathe (cyclomatic 20) · ×1
  • lathe (cyclomatic 20) src/arch/geom.js:210 — lathe 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.
D1 · Cyclomatic Complexity · fillLots (cyclomatic 20) · ×1
  • fillLots (cyclomatic 20) src/city/lots.js:158 — fillLots has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · streamPower (cyclomatic 20) · ×1
  • streamPower (cyclomatic 20) src/terrain/erosion.js:93 — streamPower has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · statues.fallbackSlots (cyclomatic 19) · ×1
  • statues.fallbackSlots (cyclomatic 19) src/modules/statues.js:341 — statues.fallbackSlots has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildArch (cyclomatic 19) · ×1
  • buildArch (cyclomatic 19) src/acropolis/masonry.js:337 — buildArch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · roof (cyclomatic 19) · ×1
  • roof (cyclomatic 19) src/city/house.js:99 — roof has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · leafMaterial (cyclomatic 19) · ×1
  • leafMaterial (cyclomatic 19) src/flora/foliage.js:75 — leafMaterial has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · heightfield.acropolis (cyclomatic 18) · ×1
  • heightfield.acropolis (cyclomatic 18) src/world/heightfield.js:430 — heightfield.acropolis has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · heightfield.nearHeight (cyclomatic 18) · ×1
  • heightfield.nearHeight (cyclomatic 18) src/world/heightfield.js:758 — heightfield.nearHeight has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · landmarks.findTheatreSite (cyclomatic 18) · ×1
  • landmarks.findTheatreSite (cyclomatic 18) src/city/landmarks.js:574 — landmarks.findTheatreSite has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · atlas.drawTwig (cyclomatic 18) · ×1
  • atlas.drawTwig (cyclomatic 18) src/vegetation/atlas.js:123 — atlas.drawTwig has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
D1 · Cyclomatic Complexity · city.streetStrip (cyclomatic 18) · ×1
  • city.streetStrip (cyclomatic 18) src/modules/city.js:73 — city.streetStrip has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · findSite (cyclomatic 18) · ×1
  • findSite (cyclomatic 18) src/acropolis/buildings.js:41 — findSite has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ivyCurtain (cyclomatic 18) · ×1
  • ivyCurtain (cyclomatic 18) src/flora/ivy.js:63 — ivyCurtain has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildAll (cyclomatic 18) · ×1
  • buildAll (cyclomatic 18) src/modules/aqueducts.js:38 — buildAll has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bannerFromSlot (cyclomatic 18) · ×1
  • bannerFromSlot (cyclomatic 18) src/modules/banners.js:45 — bannerFromSlot has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · stairIvySlots (cyclomatic 18) · ×1
  • stairIvySlots (cyclomatic 18) src/modules/flora.js:254 — stairIvySlots has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · makeGarment.skirt (cyclomatic 18) · ×1
  • makeGarment.skirt (cyclomatic 18) src/sculpt/figure.js:471 — makeGarment.skirt has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · house.figure (cyclomatic 17) · ×1
  • house.figure (cyclomatic 17) src/city/house.js:499 — house.figure 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.
D1 · Cyclomatic Complexity · erosion.drainage (cyclomatic 17) · ×1
  • erosion.drainage (cyclomatic 17) src/terrain/erosion.js:37 — erosion.drainage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · pipeline.solveToneCurve (cyclomatic 17) · ×1
  • pipeline.solveToneCurve (cyclomatic 17) src/core/pipeline.js:112 — pipeline.solveToneCurve has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · textures.drawIvyLeaf (cyclomatic 17) · ×1
  • textures.drawIvyLeaf (cyclomatic 17) src/flora/textures.js:45 — textures.drawIvyLeaf has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · urn.plantAtlas (cyclomatic 17) · ×1
  • urn.plantAtlas (cyclomatic 17) src/props/urn.js:123 — urn.plantAtlas has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · banners.addDefaults (cyclomatic 17) · ×1
  • banners.addDefaults (cyclomatic 17) src/modules/banners.js:107 — banners.addDefaults has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · test (cyclomatic 17) · ×1
  • test (cyclomatic 17) src/modules/flora.js:727 — test has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
D1 · Cyclomatic Complexity · cameraAt (cyclomatic 17) · ×1
  • cameraAt (cyclomatic 17) src/video/sequence.js:37 — cameraAt has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · build (cyclomatic 17) · ×1
  • build (cyclomatic 17) src/water/mist.js:210 — build has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 222, order, a function literal at line 221). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · geom.surface (cyclomatic 16) · ×1
  • geom.surface (cyclomatic 16) src/arch/geom.js:267 — geom.surface has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · columns.pilasterSDF.<returned closure> (cyclomatic 16) · ×1
  • columns.pilasterSDF.<returned closure> (cyclomatic 16) src/ruins/columns.js:185 — columns.pilasterSDF.<returned closure> has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · face.classicalHead (cyclomatic 16) · ×1
  • face.classicalHead (cyclomatic 16) src/sculpt/face.js:18 — face.classicalHead has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · statues.bake (cyclomatic 16) · ×1
  • statues.bake (cyclomatic 16) src/bake/statues.js:8 — statues.bake has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · voxel.meshChunk · ×1
  • voxel.meshChunk::vertexOf (cyclomatic 16) src/terrain/voxel.js:201 — voxel.meshChunk::vertexOf has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · banner.bannerTextures (cyclomatic 16) · ×1
  • banner.bannerTextures (cyclomatic 16) src/props/banner.js:81 — banner.bannerTextures has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · library.buildLibrary (cyclomatic 16) · ×1
  • library.buildLibrary (cyclomatic 16) src/vegetation/library.js:19 — library.buildLibrary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · city.addTestTrees (cyclomatic 16) · ×1
  • city.addTestTrees (cyclomatic 16) src/modules/city.js:469 — city.addTestTrees has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · planArcade (cyclomatic 16) · ×1
  • planArcade (cyclomatic 16) src/acropolis/arcade.js:25 — planArcade has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · roughBlock (cyclomatic 16) · ×1
  • roughBlock (cyclomatic 16) src/arch/ruins.js:148 — roughBlock has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 12 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · tube (cyclomatic 16) · ×1
  • tube (cyclomatic 16) src/flora/util.js:136 — tube has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · makeGarment (cyclomatic 16) · ×1
  • makeGarment (cyclomatic 16) src/sculpt/figure.js:457 — makeGarment has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · scatterWorld (cognitive 746) · ×1
  • scatterWorld (cognitive 746) src/vegetation/scatter.js:47 — scatterWorld has cognitive complexity 746 (threshold 15). Drivers by points: ternaries 108 (396 pts), if/else 125 (314 pts), loops 46 (86 pts), boolean chains 85, other 21 (nesting depth added 517). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · buildChain (cognitive 497) · ×1
  • buildChain (cognitive 497) src/acropolis/walls.js:112 — buildChain has cognitive complexity 497 (threshold 15). Drivers by points: if/else 62 (221 pts), ternaries 30 (122 pts), loops 26 (92 pts), boolean chains 50, other 12 (nesting depth added 317). Of this number, 491 points are the body's own statements and 6 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · voxel.meshChunk (cognitive 346) · ×1
  • voxel.meshChunk (cognitive 346) src/terrain/voxel.js:19 — voxel.meshChunk has cognitive complexity 346 (threshold 15). Drivers by points: if/else 58 (216 pts), loops 37 (84 pts), ternaries 12 (28 pts), boolean chains 18 (nesting depth added 221). Of this number, 317 points are the body's own statements and 29 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.
D2 · Cognitive Complexity · buildStructure (cognitive 287) · ×1
  • buildStructure (cognitive 287) src/aqueducts/arcade.js:57 — buildStructure has cognitive complexity 287 (threshold 15). Drivers by points: ternaries 40 (153 pts), if/else 24 (68 pts), loops 22 (53 pts), boolean chains 12, other 1 (nesting depth added 188). Of this number, 282 points are the body's own statements and 5 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 259) · ×1
  • build (cognitive 259) src/modules/acropolis.js:45 — build has cognitive complexity 259 (threshold 15). Drivers by points: if/else 58 (111 pts), loops 35 (54 pts), boolean chains 50, ternaries 27 (42 pts), other 2 (nesting depth added 87). Of this number, 152 points are the body's own statements and 107 belong to 57 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildHouse (cognitive 239) · ×1
  • buildHouse (cognitive 239) src/city/buildings.js:50 — buildHouse has cognitive complexity 239 (threshold 15). Drivers by points: ternaries 81 (183 pts), if/else 92 (141 pts), boolean chains 57, loops 11 (24 pts), other 11 (nesting depth added 164). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateFarGrid (cognitive 233) · ×1
  • generateFarGrid (cognitive 233) src/terrain/farfield.js:102 — generateFarGrid has cognitive complexity 233 (threshold 15). Drivers by points: if/else 32 (80 pts), loops 38 (66 pts), other 63, ternaries 7 (16 pts), boolean chains 8 (nesting depth added 85). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scatterCover (cognitive 171) · ×1
  • scatterCover (cognitive 171) src/modules/flora.js:135 — scatterCover has cognitive complexity 171 (threshold 15). Drivers by points: ternaries 21 (65 pts), if/else 22 (59 pts), boolean chains 26, other 12, loops 4 (9 pts) (nesting depth added 86). Of this number, 169 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeLots (cognitive 160) · ×1
  • makeLots (cognitive 160) src/city/lots.js:57 — makeLots has cognitive complexity 160 (threshold 15). Drivers by points: if/else 25 (98 pts), ternaries 9 (38 pts), loops 6 (17 pts), boolean chains 7 (nesting depth added 113). Of this number, 155 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.
D2 · Cognitive Complexity · compute (cognitive 153) · ×1
  • compute (cognitive 153) src/arch/ao.js:69 — compute has cognitive complexity 153 (threshold 15). Drivers by points: loops 26 (86 pts), if/else 12 (58 pts), boolean chains 5, other 4 (nesting depth added 106). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · buildHouse · ×1
  • buildHouse::mkVol (cognitive 153) src/city/buildings.js:120 — buildHouse::mkVol has cognitive complexity 153 (threshold 15). Drivers by points: ternaries 36 (64 pts), if/else 24 (33 pts), boolean chains 29, loops 7 (16 pts), other 11 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildPodium (cognitive 149) · ×1
  • buildPodium (cognitive 149) src/acropolis/podium.js:41 — buildPodium has cognitive complexity 149 (threshold 15). Drivers by points: ternaries 22 (65 pts), loops 19 (43 pts), if/else 13 (36 pts), boolean chains 4, other 1 (nesting depth added 90). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · peripteralTemple (cognitive 146) · ×1
  • peripteralTemple (cognitive 146) src/arch/temple.js:267 — peripteralTemple has cognitive complexity 146 (threshold 15). Drivers by points: ternaries 22 (48 pts), other 39, loops 17 (33 pts), if/else 10 (21 pts), boolean chains 5 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildTerraceHouses (cognitive 145) · ×1
  • buildTerraceHouses (cognitive 145) src/acropolis/houses.js:268 — buildTerraceHouses has cognitive complexity 145 (threshold 15). Drivers by points: if/else 34 (82 pts), ternaries 14 (32 pts), loops 9 (18 pts), boolean chains 9, error handling 2 (3 pts), other 1 (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildEastGarden (cognitive 142) · ×1
  • buildEastGarden (cognitive 142) src/acropolis/garden.js:33 — buildEastGarden has cognitive complexity 142 (threshold 15). Drivers by points: if/else 31 (67 pts), loops 25 (43 pts), boolean chains 23, ternaries 2 (5 pts), other 4 (nesting depth added 57). Of this number, 131 points are the body's own statements and 11 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildAqueductTop (cognitive 141) · ×1
  • buildAqueductTop (cognitive 141) src/aqueducts/arcade.js:346 — buildAqueductTop has cognitive complexity 141 (threshold 15). Drivers by points: ternaries 16 (62 pts), loops 20 (55 pts), if/else 11 (21 pts), boolean chains 3 (nesting depth added 91). Of this number, 138 points are the body's own statements and 3 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · traceStream (cognitive 141) · ×1
  • traceStream (cognitive 141) src/water/trace.js:67 — traceStream has cognitive complexity 141 (threshold 15). Drivers by points: if/else 29 (83 pts), ternaries 9 (34 pts), boolean chains 9, other 9, loops 2 (6 pts) (nesting depth added 83). Of this number, 140 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.
D2 · Cognitive Complexity · build (cognitive 134) · ×1
  • build (cognitive 134) src/modules/waterfalls.js:57 — build has cognitive complexity 134 (threshold 15). Drivers by points: if/else 35 (50 pts), loops 12 (23 pts), boolean chains 21, ternaries 11 (21 pts), error handling 7 (12 pts), other 7 (nesting depth added 41). Of this number, 106 points are the body's own statements and 28 belong to 25 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildHouse (cognitive 132) · ×1
  • buildHouse (cognitive 132) src/acropolis/houses.js:122 — buildHouse has cognitive complexity 132 (threshold 15). Drivers by points: if/else 21 (51 pts), loops 15 (36 pts), ternaries 12 (33 pts), boolean chains 12 (nesting depth added 72). Of this number, 129 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallRun (cognitive 131) · ×1
  • wallRun (cognitive 131) src/acropolis/masonry.js:35 — wallRun has cognitive complexity 131 (threshold 15). Drivers by points: if/else 23 (73 pts), ternaries 7 (23 pts), loops 11 (22 pts), boolean chains 8, other 5 (nesting depth added 77). Of this number, 128 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildHarbour (cognitive 129) · ×1
  • buildHarbour (cognitive 129) src/city/harbour.js:113 — buildHarbour has cognitive complexity 129 (threshold 15). Drivers by points: ternaries 17 (56 pts), loops 15 (35 pts), if/else 15 (28 pts), boolean chains 8, other 2 (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.
D2 · Cognitive Complexity · buildPodiumAndPaving (cognitive 129) · ×1
  • buildPodiumAndPaving (cognitive 129) src/ruins/portico.js:270 — buildPodiumAndPaving has cognitive complexity 129 (threshold 15). Drivers by points: ternaries 22 (98 pts), if/else 7 (18 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 92). Of this number, 114 points are the body's own statements and 15 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildBastion (cognitive 128) · ×1
  • buildBastion (cognitive 128) src/acropolis/plaza.js:137 — buildBastion has cognitive complexity 128 (threshold 15). Drivers by points: loops 19 (54 pts), if/else 17 (51 pts), ternaries 5 (12 pts), boolean chains 8, other 3 (nesting depth added 76). Of this number, 127 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.
D2 · Cognitive Complexity · buildBridgeDeck (cognitive 128) · ×1
  • buildBridgeDeck (cognitive 128) src/aqueducts/arcade.js:562 — buildBridgeDeck has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 28 (68 pts), if/else 15 (32 pts), loops 18 (25 pts), boolean chains 3 (nesting depth added 64). Of this number, 121 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · city.build (cognitive 124) · ×1
  • city.build (cognitive 124) src/modules/city.js:122 — city.build has cognitive complexity 124 (threshold 15). Drivers by points: if/else 19 (44 pts), loops 21 (31 pts), ternaries 6 (24 pts), boolean chains 16, error handling 8 (9 pts) (nesting depth added 54). Of this number, 117 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flow.buildFlowMap (cognitive 121) · ×1
  • flow.buildFlowMap (cognitive 121) src/water/flow.js:53 — flow.buildFlowMap has cognitive complexity 121 (threshold 15). Drivers by points: if/else 22 (75 pts), loops 14 (32 pts), boolean chains 8, ternaries 5 (6 pts) (nesting depth added 72). Of this number, 118 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · meshSDF (cognitive 118) · ×1
  • meshSDF (cognitive 118) src/sculpt/mesher.js:15 — meshSDF has cognitive complexity 118 (threshold 15). Drivers by points: loops 19 (54 pts), if/else 17 (47 pts), boolean chains 12, other 3, ternaries 2 (nesting depth added 65). Of this number, 100 points are the body's own statements and 18 belong to 5 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · gateTower (cognitive 112) · ×1
  • gateTower (cognitive 112) src/arch/elements.js:222 — gateTower has cognitive complexity 112 (threshold 15). Drivers by points: ternaries 18 (54 pts), loops 20 (38 pts), other 10, if/else 7 (9 pts), boolean chains 1 (nesting depth added 56). Of this number, 111 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · placePortFleet (cognitive 107) · ×1
  • placePortFleet (cognitive 107) src/city/fleet.js:153 — placePortFleet has cognitive complexity 107 (threshold 15). Drivers by points: ternaries 25 (55 pts), if/else 10 (19 pts), boolean chains 17, loops 6 (8 pts), other 8 (nesting depth added 41). Of this number, 92 points are the body's own statements and 15 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · placeFleet (cognitive 106) · ×1
  • placeFleet (cognitive 106) src/city/fleet.js:24 — placeFleet has cognitive complexity 106 (threshold 15). Drivers by points: ternaries 19 (43 pts), if/else 16 (36 pts), boolean chains 12, loops 5 (8 pts), other 7 (nesting depth added 47). Of this number, 96 points are the body's own statements and 10 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · emblem (cognitive 106) · ×1
  • emblem (cognitive 106) src/sculpt/props.js:47 — emblem has cognitive complexity 106 (threshold 15). Drivers by points: if/else 24 (54 pts), loops 10 (24 pts), ternaries 8 (17 pts), boolean chains 11 (nesting depth added 53). Of this number, 101 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doricRun (cognitive 104) · ×1
  • doricRun (cognitive 104) src/arch/entablature.js:66 — doricRun has cognitive complexity 104 (threshold 15). Drivers by points: ternaries 25 (43 pts), if/else 16 (31 pts), loops 9 (16 pts), boolean chains 13, other 1 (nesting depth added 40). Of this number, 103 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildFlight (cognitive 101) · ×1
  • buildFlight (cognitive 101) src/acropolis/stair.js:162 — buildFlight has cognitive complexity 101 (threshold 15). Drivers by points: ternaries 15 (52 pts), if/else 13 (32 pts), loops 6 (11 pts), boolean chains 6 (nesting depth added 61). Of this number, 98 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stair.buildStair (cognitive 99) · ×1
  • stair.buildStair (cognitive 99) src/acropolis/stair.js:89 — stair.buildStair has cognitive complexity 99 (threshold 15). Drivers by points: if/else 13 (43 pts), ternaries 8 (30 pts), loops 6 (18 pts), boolean chains 8 (nesting depth added 64). Of this number, 91 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bastion.buildColossusBastion (cognitive 98) · ×1
  • bastion.buildColossusBastion (cognitive 98) src/acropolis/bastion.js:38 — bastion.buildColossusBastion has cognitive complexity 98 (threshold 15). Drivers by points: loops 22 (40 pts), ternaries 12 (35 pts), if/else 10 (14 pts), boolean chains 8, error handling 1 (nesting depth added 45). Of this number, 37 points are the body's own statements and 61 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildPlatform (cognitive 98) · ×1
  • buildPlatform (cognitive 98) src/acropolis/buildings.js:70 — buildPlatform has cognitive complexity 98 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 12 (34 pts), boolean chains 11, ternaries 5 (10 pts), other 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeFigure (cognitive 93) · ×1
  • makeFigure (cognitive 93) src/sculpt/figure.js:159 — makeFigure has cognitive complexity 93 (threshold 15). Drivers by points: loops 13 (25 pts), ternaries 20 (23 pts), boolean chains 22, other 15, if/else 7 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildShip (cognitive 92) · ×1
  • buildShip (cognitive 92) src/city/ships.js:150 — buildShip has cognitive complexity 92 (threshold 15). Drivers by points: if/else 25 (43 pts), loops 11 (23 pts), ternaries 10 (18 pts), other 7, boolean chains 1 (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.
D2 · Cognitive Complexity · rockCluster (cognitive 92) · ×1
  • rockCluster (cognitive 92) src/flora/rocks.js:62 — rockCluster has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 16 (46 pts), if/else 6 (16 pts), loops 6 (16 pts), boolean chains 9, other 5 (nesting depth added 50). Of this number, 79 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · buildSheet (cognitive 88) · ×1
  • buildSheet (cognitive 88) src/water/fallMesh.js:126 — buildSheet has cognitive complexity 88 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 12 (23 pts), other 8, ternaries 3 (7 pts), boolean chains 4 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scatterBoulders (cognitive 87) · ×1
  • scatterBoulders (cognitive 87) src/terrain/boulders.js:41 — scatterBoulders has cognitive complexity 87 (threshold 15). Drivers by points: if/else 15 (42 pts), ternaries 6 (19 pts), loops 9 (14 pts), boolean chains 11, other 1 (nesting depth added 45). Of this number, 85 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edgeIvySlots (cognitive 83) · ×1
  • edgeIvySlots (cognitive 83) src/modules/flora.js:326 — edgeIvySlots has cognitive complexity 83 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 9 (19 pts), boolean chains 12, other 7, ternaries 3 (5 pts) (nesting depth added 38). Of this number, 76 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pediment (cognitive 81) · ×1
  • pediment (cognitive 81) src/arch/entablature.js:251 — pediment has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 13 (35 pts), if/else 13 (22 pts), loops 6 (13 pts), other 9, boolean chains 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildHeadSet (cognitive 80) · ×1
  • buildHeadSet (cognitive 80) src/modules/ruins.js:119 — buildHeadSet has cognitive complexity 80 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 12 (24 pts), boolean chains 12, ternaries 5 (12 pts), error handling 1 (2 pts) (nesting depth added 37). Of this number, 44 points are the body's own statements and 36 belong to 20 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stair.buildLanding (cognitive 79) · ×1
  • stair.buildLanding (cognitive 79) src/acropolis/stair.js:256 — stair.buildLanding has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 12 (45 pts), if/else 10 (19 pts), loops 5 (8 pts), boolean chains 7 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gullGeometry (cognitive 79) · ×1
  • gullGeometry (cognitive 79) src/modules/birds.js:9 — gullGeometry has cognitive complexity 79 (threshold 15). Drivers by points: if/else 9 (33 pts), loops 14 (27 pts), ternaries 5 (16 pts), boolean chains 3 (nesting depth added 48). Of this number, 77 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildTexture (cognitive 77) · ×1
  • buildTexture (cognitive 77) src/vegetation/atlas.js:225 — buildTexture has cognitive complexity 77 (threshold 15). Drivers by points: loops 16 (41 pts), if/else 7 (26 pts), ternaries 3 (9 pts), boolean chains 1 (nesting depth added 50). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · bankTerraces (cognitive 74) · ×1
  • bankTerraces (cognitive 74) src/city/port.js:103 — bankTerraces has cognitive complexity 74 (threshold 15). Drivers by points: if/else 7 (26 pts), ternaries 9 (20 pts), loops 8 (18 pts), boolean chains 9, other 1 (nesting depth added 40). Of this number, 67 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createRock (cognitive 73) · ×1
  • createRock (cognitive 73) src/materials/stone.js:374 — createRock has cognitive complexity 73 (threshold 15). Drivers by points: loops 17 (27 pts), ternaries 14 (21 pts), if/else 10 (15 pts), other 8, boolean chains 2 (nesting depth added 22). Of this number, 64 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · headSDF (cognitive 71) · ×1
  • headSDF (cognitive 71) src/sculpt/head.js:274 — headSDF has cognitive complexity 71 (threshold 15). Drivers by points: if/else 28 (48 pts), loops 5 (11 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · previewGrid (cognitive 71) · ×1
  • previewGrid (cognitive 71) src/terrain/preview.mjs:7 — previewGrid has cognitive complexity 71 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 6 (18 pts), ternaries 3 (10 pts), boolean chains 4, other 4 (nesting depth added 44). Of this number, 67 points are the body's own statements and 4 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 70) · ×1
  • build (cognitive 70) src/modules/temple.js:199 — build has cognitive complexity 70 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 6 (14 pts), loops 9 (10 pts), other 9, boolean chains 8, error handling 1 (nesting depth added 22). Most of this is not in the body itself: 4 of the 70 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 342, a function literal at line 321, a function literal at line 247, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · buildTree (cognitive 69) · ×1
  • buildTree (cognitive 69) src/vegetation/trees.js:49 — buildTree has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 40 (61 pts), if/else 24 (43 pts), loops 19 (29 pts), boolean chains 9 (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.
D2 · Cognitive Complexity · renderView (cognitive 69) · ×1
  • renderView (cognitive 69) src/ruins/headpreview.mjs:33 — renderView has cognitive complexity 69 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 15, loops 8 (15 pts), ternaries 8 (14 pts) (nesting depth added 26). Of this number, 65 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planChunks · ×1
  • planChunks::reqCell (cognitive 68) src/terrain/lod.js:55 — planChunks::reqCell has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 8 (17 pts), ternaries 3 (8 pts), boolean chains 5 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tiledRoof (cognitive 66) · ×1
  • tiledRoof (cognitive 66) src/arch/entablature.js:365 — tiledRoof has cognitive complexity 66 (threshold 15). Drivers by points: loops 9 (26 pts), ternaries 6 (24 pts), if/else 6 (9 pts), other 6, boolean chains 1 (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.
D2 · Cognitive Complexity · VegSystem._update (cognitive 65) · ×1
  • VegSystem._update (cognitive 65) src/vegetation/instances.js:157 — VegSystem._update has cognitive complexity 65 (threshold 15). Drivers by points: if/else 9 (31 pts), ternaries 4 (18 pts), loops 5 (12 pts), boolean chains 4 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · sweep (cognitive 65) · ×1
  • sweep (cognitive 65) src/arch/geom.js:302 — sweep has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 9 (21 pts), loops 9 (19 pts), if/else 6 (13 pts), boolean chains 10, other 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · box (cognitive 64) · ×1
  • box (cognitive 64) src/arch/geom.js:137 — box has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 9 (36 pts), if/else 13 (19 pts), loops 3 (6 pts), boolean chains 2, other 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 64) · ×1
  • build (cognitive 64) src/props/banner.js:310 — build has cognitive complexity 64 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 7 (16 pts), ternaries 8 (16 pts), other 10, boolean chains 1 (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.
D2 · Cognitive Complexity · acanthus.corinthianCapital (cognitive 63) · ×1
  • acanthus.corinthianCapital (cognitive 63) src/arch/acanthus.js:191 — acanthus.corinthianCapital has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 20 (44 pts), loops 9 (14 pts), if/else 1 (3 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prostyleTemple (cognitive 62) · ×1
  • prostyleTemple (cognitive 62) src/arch/temple.js:456 — prostyleTemple has cognitive complexity 62 (threshold 15). Drivers by points: other 27, ternaries 9 (13 pts), loops 7 (11 pts), if/else 5 (8 pts), boolean chains 3 (nesting depth added 11). Of this number, 59 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tholos (cognitive 59) · ×1
  • tholos (cognitive 59) src/arch/tholos.js:19 — tholos has cognitive complexity 59 (threshold 15). Drivers by points: loops 14 (19 pts), other 19, ternaries 6 (9 pts), if/else 6 (8 pts), boolean chains 4 (nesting depth added 10). Of this number, 57 points are the body's own statements and 2 belong to 16 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · drawHeader (cognitive 59) · ×1
  • drawHeader (cognitive 59) src/props/bannerArt.js:165 — drawHeader has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 10 (19 pts), loops 7 (19 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · crepidoma (cognitive 57) · ×1
  • crepidoma (cognitive 57) src/arch/temple.js:93 — crepidoma has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 6 (13 pts), other 12, loops 5 (11 pts), boolean chains 6 (nesting depth added 22). Of this number, 48 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chamferBox (cognitive 56) · ×1
  • chamferBox (cognitive 56) src/acropolis/geo.js:241 — chamferBox has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 15, loops 7 (11 pts), ternaries 6 (nesting depth added 16). Of this number, 47 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cliffGreenery (cognitive 56) · ×1
  • cliffGreenery (cognitive 56) src/modules/flora.js:396 — cliffGreenery has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 6 (24 pts), if/else 6 (22 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flutedShaft (cognitive 55) · ×1
  • flutedShaft (cognitive 55) src/arch/orders.js:33 — flutedShaft has cognitive complexity 55 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 6 (15 pts), loops 8 (13 pts), other 7, boolean chains 4 (nesting depth added 23). Of this number, 28 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.
D2 · Cognitive Complexity · placeLandmarks (cognitive 55) · ×1
  • placeLandmarks (cognitive 55) src/city/landmarks.js:336 — placeLandmarks has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 15 (23 pts), if/else 13 (19 pts), loops 6 (8 pts), boolean chains 5 (nesting depth added 16). Of this number, 29 points are the body's own statements and 26 belong to 29 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · growIvy (cognitive 55) · ×1
  • growIvy (cognitive 55) src/ruins/ivy.js:124 — growIvy has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (24 pts), other 12, boolean chains 8, ternaries 3 (7 pts), loops 3 (4 pts) (nesting depth added 19). Of this number, 49 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 54) · ×1
  • build (cognitive 54) src/modules/water.js:29 — build has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 8 (12 pts), boolean chains 8, ternaries 5 (7 pts), other 3, error handling 1 (2 pts) (nesting depth added 17). Of this number, 36 points are the body's own statements and 18 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finalize (cognitive 52) · ×1
  • finalize (cognitive 52) src/arch/build.js:46 — finalize has cognitive complexity 52 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 8 (18 pts), boolean chains 7, other 4, ternaries 2 (3 pts) (nesting depth added 23). Of this number, 46 points are the body's own statements and 6 belong to 22 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flora.viewIvySlots (cognitive 51) · ×1
  • flora.viewIvySlots (cognitive 51) src/modules/flora.js:451 — flora.viewIvySlots has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (32 pts), boolean chains 8, loops 4 (7 pts), ternaries 1 (4 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fillLots (cognitive 51) · ×1
  • fillLots (cognitive 51) src/city/lots.js:158 — fillLots has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 4 (9 pts), boolean chains 3, other 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addMist (cognitive 51) · ×1
  • addMist (cognitive 51) src/modules/waterfalls.js:300 — addMist has cognitive complexity 51 (threshold 15). Drivers by points: loops 14 (25 pts), if/else 11 (17 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 18). Of this number, 37 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · islandBridge (cognitive 50) · ×1
  • islandBridge (cognitive 50) src/acropolis/bridge.js:17 — islandBridge has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 11 (22 pts), loops 13 (20 pts), if/else 3 (4 pts), boolean chains 2, other 2 (nesting depth added 19). Of this number, 41 points are the body's own statements and 9 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shaftSegment (cognitive 50) · ×1
  • shaftSegment (cognitive 50) src/arch/ruins.js:47 — shaftSegment has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 19 (31 pts), other 9, if/else 5 (7 pts), boolean chains 2, loops 1 (nesting depth added 14). Of this number, 19 points are the body's own statements and 31 belong to 10 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · streetStrip (cognitive 50) · ×1
  • streetStrip (cognitive 50) src/modules/city.js:73 — streetStrip has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 5 (25 pts), if/else 4 (15 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shieldGeometry (cognitive 50) · ×1
  • shieldGeometry (cognitive 50) src/sculpt/props.js:179 — shieldGeometry has cognitive complexity 50 (threshold 15). Drivers by points: loops 9 (16 pts), ternaries 6 (14 pts), if/else 7 (13 pts), boolean chains 5, other 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · droplets (cognitive 50) · ×1
  • droplets (cognitive 50) src/terrain/erosion.js:153 — droplets has cognitive complexity 50 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 6 (11 pts), other 10, boolean chains 5, ternaries 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · temple (cognitive 49) · ×1
  • temple (cognitive 49) src/city/landmarks.js:41 — temple has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 8 (18 pts), loops 9 (13 pts), if/else 6 (11 pts), other 5, 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.
D2 · Cognitive Complexity · build (cognitive 48) · ×1
  • build (cognitive 48) src/modules/statues.js:543 — build has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 12, loops 4 (10 pts), ternaries 3 (6 pts), error handling 3 (4 pts) (nesting depth added 16). Of this number, 47 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planCascade (cognitive 48) · ×1
  • planCascade (cognitive 48) src/water/rapids.js:181 — planCascade has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 7 (12 pts), ternaries 4 (11 pts), boolean chains 5, error handling 1 (nesting depth added 19). Of this number, 37 points are the body's own statements and 11 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · composePediment · ×1
  • composePediment::layer (cognitive 47) src/sculpt/pediment.js:27 — composePediment::layer has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 7 (15 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pavePrecinct (cognitive 46) · ×1
  • pavePrecinct (cognitive 46) src/acropolis/podium.js:288 — pavePrecinct has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 7 (12 pts), boolean chains 2, other 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contours (cognitive 46) · ×1
  • contours (cognitive 46) src/acropolis/site.js:28 — contours has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 7 (17 pts), loops 5 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 21). Of this number, 34 points are the body's own statements and 12 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stoa (cognitive 46) · ×1
  • stoa (cognitive 46) src/arch/elements.js:132 — stoa has cognitive complexity 46 (threshold 15). Drivers by points: other 15, loops 11 (12 pts), ternaries 6 (12 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 8). Of this number, 42 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ribbon (cognitive 45) · ×1
  • ribbon (cognitive 45) src/water/fallMesh.js:34 — ribbon has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 5 (7 pts), other 7, ternaries 2 (5 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.
D2 · Cognitive Complexity · ionicRun (cognitive 44) · ×1
  • ionicRun (cognitive 44) src/arch/entablature.js:183 — ionicRun has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 12 (19 pts), if/else 7 (10 pts), loops 4 (7 pts), other 5, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildShot2 (cognitive 44) · ×1
  • buildShot2 (cognitive 44) src/sets/shot2.js:18 — buildShot2 has cognitive complexity 44 (threshold 15). Drivers by points: loops 19 (27 pts), ternaries 5 (9 pts), if/else 3 (5 pts), boolean chains 2, other 1 (nesting depth added 14). Of this number, 40 points are the body's own statements and 4 belong to 9 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · cella (cognitive 43) · ×1
  • cella (cognitive 43) src/arch/temple.js:209 — cella has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 13 (25 pts), if/else 4 (8 pts), loops 4 (5 pts), other 3, boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findTheatreSite (cognitive 43) · ×1
  • findTheatreSite (cognitive 43) src/city/landmarks.js:574 — findTheatreSite has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 4 (10 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · placeStatues (cognitive 43) · ×1
  • placeStatues (cognitive 43) src/modules/statues.js:386 — placeStatues has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 4 (8 pts), ternaries 3 (6 pts), other 3 (nesting depth added 16). Of this number, 40 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 43) · ×1
  • build (cognitive 43) src/props/brazier.js:262 — build has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 8 (12 pts), boolean chains 5, other 5, loops 3 (nesting depth added 13). Of this number, 40 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thermal (cognitive 43) · ×1
  • thermal (cognitive 43) src/terrain/erosion.js:123 — thermal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 4 (20 pts), loops 6 (16 pts), ternaries 1 (4 pts), other 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planWallLine (cognitive 42) · ×1
  • planWallLine (cognitive 42) src/acropolis/walls.js:45 — planWallLine has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, loops 4 (6 pts), other 4 (nesting depth added 14). Of this number, 39 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · islandEnsemble (cognitive 42) · ×1
  • islandEnsemble (cognitive 42) src/modules/temple.js:71 — islandEnsemble has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (16 pts), loops 11 (14 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 16). Of this number, 40 points are the body's own statements and 2 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · arcade.buildArcade (cognitive 41) · ×1
  • arcade.buildArcade (cognitive 41) src/acropolis/arcade.js:87 — arcade.buildArcade has cognitive complexity 41 (threshold 15). Drivers by points: loops 10 (17 pts), ternaries 6 (17 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flora.stairIvySlots (cognitive 41) · ×1
  • flora.stairIvySlots (cognitive 41) src/modules/flora.js:254 — flora.stairIvySlots has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 5 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 25). Of this number, 39 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildPrecinctBuildings (cognitive 41) · ×1
  • buildPrecinctBuildings (cognitive 41) src/acropolis/buildings.js:235 — buildPrecinctBuildings has cognitive complexity 41 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (10 pts), boolean chains 7, ternaries 3 (5 pts), error handling 2 (3 pts), other 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · isoLines (cognitive 40) · ×1
  • isoLines (cognitive 40) src/city/walls.js:11 — isoLines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 4 (12 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bannerTextures (cognitive 39) · ×1
  • bannerTextures (cognitive 39) src/props/banner.js:81 — bannerTextures has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (27 pts), loops 4 (6 pts), if/else 3 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · olive.canopyAO (cognitive 38) · ×1
  • olive.canopyAO (cognitive 38) src/flora/olive.js:53 — olive.canopyAO has cognitive complexity 38 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 6 (16 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · banners.build (cognitive 38) · ×1
  • banners.build (cognitive 38) src/modules/banners.js:65 — banners.build has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 9, loops 6, if/else 2 (3 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · findSite (cognitive 38) · ×1
  • findSite (cognitive 38) src/acropolis/buildings.js:41 — findSite has cognitive complexity 38 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (10 pts), boolean chains 4, ternaries 1 (3 pts), other 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildGateTower (cognitive 38) · ×1
  • buildGateTower (cognitive 38) src/aqueducts/arcade.js:706 — buildGateTower has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (24 pts), loops 9 (13 pts), other 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawLaurelWreath (cognitive 38) · ×1
  • drawLaurelWreath (cognitive 38) src/props/owl.js:335 — drawLaurelWreath has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 5 (14 pts), loops 5 (9 pts), other 8, if/else 3 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rapids.buildRapidsRocks (cognitive 37) · ×1
  • rapids.buildRapidsRocks (cognitive 37) src/water/rapids.js:18 — rapids.buildRapidsRocks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 6 (8 pts), boolean chains 6, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clouds.build (cognitive 37) · ×1
  • clouds.build (cognitive 37) src/modules/clouds.js:537 — clouds.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 11, loops 4, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 557, 556). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · buildTerraceBuildings (cognitive 37) · ×1
  • buildTerraceBuildings (cognitive 37) src/acropolis/buildings.js:167 — buildTerraceBuildings has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (8 pts), boolean chains 5, error handling 3 (4 pts), other 4, loops 3 (nesting depth added 10). Of this number, 28 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dressPrecinct (cognitive 37) · ×1
  • dressPrecinct (cognitive 37) src/acropolis/podium.js:342 — dressPrecinct has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 12, loops 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 35 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parapet (cognitive 37) · ×1
  • parapet (cognitive 37) src/acropolis/stair.js:374 — parapet has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 15 (27 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). Of this number, 35 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · walls.tower (cognitive 36) · ×1
  • walls.tower (cognitive 36) src/city/walls.js:109 — walls.tower has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 7 (24 pts), loops 4 (8 pts), if/else 3 (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.
D2 · Cognitive Complexity · planWeirs (cognitive 36) · ×1
  • planWeirs (cognitive 36) src/water/rapids.js:123 — planWeirs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (8 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 16). Of this number, 30 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · heightmap.captureHeightMap (cognitive 35) · ×1
  • heightmap.captureHeightMap (cognitive 35) src/water/heightmap.js:46 — heightmap.captureHeightMap has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 6 (15 pts), boolean chains 2, ternaries 2 (nesting depth added 16). Of this number, 32 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ivyCurtain (cognitive 35) · ×1
  • ivyCurtain (cognitive 35) src/flora/ivy.js:63 — ivyCurtain has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 6 (12 pts), other 4, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plantAtlas (cognitive 35) · ×1
  • plantAtlas (cognitive 35) src/props/urn.js:123 — plantAtlas has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 5 (18 pts), loops 9 (13 pts), if/else 2 (4 pts) (nesting depth added 19). Of this number, 33 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stair.stepSlab (cognitive 34) · ×1
  • stair.stepSlab (cognitive 34) src/acropolis/stair.js:483 — stair.stepSlab has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 6 (11 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · atlas.drawTwig (cognitive 34) · ×1
  • atlas.drawTwig (cognitive 34) src/vegetation/atlas.js:123 — atlas.drawTwig has cognitive complexity 34 (threshold 15). Drivers by points: loops 9 (16 pts), ternaries 5 (13 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 17). Of this number, 28 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · leaf (cognitive 34) · ×1
  • leaf (cognitive 34) src/arch/acanthus.js:16 — leaf has cognitive complexity 34 (threshold 15). Drivers by points: other 14, loops 5 (7 pts), ternaries 4 (7 pts), if/else 3 (5 pts), boolean chains 1 (nesting depth added 7). Of this number, 22 points are the body's own statements and 12 belong to 11 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · streamPower (cognitive 34) · ×1
  • streamPower (cognitive 34) src/terrain/erosion.js:93 — streamPower has cognitive complexity 34 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 3 (9 pts), other 7, loops 3 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · landmarks.findSite (cognitive 33) · ×1
  • landmarks.findSite (cognitive 33) src/city/landmarks.js:14 — landmarks.findSite has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flora.test (cognitive 33) · ×1
  • flora.test (cognitive 33) src/modules/flora.js:727 — flora.test has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 5 (6 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 18). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · city.addTestTrees (cognitive 33) · ×1
  • city.addTestTrees (cognitive 33) src/modules/city.js:469 — city.addTestTrees has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (21 pts), if/else 4 (6 pts), loops 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 18). Of this number, 30 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · traceFall (cognitive 33) · ×1
  • traceFall (cognitive 33) src/water/trace.js:232 — traceFall has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (10 pts), other 9, ternaries 5 (8 pts), boolean chains 3, if/else 2 (3 pts) (nesting depth added 8). Of this number, 32 points are the body's own statements and 1 belongs to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · props.mouldedBlock (cognitive 32) · ×1
  • props.mouldedBlock (cognitive 32) src/sculpt/props.js:314 — props.mouldedBlock has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (13 pts), ternaries 4 (12 pts), if/else 2 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · flora.build (cognitive 32) · ×1
  • flora.build (cognitive 32) src/modules/flora.js:622 — flora.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 6 (9 pts), loops 6 (8 pts), boolean chains 3 (nesting depth added 10). Of this number, 28 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · util.addBlob (cognitive 32) · ×1
  • util.addBlob (cognitive 32) src/vegetation/util.js:90 — util.addBlob has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (12 pts), loops 6 (8 pts), boolean chains 7, if/else 2 (5 pts) (nesting depth added 10). Of this number, 28 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildArch (cognitive 32) · ×1
  • buildArch (cognitive 32) src/acropolis/masonry.js:337 — buildArch has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 11 (24 pts), loops 6 (7 pts), other 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · roof (cognitive 32) · ×1
  • roof (cognitive 32) src/city/house.js:99 — roof has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (8 pts), loops 2 (4 pts), boolean chains 2, other 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fallbackSlots (cognitive 32) · ×1
  • fallbackSlots (cognitive 32) src/modules/statues.js:341 — fallbackSlots has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cypress.buildCypress (cognitive 31) · ×1
  • cypress.buildCypress (cognitive 31) src/vegetation/cypress.js:43 — cypress.buildCypress has cognitive complexity 31 (threshold 15). Drivers by points: loops 25 (41 pts), if/else 13 (24 pts), ternaries 11 (24 pts), boolean chains 3 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addDefaults (cognitive 31) · ×1
  • addDefaults (cognitive 31) src/modules/banners.js:107 — addDefaults has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (7 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 15). Of this number, 17 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · placeSculpture (cognitive 31) · ×1
  • placeSculpture (cognitive 31) src/modules/statues.js:498 — placeSculpture has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 11, loops 3 (4 pts), other 1, ternaries 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build (cognitive 31) · ×1
  • build (cognitive 31) src/props/urn.js:339 — build has cognitive complexity 31 (threshold 15). Drivers by points: other 9, loops 3 (7 pts), ternaries 4 (7 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 9). Of this number, 28 points are the body's own statements and 3 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildPortico (cognitive 31) · ×1
  • buildPortico (cognitive 31) src/ruins/portico.js:65 — buildPortico has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (10 pts), if/else 5 (9 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · boot (cognitive 30) · ×1
  • boot (cognitive 30) src/main.js:12 — boot has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 4 (6 pts), loops 2, other 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 14 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · opening (cognitive 30) · ×1
  • opening (cognitive 30) src/acropolis/houses.js:76 — opening has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 5 (6 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lathe (cognitive 30) · ×1
  • lathe (cognitive 30) src/arch/geom.js:210 — lathe has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 4 (8 pts), other 4, 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.
D2 · Cognitive Complexity · buildAll (cognitive 30) · ×1
  • buildAll (cognitive 30) src/modules/aqueducts.js:38 — buildAll has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 3 (6 pts), loops 4 (6 pts), other 2, error handling 1 (nesting depth added 13). Of this number, 29 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildIvy (cognitive 30) · ×1
  • buildIvy (cognitive 30) src/modules/flora.js:494 — buildIvy has cognitive complexity 30 (threshold 15). Drivers by points: other 12, boolean chains 8, if/else 5 (7 pts), loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildHeroes (cognitive 30) · ×1
  • buildHeroes (cognitive 30) src/modules/flora.js:542 — buildHeroes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, other 6, loops 3, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 29 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pilasterSDF (cognitive 30) · ×1
  • pilasterSDF (cognitive 30) src/ruins/columns.js:174 — pilasterSDF has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (10 pts), boolean chains 4, other 3, loops 2 (nesting depth added 10). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 185, (anonymous)::fl). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ruinStoneMaterial (cognitive 30) · ×1
  • ruinStoneMaterial (cognitive 30) src/ruins/materials.js:284 — ruinStoneMaterial has cognitive complexity 30 (threshold 15). Drivers by points: other 14, ternaries 11, boolean chains 5. None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 286). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · util.addTube (cognitive 29) · ×1
  • util.addTube (cognitive 29) src/vegetation/util.js:185 — util.addTube has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (8 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · statues.test (cognitive 29) · ×1
  • statues.test (cognitive 29) src/modules/statues.js:610 — statues.test has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (8 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · merge (cognitive 29) · ×1
  • merge (cognitive 29) src/arch/geom.js:72 — merge has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 3 (5 pts), ternaries 2 (3 pts), boolean chains 1, other 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildCypress · ×1
  • buildCypress::emitShingles (cognitive 29) src/vegetation/cypress.js:207 — buildCypress::emitShingles has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 2 (6 pts), loops 2 (3 pts), boolean chains 1, other 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geom.surface (cognitive 28) · ×1
  • geom.surface (cognitive 28) src/arch/geom.js:267 — geom.surface has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3 (7 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildColumn (cognitive 28) · ×1
  • buildColumn (cognitive 28) src/arch/orders.js:295 — buildColumn has cognitive complexity 28 (threshold 15). Drivers by points: other 11, ternaries 10, if/else 5, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · buildWalls (cognitive 28) · ×1
  • buildWalls (cognitive 28) src/city/walls.js:57 — buildWalls has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (11 pts), boolean chains 4 (nesting depth added 16). Of this number, 25 points are the body's own statements and 3 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyShot (cognitive 28) · ×1
  • applyShot (cognitive 28) src/core/engine.js:152 — applyShot has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), other 6, loops 5, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · resolve (cognitive 28) · ×1
  • resolve (cognitive 28) src/core/pipeline.js:488 — resolve has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 6 (8 pts), boolean chains 7, loops 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · stair.archedPassages (cognitive 27) · ×1
  • stair.archedPassages (cognitive 27) src/acropolis/stair.js:435 — stair.archedPassages has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (13 pts), ternaries 3 (11 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dressSheerFaces (cognitive 27) · ×1
  • dressSheerFaces (cognitive 27) src/acropolis/cliffdress.js:118 — dressSheerFaces has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), loops 3 (4 pts), other 4, ternaries 1 (3 pts) (nesting depth added 7). Of this number, 25 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeSpec (cognitive 27) · ×1
  • makeSpec (cognitive 27) src/aqueducts/arcade.js:12 — makeSpec has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 14 (21 pts), boolean chains 5, loops 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lavender (cognitive 27) · ×1
  • lavender (cognitive 27) src/flora/ground.js:144 — lavender has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (15 pts), ternaries 4 (10 pts), if/else 1 (2 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ivyColumn (cognitive 27) · ×1
  • ivyColumn (cognitive 27) src/flora/ivy.js:174 — ivyColumn has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 3 (8 pts), other 3, boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · parseSpill (cognitive 27) · ×1
  • parseSpill (cognitive 27) src/modules/waterfalls.js:26 — parseSpill has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 5 (6 pts), other 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · tube (cognitive 26) · ×1
  • tube (cognitive 26) src/flora/util.js:136 — tube has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (11 pts), loops 5 (8 pts), if/else 3 (5 pts), other 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stoneSDF (cognitive 26) · ×1
  • stoneSDF (cognitive 26) src/ruins/stones.js:18 — stoneSDF has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5, boolean chains 4, other 4, ternaries 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · textures.bleed (cognitive 25) · ×1
  • textures.bleed (cognitive 25) src/flora/textures.js:156 — textures.bleed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · voxel.maxFilter (cognitive 25) · ×1
  • voxel.maxFilter (cognitive 25) src/terrain/voxel.js:314 — voxel.maxFilter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (11 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 (voxel.minFilter) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · voxel.minFilter (cognitive 25) · ×1
  • voxel.minFilter (cognitive 25) src/terrain/voxel.js:322 — voxel.minFilter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (11 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 (voxel.maxFilter) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · flora.columnIvySlots (cognitive 25) · ×1
  • flora.columnIvySlots (cognitive 25) src/modules/flora.js:292 — flora.columnIvySlots has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 299, 295). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · buildPodiumStair (cognitive 25) · ×1
  • buildPodiumStair (cognitive 25) src/acropolis/podium.js:224 — buildPodiumStair has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 2 (6 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). Of this number, 21 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drumSDF (cognitive 25) · ×1
  • drumSDF (cognitive 25) src/ruins/columns.js:31 — drumSDF has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (9 pts), other 9, loops 4, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawSubSpray (cognitive 25) · ×1
  • drawSubSpray (cognitive 25) src/vegetation/atlas.js:329 — drawSubSpray has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 5 (10 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · acropolis (cognitive 25) · ×1
  • acropolis (cognitive 25) src/world/heightfield.js:430 — acropolis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (6 pts), boolean chains 3, ternaries 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.
D2 · Cognitive Complexity · heightfield.nearHeight (cognitive 24) · ×1
  • heightfield.nearHeight (cognitive 24) src/world/heightfield.js:758 — heightfield.nearHeight has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agora (cognitive 24) · ×1
  • agora (cognitive 24) src/city/landmarks.js:281 — agora has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (10 pts), ternaries 3 (9 pts), if/else 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · yellowFlowers (cognitive 24) · ×1
  • yellowFlowers (cognitive 24) src/flora/ground.js:84 — yellowFlowers has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (16 pts), 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.
D2 · Cognitive Complexity · dressRocks (cognitive 24) · ×1
  • dressRocks (cognitive 24) src/modules/flora.js:597 — dressRocks has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (14 pts), loops 5 (9 pts), other 1 (nesting depth added 11). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildLibrary (cognitive 24) · ×1
  • buildLibrary (cognitive 24) src/vegetation/library.js:19 — buildLibrary has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (19 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vegetation.test (cognitive 23) · ×1
  • vegetation.test (cognitive 23) src/modules/vegetation.js:38 — vegetation.test has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 6, boolean chains 1, if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · buildTower (cognitive 23) · ×1
  • buildTower (cognitive 23) src/acropolis/walls.js:508 — buildTower has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 4 (7 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · figure (cognitive 23) · ×1
  • figure (cognitive 23) src/city/house.js:499 — figure has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6 (8 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 5). Of this number, 20 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawIvyLeaf (cognitive 23) · ×1
  • drawIvyLeaf (cognitive 23) src/flora/textures.js:45 — drawIvyLeaf has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 5 (6 pts), ternaries 5 (6 pts), boolean chains 1 (nesting depth added 6). Of this number, 21 points are the body's own statements and 2 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · geom.tube (cognitive 22) · ×1
  • geom.tube (cognitive 22) src/arch/geom.js:430 — geom.tube has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (9 pts), ternaries 4 (7 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanTile.constructor (cognitive 22) · ×1
  • OceanTile.constructor (cognitive 22) src/water/ocean.js:45 — OceanTile.constructor has cognitive complexity 22 (threshold 15). Drivers by points: loops 8 (10 pts), if/else 2 (6 pts), ternaries 2 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · trees.buildTree · ×1
  • trees.buildTree::clusterBlobs (cognitive 22) src/vegetation/trees.js:237 — trees.buildTree::clusterBlobs has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 4 (10 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · run (cognitive 22) · ×1
  • run (cognitive 22) src/city/plan.js:201 — run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (8 pts), ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · surfaceMap (cognitive 22) · ×1
  • surfaceMap (cognitive 22) src/flora/surface.js:38 — surfaceMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 43, (anonymous)::onBeforeRender, a function literal at line 41, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · mergeGeos (cognitive 22) · ×1
  • mergeGeos (cognitive 22) src/props/metals.js:115 — mergeGeos has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (9 pts), ternaries 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · masonry.planRuns (cognitive 21) · ×1
  • masonry.planRuns (cognitive 21) src/acropolis/masonry.js:253 — masonry.planRuns has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 3 (9 pts), ternaries 1 (nesting depth added 12). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (offFor, hs). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · temple.bronzeDoor (cognitive 21) · ×1
  • temple.bronzeDoor (cognitive 21) src/arch/temple.js:177 — temple.bronzeDoor has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), ternaries 4 (8 pts), if/else 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columns.baseSDF.f (cognitive 21) · ×1
  • columns.baseSDF.f (cognitive 21) src/ruins/columns.js:113 — columns.baseSDF.f has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columns.pilasterSDF.<returned closure> (cognitive 21) · ×1
  • columns.pilasterSDF.<returned closure> (cognitive 21) src/ruins/columns.js:185 — columns.pilasterSDF.<returned closure> has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 7). Of this number, 16 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.
D2 · Cognitive Complexity · statues.pedestalOrnaments (cognitive 21) · ×1
  • statues.pedestalOrnaments (cognitive 21) src/modules/statues.js:127 — statues.pedestalOrnaments has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · addGeometry (cognitive 21) · ×1
  • addGeometry (cognitive 21) src/city/geobuilder.js:77 — addGeometry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · solveToneCurve (cognitive 21) · ×1
  • solveToneCurve (cognitive 21) src/core/pipeline.js:112 — solveToneCurve has cognitive complexity 21 (threshold 15). Drivers by points: loops 11 (14 pts), if/else 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · baseSDF.f (cognitive 21) · ×1
  • baseSDF.f (cognitive 21) src/ruins/columns.js:113 — baseSDF.f has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stair.buildQuay (cognitive 20) · ×1
  • stair.buildQuay (cognitive 20) src/acropolis/stair.js:323 — stair.buildQuay has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (15 pts), loops 4 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Builder.hexa (cognitive 20) · ×1
  • Builder.hexa (cognitive 20) src/aqueducts/geom.js:78 — Builder.hexa has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (9 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildings.pickRoof (cognitive 20) · ×1
  • buildings.pickRoof (cognitive 20) src/city/buildings.js:36 — buildings.pickRoof has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · theatre (cognitive 20) · ×1
  • theatre (cognitive 20) src/city/landmarks.js:519 — theatre has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 5 (7 pts), other 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeHand (cognitive 20) · ×1
  • makeHand (cognitive 20) src/sculpt/figure.js:57 — makeHand has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), loops 4 (6 pts), boolean chains 4, other 2 (nesting depth added 6). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setupVideo · ×1
  • setupVideo::__renderVideoFrame (cognitive 20) src/video/player.js:19 — setupVideo::__renderVideoFrame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · erosion.drainage (cognitive 19) · ×1
  • erosion.drainage (cognitive 19) src/terrain/erosion.js:37 — erosion.drainage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · terrain.bake (cognitive 19) · ×1
  • terrain.bake (cognitive 19) src/bake/terrain.js:22 — terrain.bake has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). Of this number, 10 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Footprints.query (cognitive 19) · ×1
  • Footprints.query (cognitive 19) src/core/footprints.js:45 — Footprints.query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.buildWorld (cognitive 19) · ×1
  • index.buildWorld (cognitive 19) src/world/index.js:22 — index.buildWorld has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), error handling 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · util.addCard (cognitive 19) · ×1
  • util.addCard (cognitive 19) src/vegetation/util.js:154 — util.addCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (15 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planArcade (cognitive 19) · ×1
  • planArcade (cognitive 19) src/acropolis/arcade.js:25 — planArcade has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (5 pts), other 4, boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pedestal (cognitive 19) · ×1
  • pedestal (cognitive 19) src/arch/elements.js:19 — pedestal has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), other 4, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rotunda (cognitive 19) · ×1
  • rotunda (cognitive 19) src/city/landmarks.js:197 — rotunda has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (7 pts), ternaries 2 (6 pts), if/else 2 (4 pts), other 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · leafMaterial (cognitive 19) · ×1
  • leafMaterial (cognitive 19) src/flora/foliage.js:75 — leafMaterial has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, other 6, if/else 3, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · viewSurface (cognitive 19) · ×1
  • viewSurface (cognitive 19) src/flora/surface.js:140 — viewSurface has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, other 2, loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 145, (anonymous)::onBeforeRender, a function literal at line 143, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · buildTree · ×1
  • buildTree::grow (cognitive 19) src/vegetation/trees.js:75 — buildTree::grow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Simplex.noise3 (cognitive 18) · ×1
  • Simplex.noise3 (cognitive 18) src/core/noise.js:38 — Simplex.noise3 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (18 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ivy.ivyMeshes (cognitive 18) · ×1
  • ivy.ivyMeshes (cognitive 18) src/ruins/ivy.js:196 — ivy.ivyMeshes has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 5 (7 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · head.bake (cognitive 18) · ×1
  • head.bake (cognitive 18) src/bake/head.js:9 — head.bake has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointHash.nearest (cognitive 18) · ×1
  • PointHash.nearest (cognitive 18) src/city/plan.js:55 — PointHash.nearest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OceanTile.update (cognitive 18) · ×1
  • OceanTile.update (cognitive 18) src/water/ocean.js:100 — OceanTile.update has cognitive complexity 18 (threshold 15). Drivers by points: loops 10 (17 pts), if/else 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · urn.plantGeometry (cognitive 18) · ×1
  • urn.plantGeometry (cognitive 18) src/props/urn.js:219 — urn.plantGeometry has cognitive complexity 18 (threshold 15). Drivers by points: loops 9 (12 pts), boolean chains 2, if/else 1 (2 pts), ternaries 2 (nesting depth added 4). Of this number, 14 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · wreath (cognitive 18) · ×1
  • wreath (cognitive 18) src/acropolis/ornament.js:12 — wreath has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 1 (3 pts), other 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.
D2 · Cognitive Complexity · planStair (cognitive 18) · ×1
  • planStair (cognitive 18) src/acropolis/stair.js:41 — planStair has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (6 pts), other 5, if/else 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · balustrade (cognitive 18) · ×1
  • balustrade (cognitive 18) src/arch/elements.js:89 — balustrade has cognitive complexity 18 (threshold 15). Drivers by points: other 6, loops 4 (5 pts), ternaries 1 (3 pts), boolean chains 2, if/else 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · arcadeFacade (cognitive 18) · ×1
  • arcadeFacade (cognitive 18) src/arch/temple.js:45 — arcadeFacade has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (8 pts), other 5, if/else 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · drawSideBands (cognitive 18) · ×1
  • drawSideBands (cognitive 18) src/props/bannerArt.js:138 — drawSideBands has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawLegs (cognitive 18) · ×1
  • drawLegs (cognitive 18) src/props/owl.js:130 — drawLegs has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (6 pts), if/else 2 (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.
D2 · Cognitive Complexity · jointGrass (cognitive 18) · ×1
  • jointGrass (cognitive 18) src/ruins/grass.js:68 — jointGrass has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (7 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mergeGeos (cognitive 18) · ×1
  • mergeGeos (cognitive 18) src/ruins/sdf.js:66 — mergeGeos has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · buildHeadGeometry (cognitive 18) · ×1
  • buildHeadGeometry (cognitive 18) src/sculpt/head.js:534 — buildHeadGeometry has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 2 (5 pts), boolean chains 2, other 2, ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (skyVis, f, f0). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · arcade.buildCutwaters (cognitive 17) · ×1
  • arcade.buildCutwaters (cognitive 17) src/aqueducts/arcade.js:300 — arcade.buildCutwaters has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2 (3 pts), ternaries 1 (nesting depth added 9). 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, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · face.classicalHead (cognitive 17) · ×1
  • face.classicalHead (cognitive 17) src/sculpt/face.js:18 — face.classicalHead has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (7 pts), boolean chains 4, ternaries 4, if/else 1 (2 pts) (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farfield.boxBlur (cognitive 17) · ×1
  • farfield.boxBlur (cognitive 17) src/terrain/farfield.js:34 — farfield.boxBlur has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (17 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Grid.blur (cognitive 17) · ×1
  • Grid.blur (cognitive 17) src/city/plan.js:22 — Grid.blur has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (17 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · banner.clothGeometry (cognitive 17) · ×1
  • banner.clothGeometry (cognitive 17) src/props/banner.js:224 — banner.clothGeometry has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 8). 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, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · addRun (cognitive 17) · ×1
  • addRun (cognitive 17) src/acropolis/balustrade.js:24 — addRun has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 4 (5 pts), other 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sample (cognitive 17) · ×1
  • sample (cognitive 17) src/city/plan.js:83 — sample has cognitive complexity 17 (threshold 15). Drivers by points: loops 8 (12 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · bowlOuterGeometry (cognitive 17) · ×1
  • bowlOuterGeometry (cognitive 17) src/props/brazier.js:83 — bowlOuterGeometry has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 3, loops 1 (2 pts), boolean chains 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mergeGeos (cognitive 17) · ×1
  • mergeGeos (cognitive 17) src/sculpt/bakeutil.js:68 — mergeGeos has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · summitEnvelope (cognitive 17) · ×1
  • summitEnvelope (cognitive 17) src/world/heightfield.js:218 — summitEnvelope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geo.sweepStraight (cognitive 16) · ×1
  • geo.sweepStraight (cognitive 16) src/acropolis/geo.js:298 — geo.sweepStraight has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geo.simplify (cognitive 16) · ×1
  • geo.simplify (cognitive 16) src/acropolis/geo.js:348 — geo.simplify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geom.extrudeOutline (cognitive 16) · ×1
  • geom.extrudeOutline (cognitive 16) src/arch/geom.js:390 — geom.extrudeOutline has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · acanthus.ribbon (cognitive 16) · ×1
  • acanthus.ribbon (cognitive 16) src/arch/acanthus.js:90 — acanthus.ribbon has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), ternaries 3 (7 pts), if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stair.scanLedges (cognitive 16) · ×1
  • stair.scanLedges (cognitive 16) src/acropolis/stair.js:17 — stair.scanLedges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · statues.bake (cognitive 16) · ×1
  • statues.bake (cognitive 16) src/bake/statues.js:8 — statues.bake has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (4 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · erosion.steepestReceivers (cognitive 16) · ×1
  • erosion.steepestReceivers (cognitive 16) src/terrain/erosion.js:70 — erosion.steepestReceivers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityPlan.trace · ×1
  • CityPlan.trace::half (cognitive 16) src/city/plan.js:143 — CityPlan.trace::half has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityPlan.streets (cognitive 16) · ×1
  • CityPlan.streets (cognitive 16) src/city/plan.js:168 — CityPlan.streets has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (10 pts), boolean chains 3, if/else 3 (nesting depth added 3). Of this number, 9 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · harbour.traceCoast (cognitive 16) · ×1
  • harbour.traceCoast (cognitive 16) src/city/harbour.js:17 — harbour.traceCoast has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ground.grassTuft (cognitive 16) · ×1
  • ground.grassTuft (cognitive 16) src/flora/ground.js:50 — ground.grassTuft has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), loops 2 (4 pts), if/else 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clouds.buildMistMap (cognitive 16) · ×1
  • clouds.buildMistMap (cognitive 16) src/modules/clouds.js:165 — clouds.buildMistMap has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 2 (7 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · buildCastellum (cognitive 16) · ×1
  • buildCastellum (cognitive 16) src/aqueducts/arcade.js:510 — buildCastellum has cognitive complexity 16 (threshold 15). Drivers by points: loops 9 (12 pts), ternaries 2 (4 pts) (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · rosemary (cognitive 16) · ×1
  • rosemary (cognitive 16) src/flora/ground.js:199 — rosemary has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (7 pts), ternaries 2 (6 pts), if/else 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bannerFromSlot (cognitive 16) · ×1
  • bannerFromSlot (cognitive 16) src/modules/banners.js:45 — bannerFromSlot has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10, boolean chains 3, other 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · cord (cognitive 16) · ×1
  • cord (cognitive 16) src/props/bannerArt.js:75 — cord has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), loops 2 (5 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawGreekText (cognitive 16) · ×1
  • drawGreekText (cognitive 16) src/props/owl.js:488 — drawGreekText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 1 (3 pts), other 2, boolean chains 1, loops 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeGarment.skirt (cognitive 16) · ×1
  • makeGarment.skirt (cognitive 16) src/sculpt/figure.js:471 — makeGarment.skirt has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4, other 4, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · meshChunk · ×1
  • meshChunk::vertexOf (cognitive 16) src/terrain/voxel.js:201 — meshChunk::vertexOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4, boolean chains 2, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · cameraAt (cognitive 16) · ×1
  • cameraAt (cognitive 16) src/video/sequence.js:37 — cameraAt has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, other 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · hilltops (cognitive 16) · ×1
  • hilltops (cognitive 16) src/world/heightfield.js:592 — hilltops has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 1, loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 183 plain JS — the untyped files are src/acropolis/arcade.js, src/acropolis/balustrade.js, src/acropolis/bastion.js, src/acropolis/bridge.js, src/acropolis/buildings.js, src/acropolis/cliffdress.js (+177 more).
R10 · Code Duplication · Duplication concentrated across 16 sibling directories (28 clone groups) · ×1
  • Duplication concentrated across 16 sibling directories (28 clone groups) src/ruins/sdf.js:37 — 28 duplicated blocks under src/ have copies in at least two of the sibling directories acropolis, arch, city, core, flora, materials (+10 more sibling(s) not listed) — 21 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 28 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 28 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 28 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) src/arch/temple.js:257 — src/arch/temple.js:257 · src/arch/temple.js:450 — the two spans are one implementation copied and then locally edited — 706 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (35 matched lines × 2 locations) src/flora/surface.js:39 — src/flora/surface.js:39 · src/flora/surface.js:141 — the two spans are one implementation copied and then locally edited — 582 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (26 matched lines × 2 locations) src/water/churn.js:90 — src/water/churn.js:90 · src/water/mist.js:212 — 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 (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) src/props/brazier.js:51 — src/props/brazier.js:51 · src/props/urn.js:22 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (19 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (19 matched lines × 2 locations) src/ruins/sdf.js:37 — src/ruins/sdf.js:37 · src/sculpt/head.js:539 — the two spans are one implementation copied and then locally edited — 289 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 (18 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (18 matched lines × 2 locations) src/city/fleet.js:34 — src/city/fleet.js:34 · src/city/fleet.js:165 — the two spans are one implementation copied and then locally edited — 355 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (13 matched lines × 2 locations) src/arch/geom.js:480 — src/arch/geom.js:480 · src/sculpt/sdf.js:137 — the two spans are one implementation copied and then locally edited — 241 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 (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) src/props/lamp.js:66 — src/props/lamp.js:66 · src/props/urn.js:72 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (11 matched lines × 2 locations) src/water/flow.js:14 — src/water/flow.js:14 · src/world/heightfield.js:37 — the two spans are one implementation copied and then locally edited — 232 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 (10 lines × 3 locations) · ×1
  • Duplicated block (10 lines × 3 locations) src/props/brazier.js:125 — src/props/brazier.js:125 · src/props/lamp.js:66 · src/props/urn.js:72 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (10 matched lines × 2 locations) src/sculpt/props.js:245 — src/sculpt/props.js:245 · src/sculpt/props.js:282 — the two spans are one implementation copied and then locally edited — 199 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (8 lines × 3 locations) · ×1
  • Duplicated block (8 lines × 3 locations) src/props/brazier.js:66 — src/props/brazier.js:66 · src/props/urn.js:37 · src/ruins/grass.js:29 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 3 locations) · ×1
  • Duplicated block (6 lines × 3 locations) src/city/fleet.js:271 — src/city/fleet.js:271 · src/props/urn.js:300 · src/ruins/ivy.js:219 — the 3 copies are spread across 3 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.
R2 · Cyclomatic Complexity · Complex function scatterWorld (cyclomatic 273, cognitive 746) · ×1
  • Complex function scatterWorld (cyclomatic 273, cognitive 746) src/vegetation/scatter.js:47 — scatterWorld has cyclomatic complexity 273 and cognitive complexity 746; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildChain (cyclomatic 206, cognitive 491) · ×1
  • Complex function buildChain (cyclomatic 206, cognitive 491) src/acropolis/walls.js:112 — buildChain has cyclomatic complexity 206 and cognitive complexity 491; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function generateFarGrid (cyclomatic 157, cognitive 233) · ×1
  • Complex function generateFarGrid (cyclomatic 157, cognitive 233) src/terrain/farfield.js:102 — generateFarGrid has cyclomatic complexity 157 and cognitive complexity 233; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mkVol (cyclomatic 131, cognitive 153) · ×1
  • Complex function mkVol (cyclomatic 131, cognitive 153) src/city/buildings.js:120 — mkVol has cyclomatic complexity 131 and cognitive complexity 153; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildHouse (cyclomatic 128, cognitive 239) · ×1
  • Complex function buildHouse (cyclomatic 128, cognitive 239) src/city/buildings.js:50 — buildHouse has cyclomatic complexity 128 and cognitive complexity 239; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function build (cyclomatic 117, cognitive 152) · ×1
  • Complex function build (cyclomatic 117, cognitive 152) src/modules/acropolis.js:45 — build has cyclomatic complexity 117 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function meshChunk (cyclomatic 114, cognitive 344) · ×1
  • Complex function meshChunk (cyclomatic 114, cognitive 344) src/terrain/voxel.js:19 — meshChunk has cyclomatic complexity 114 and cognitive complexity 344; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildStructure (cyclomatic 102, cognitive 282) · ×1
  • Complex function buildStructure (cyclomatic 102, cognitive 282) src/aqueducts/arcade.js:57 — buildStructure has cyclomatic complexity 102 and cognitive complexity 282; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function peripteralTemple (cyclomatic 97, cognitive 146) · ×1
  • Complex function peripteralTemple (cyclomatic 97, cognitive 146) src/arch/temple.js:267 — peripteralTemple has cyclomatic complexity 97 and cognitive complexity 146; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function scatterCover (cyclomatic 89, cognitive 169) · ×1
  • Complex function scatterCover (cyclomatic 89, cognitive 169) src/modules/flora.js:135 — scatterCover has cyclomatic complexity 89 and cognitive complexity 169; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function makeFigure (cyclomatic 80, cognitive 93) · ×1
  • Complex function makeFigure (cyclomatic 80, cognitive 93) src/sculpt/figure.js:159 — makeFigure has cyclomatic complexity 80 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildEastGarden (cyclomatic 77, cognitive 131) · ×1
  • Complex function buildEastGarden (cyclomatic 77, cognitive 131) src/acropolis/garden.js:33 — buildEastGarden has cyclomatic complexity 77 and cognitive complexity 131; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function build (cyclomatic 71, cognitive 115) · ×1
  • Complex function build (cyclomatic 71, cognitive 115) src/modules/city.js:122 — build has cyclomatic complexity 71 and cognitive complexity 115; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function build (cyclomatic 70, cognitive 106) · ×1
  • Complex function build (cyclomatic 70, cognitive 106) src/modules/waterfalls.js:57 — build has cyclomatic complexity 70 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.
R2 · Cyclomatic Complexity · Complex function buildTerraceHouses (cyclomatic 69, cognitive 145) · ×1
  • Complex function buildTerraceHouses (cyclomatic 69, cognitive 145) src/acropolis/houses.js:268 — buildTerraceHouses has cyclomatic complexity 69 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildHouse (cyclomatic 68, cognitive 129) · ×1
  • Complex function buildHouse (cyclomatic 68, cognitive 129) src/acropolis/houses.js:122 — buildHouse has cyclomatic complexity 68 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.
R2 · Cyclomatic Complexity · Complex function buildBridgeDeck (cyclomatic 61, cognitive 121) · ×1
  • Complex function buildBridgeDeck (cyclomatic 61, cognitive 121) src/aqueducts/arcade.js:562 — buildBridgeDeck has cyclomatic complexity 61 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function doricRun (cyclomatic 61, cognitive 103) · ×1
  • Complex function doricRun (cyclomatic 61, cognitive 103) src/arch/entablature.js:66 — doricRun has cyclomatic complexity 61 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.
R2 · Cyclomatic Complexity · Complex function compute (cyclomatic 60, cognitive 153) · ×1
  • Complex function compute (cyclomatic 60, cognitive 153) src/arch/ao.js:69 — compute has cyclomatic complexity 60 and cognitive complexity 153; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildPodium (cyclomatic 59, cognitive 149) · ×1
  • Complex function buildPodium (cyclomatic 59, cognitive 149) src/acropolis/podium.js:41 — buildPodium has cyclomatic complexity 59 and cognitive complexity 149; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildHarbour (cyclomatic 58, cognitive 129) · ×1
  • Complex function buildHarbour (cyclomatic 58, cognitive 129) src/city/harbour.js:113 — buildHarbour has cyclomatic complexity 58 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.
R2 · Cyclomatic Complexity · Complex function traceStream (cyclomatic 55, cognitive 140) · ×1
  • Complex function traceStream (cyclomatic 55, cognitive 140) src/water/trace.js:67 — traceStream has cyclomatic complexity 55 and cognitive complexity 140; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function gateTower (cyclomatic 55, cognitive 111) · ×1
  • Complex function gateTower (cyclomatic 55, cognitive 111) src/arch/elements.js:222 — gateTower has cyclomatic complexity 55 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildBastion (cyclomatic 54, cognitive 127) · ×1
  • Complex function buildBastion (cyclomatic 54, cognitive 127) src/acropolis/plaza.js:137 — buildBastion has cyclomatic complexity 54 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildTree (cyclomatic 52, cognitive 69) · ×1
  • Complex function buildTree (cyclomatic 52, cognitive 69) src/vegetation/trees.js:49 — buildTree has cyclomatic complexity 52 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.
R2 · Cyclomatic Complexity · Complex function wallRun (cyclomatic 51, cognitive 128) · ×1
  • Complex function wallRun (cyclomatic 51, cognitive 128) src/acropolis/masonry.js:35 — wallRun has cyclomatic complexity 51 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildFlowMap (cyclomatic 51, cognitive 118) · ×1
  • Complex function buildFlowMap (cyclomatic 51, cognitive 118) src/water/flow.js:53 — buildFlowMap has cyclomatic complexity 51 and cognitive complexity 118; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function emblem (cyclomatic 51, cognitive 101) · ×1
  • Complex function emblem (cyclomatic 51, cognitive 101) src/sculpt/props.js:47 — emblem 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.
R2 · Cyclomatic Complexity · Complex function placePortFleet (cyclomatic 51, cognitive 92) · ×1
  • Complex function placePortFleet (cyclomatic 51, cognitive 92) src/city/fleet.js:153 — placePortFleet has cyclomatic complexity 51 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function placeFleet (cyclomatic 50, cognitive 96) · ×1
  • Complex function placeFleet (cyclomatic 50, cognitive 96) src/city/fleet.js:24 — placeFleet has cyclomatic complexity 50 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function prostyleTemple (cyclomatic 50, cognitive 59) · ×1
  • Complex function prostyleTemple (cyclomatic 50, cognitive 59) src/arch/temple.js:456 — prostyleTemple has cyclomatic complexity 50 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.
R2 · Cyclomatic Complexity · Complex function buildPlatform (cyclomatic 49, cognitive 98) · ×1
  • Complex function buildPlatform (cyclomatic 49, cognitive 98) src/acropolis/buildings.js:70 — buildPlatform has cyclomatic complexity 49 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function scatterBoulders (cyclomatic 49, cognitive 85) · ×1
  • Complex function scatterBoulders (cyclomatic 49, cognitive 85) src/terrain/boulders.js:41 — scatterBoulders has cyclomatic complexity 49 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function tholos (cyclomatic 48, cognitive 57) · ×1
  • Complex function tholos (cyclomatic 48, cognitive 57) src/arch/tholos.js:19 — tholos has cyclomatic complexity 48 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildAqueductTop (cyclomatic 47, cognitive 138) · ×1
  • Complex function buildAqueductTop (cyclomatic 47, cognitive 138) src/aqueducts/arcade.js:346 — buildAqueductTop has cyclomatic complexity 47 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.
R2 · Cyclomatic Complexity · Complex function buildShip (cyclomatic 47, cognitive 92) · ×1
  • Complex function buildShip (cyclomatic 47, cognitive 92) src/city/ships.js:150 — buildShip has cyclomatic complexity 47 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function headSDF (cyclomatic 45, cognitive 71) · ×1
  • Complex function headSDF (cyclomatic 45, cognitive 71) src/sculpt/head.js:274 — headSDF has cyclomatic complexity 45 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createRock (cyclomatic 45, cognitive 64) · ×1
  • Complex function createRock (cyclomatic 45, cognitive 64) src/materials/stone.js:374 — createRock has cyclomatic complexity 45 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildSheet (cyclomatic 43, cognitive 88) · ×1
  • Complex function buildSheet (cyclomatic 43, cognitive 88) src/water/fallMesh.js:126 — buildSheet has cyclomatic complexity 43 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.
R2 · Cyclomatic Complexity · Complex function place (cyclomatic 43, cognitive 43) · ×1
  • Complex function place (cyclomatic 43, cognitive 43) src/vegetation/scatter.js:212 — place has cyclomatic complexity 43 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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/world/heightfield.js · ×1
  • src/world/heightfield.js: 826 lines of code src/world/heightfield.js:1 — src/world/heightfield.js has 826 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/modules/flora.js · ×1
  • src/modules/flora.js: 792 lines of code src/modules/flora.js:1 — src/modules/flora.js has 792 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/modules/statues.js · ×1
  • src/modules/statues.js: 738 lines of code src/modules/statues.js:1 — src/modules/statues.js has 738 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/aqueducts/arcade.js · ×1
  • src/aqueducts/arcade.js: 735 lines of code src/aqueducts/arcade.js:1 — src/aqueducts/arcade.js has 735 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/sculpt/figure.js · ×1
  • src/sculpt/figure.js: 705 lines of code src/sculpt/figure.js:1 — src/sculpt/figure.js has 705 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/core/pipeline.js · ×1
  • src/core/pipeline.js: 701 lines of code src/core/pipeline.js:1 — src/core/pipeline.js has 701 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/vegetation/scatter.js · ×1
  • src/vegetation/scatter.js: 694 lines of code src/vegetation/scatter.js:1 — src/vegetation/scatter.js has 694 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/modules/clouds.js · ×1
  • src/modules/clouds.js: 611 lines of code src/modules/clouds.js:1 — src/modules/clouds.js has 611 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/city/house.js · ×1
  • src/city/house.js: 603 lines of code src/city/house.js:1 — src/city/house.js has 603 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/city/landmarks.js · ×1
  • src/city/landmarks.js: 586 lines of code src/city/landmarks.js:1 — src/city/landmarks.js has 586 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/water/surface.js · ×1
  • src/water/surface.js: 586 lines of code src/water/surface.js:1 — src/water/surface.js has 586 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/sculpt/head.js · ×1
  • src/sculpt/head.js: 572 lines of code src/sculpt/head.js:1 — src/sculpt/head.js has 572 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/modules/waterfalls.js · ×1
  • src/modules/waterfalls.js: 552 lines of code src/modules/waterfalls.js:1 — src/modules/waterfalls.js has 552 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/acropolis/walls.js · ×1
  • src/acropolis/walls.js: 534 lines of code src/acropolis/walls.js:1 — src/acropolis/walls.js has 534 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/props/owl.js · ×1
  • src/props/owl.js: 534 lines of code src/props/owl.js:1 — src/props/owl.js has 534 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/water/fallMesh.js · ×1
  • src/water/fallMesh.js: 529 lines of code src/water/fallMesh.js:1 — src/water/fallMesh.js has 529 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/arch/temple.js · ×1
  • src/arch/temple.js: 524 lines of code src/arch/temple.js:1 — src/arch/temple.js has 524 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/acropolis/stair.js · ×1
  • src/acropolis/stair.js: 504 lines of code src/acropolis/stair.js:1 — src/acropolis/stair.js has 504 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/materials/stone.js · ×1
  • src/materials/stone.js: 497 lines of code src/materials/stone.js:1 — src/materials/stone.js has 497 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/modules/city.js · ×1
  • src/modules/city.js: 491 lines of code src/modules/city.js:1 — src/modules/city.js has 491 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/terrain/material.js · ×1
  • src/terrain/material.js: 489 lines of code src/terrain/material.js:1 — src/terrain/material.js has 489 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/arch/geom.js · ×1
  • src/arch/geom.js: 478 lines of code src/arch/geom.js:1 — src/arch/geom.js has 478 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/vegetation/atlas.js · ×1
  • src/vegetation/atlas.js: 466 lines of code src/vegetation/atlas.js:1 — src/vegetation/atlas.js has 466 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/props/banner.js · ×1
  • src/props/banner.js: 460 lines of code src/props/banner.js:1 — src/props/banner.js has 460 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/city/buildings.js · ×1
  • src/city/buildings.js: 459 lines of code src/city/buildings.js:1 — src/city/buildings.js has 459 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/core/sky.js · ×1
  • src/core/sky.js: 455 lines of code src/core/sky.js:1 — src/core/sky.js has 455 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/arch/entablature.js · ×1
  • src/arch/entablature.js: 451 lines of code src/arch/entablature.js:1 — src/arch/entablature.js has 451 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/modules/temple.js · ×1
  • src/modules/temple.js: 450 lines of code src/modules/temple.js:1 — src/modules/temple.js has 450 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/modules/ruins.js · ×1
  • src/modules/ruins.js: 425 lines of code src/modules/ruins.js:1 — src/modules/ruins.js has 425 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/modules/acropolis.js · ×1
  • src/modules/acropolis.js: 413 lines of code src/modules/acropolis.js:1 — src/modules/acropolis.js has 413 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/props/urn.js · ×1
  • src/props/urn.js: 405 lines of code src/props/urn.js:1 — src/props/urn.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/sculpt/props.js · ×1
  • src/sculpt/props.js: 402 lines of code src/sculpt/props.js:1 — src/sculpt/props.js has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No test, lint or typecheck script · ×1
  • No test, lint or typecheck script — test ✗ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~75 LoC) · ×1
  • Dead file (~75 LoC) src/terrain/preview.mjs — no import path from any entry point (15 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~73 LoC) · ×1
  • Dead file (~73 LoC) src/bake/terrain.js — no import path from any entry point (15 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~28 LoC) · ×1
  • Dead file (~28 LoC) src/bake/head.js — no import path from any entry point (15 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~18 LoC) · ×1
  • Dead file (~18 LoC) src/bake/statues.js — no import path from any entry point (15 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~14 LoC) · ×1
  • Dead file (~14 LoC) src/terrain/nodeworker.mjs — no import path from any entry point (15 application, 0 tooling, 1 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/bake/terrain.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
Minor — 43 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×3
  • Duplicated predicate src/modules/water.js:91 — `Array.isArray(v) && U[k].value?.fromArray` appears character-identically in 2 files — src/modules/water.js, src/modules/waterfalls.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/core/engine.js:251 — `k < 20000 && gl.clientWaitSync(sync, 0, 0) === gl.TIMEOUT_EXPIRED` appears character-identically in 2 files — src/core/engine.js, src/video/player.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/materials/foliage.js:254 — `species === 'shrub' || species === 'thicket'` appears character-identically in 2 files — src/materials/foliage.js, src/vegetation/trees.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.
D24 · Comment Value · redundant comment · ×1
  • redundant comment src/water/surface.js:434 — "debug 16..19: direct diffuse / direct specular / indirect diffuse / indirect specular" repeats the code it sits on: 7 of its 7 words (debug, 16, 19, direct, diffuse, specular, indirect) are already in `const DBG_LIGHT = /* glsl */``. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/javascript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:10 — `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`.
R7 · Dead Code · Unused export 'add3' · ×1
  • Unused export 'add3' src/acropolis/geo.js:226 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ALL_FACES' · ×1
  • Unused export 'ALL_FACES' src/acropolis/geo.js:235 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'box' · ×1
  • Unused export 'box' src/acropolis/geo.js:291 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'polyLength' · ×1
  • Unused export 'polyLength' src/acropolis/geo.js:334 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'resample' · ×1
  • Unused export 'resample' src/acropolis/geo.js:335 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'leftOf' · ×1
  • Unused export 'leftOf' src/acropolis/site.js:100 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'STONE_KIND' · ×1
  • Unused export 'STONE_KIND' src/city/stone.js:147 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'setAtmoSun' · ×1
  • Unused export 'setAtmoSun' src/core/atmosphere.js:142 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'serializeGeometry' · ×1
  • Unused export 'serializeGeometry' src/core/cache.js:17 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'lin' · ×1
  • Unused export 'lin' src/flora/util.js:202 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'mixc' · ×1
  • Unused export 'mixc' src/flora/util.js:203 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'mulc' · ×1
  • Unused export 'mulc' src/flora/util.js:204 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'METAL_ENV_BOOST' · ×1
  • Unused export 'METAL_ENV_BOOST' src/props/metals.js:8 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'woodMaterial' · ×1
  • Unused export 'woodMaterial' src/props/metals.js:104 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'makeOwlEmblemCanvas' · ×1
  • Unused export 'makeOwlEmblemCanvas' src/props/owl.js:552 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'mergeGeos' · ×1
  • Unused export 'mergeGeos' src/ruins/sdf.js:66 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'transformGeo' · ×1
  • Unused export 'transformGeo' src/ruins/sdf.js:94 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'scaleGeo' · ×1
  • Unused export 'scaleGeo' src/sculpt/bakeutil.js:112 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'HEAD_LANDMARKS' · ×1
  • Unused export 'HEAD_LANDMARKS' src/sculpt/head.js:28 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'headSDFm' · ×1
  • Unused export 'headSDFm' src/sculpt/head.js:597 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'emblemTexture' · ×1
  • Unused export 'emblemTexture' src/sculpt/props.js:282 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'pedestalGeometry' · ×1
  • Unused export 'pedestalGeometry' src/sculpt/props.js:400 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hash2' · ×1
  • Unused export 'hash2' src/sculpt/sdf.js:12 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'segT' · ×1
  • Unused export 'segT' src/sculpt/sdf.js:59 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'tube' · ×1
  • Unused export 'tube' src/sculpt/sdf.js:66 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'bezier' · ×1
  • Unused export 'bezier' src/sculpt/sdf.js:77 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'boundPts' · ×1
  • Unused export 'boundPts' src/sculpt/sdf.js:127 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'vnoise1' · ×1
  • Unused export 'vnoise1' src/sculpt/sdf.js:153 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'debugAtlasCanvas' · ×1
  • Unused export 'debugAtlasCanvas' src/vegetation/atlas.js:481 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'totalDuration' · ×1
  • Unused export 'totalDuration' src/video/sequence.js:26 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getFarGrid' · ×1
  • Unused export 'getFarGrid' src/world/heightfield.js:300 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'slopeAt' · ×1
  • Unused export 'slopeAt' src/world/heightfield.js:864 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isWater' · ×1
  • Unused export 'isWater' src/world/heightfield.js:867 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MODULE_ORDER' · ×1
  • Unused export 'MODULE_ORDER' src/world/index.js:4 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Minor — 3 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×2
  • Outdated (npm): puppeteer-core — puppeteer-core is pinned at 25.14.0; registry.npmjs.org publishes 25.17.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): three — three is pinned at 0.186.1; registry.npmjs.org publishes 0.187.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.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names src/arch/temple.js:260 — 0 of 85 documented parameters and 3 of 575 summaries in `athenaion` only repeat the member or parameter name (e.g. "Peripteral temple." for `peripteralTemple`). 1 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.

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

Run 01a1e790-5c3b-78eb-9bce-cec770137855 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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