Public report of dadaloop82/EverShelf, 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, 07:39 UTC · Survey ID cd_d7df49a0e37545cd830248765b258542

dadaloop82/EverShelf

Measured 17 November 2026, 07:36 UTC, at code version 71c3927

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

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

A large codebase: 106,313 lines of product code in 7 projects, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Code Health, 20.8

Findings by how serious they are

61 critical 1247 serious 111 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 07:36 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 ▸

76of 76 dimensions measured by tools.
1349of 1419 findings point to an exact file and line, so you can open each one in the code. The other 70 concern the repository as a whole, such as missing documentation.
76dimensions across 7 lenses, read from 106,313 lines of product code in 7 projects.
Chapters

Executive summary

dadaloop82/EverShelf falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 32.6 out of 100 and is rated Weak, and 49 of its 61 critical findings are security problems.

Code Health, at 20.8, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 9.5 points. Adding type checking would lift Code Health itself, worth about 2.6 points. Raising Code Health to 70 would lift the score to about 42.0.

Thirty-six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Five passwords or keys are open to anyone who can read the repository, and seven form fields can't be read by a screen reader. Pinning each tool to an exact version, replacing each exposed password or key and labelling the form fields would close these risks. Passing outside input through environment variables would fix the two pipeline steps that put outside input straight into a shell command, and limiting each secret to its own step would deal with the two secrets exposed to more of the pipeline than needed. The two controls that only work with a mouse need to work with the keyboard, or to become a real button.

The product code is 106,313 lines, about €91,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 20.8 · counts for 46%Production Readiness 23.4 · counts for 25%Accessibility 42.5 · counts for 14%Maturity 63.0 · counts for 8%Security and Compliance 79.8 · counts for 4%Architecture 85.1 · counts for 2%Performance 100.0 · counts for 1%

If Code Health rose from 20.8 to 70, the lowest score rated Strong, the score would rise from 32.6 to about 42.0.

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

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

Top priorities

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

1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 9.5 points · High effort · Code Coverage
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.
Raises the score by about 1.6 points · Low effort · ADR Quality
3
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 2.6 points · Medium effort · Type Safety

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €91,000 to build again, about 0.6 person-years of work. Its weakest lens is Code Health, at 20.8 (Critical). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 9.5 points for high effort, because it clears the 1 Code Coverage findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 12% on every change. The history of the code shows how much it changes: about 153,798 lines over the last 90 days, which is about 623,736 lines a year. At that pace, the extra work comes to an estimated 86.5 to 519.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.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch EverShelf Health Bridge EverShelf Health Bridge EverShelf Health Bridge:app EverShelf Health Bridge:app EverShelf Kiosk EverShelf Kiosk EverShelf Kiosk:app EverShelf Kiosk:app api api evershelf-mcp-server evershelf-mcp-server scripts scripts scripts->api

Architecture: which parts of the code depend on which

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

30 modules, with 10 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 (global)2 api3 api.lib4 api.lib.med5 assets.js6 assets.js.app7 assets.js.core8 assets.js.med9 it.dadaloop.evershelf.health.DiscoveryScanner10 it.dadaloop.evershelf.health.EverShelfClient11 it.dadaloop.evershelf.health.HealthDb12 it.dadaloop.evershelf.health.InstallResultReceiver13 it.dadaloop.evershelf.health.KeepAliveService14 it.dadaloop.evershelf.health.MetricChartView15 it.dadaloop.evershelf.health.Updater16 it.dadaloop.evershelf.health.WizardActivity17 it.dadaloop.evershelf.kiosk.KioskActivity18 it.dadaloop.evershelf.kiosk.SettingsActivity19 it.dadaloop.evershelf.kiosk.SetupActivity.DeviceAdapter20 it.dadaloop.evershelf.kiosk.scale21 it.dadaloop.evershelf.kiosk.scale.GatewayService22 mcp-server.src23 mcp-server.src.evershelf-api24 scripts25 scripts.check-upgrade-migration26 scripts.i18n-audit27 it.dadaloop.evershelf.health.DiaryAdapter28 it.dadaloop.evershelf.kiosk.SetupActivity29 it.dadaloop.evershelf.health30 it.dadaloop.evershelf.kiosk
1 (global)
2 api
3 api.lib
4 api.lib.med
5 assets.js
6 assets.js.app
7 assets.js.core
8 assets.js.med
9 it.dadaloop.evershelf.health.DiscoveryScanner
10 it.dadaloop.evershelf.health.EverShelfClient
11 it.dadaloop.evershelf.health.HealthDb
12 it.dadaloop.evershelf.health.InstallResultReceiver
13 it.dadaloop.evershelf.health.KeepAliveService
14 it.dadaloop.evershelf.health.MetricChartView
15 it.dadaloop.evershelf.health.Updater
16 it.dadaloop.evershelf.health.WizardActivity
17 it.dadaloop.evershelf.kiosk.KioskActivity
18 it.dadaloop.evershelf.kiosk.SettingsActivity
19 it.dadaloop.evershelf.kiosk.SetupActivity.DeviceAdapter
20 it.dadaloop.evershelf.kiosk.scale
21 it.dadaloop.evershelf.kiosk.scale.GatewayService
22 mcp-server.src
23 mcp-server.src.evershelf-api
24 scripts
25 scripts.check-upgrade-migration
26 scripts.i18n-audit
27 it.dadaloop.evershelf.health.DiaryAdapter1
28 it.dadaloop.evershelf.kiosk.SetupActivity11
29 it.dadaloop.evershelf.health11121
30 it.dadaloop.evershelf.kiosk21
Uses a module listed above itPart of a loopThe module itself
1 (global)2 api3 api.lib4 api.lib.med5 assets.js6 assets.js.app7 assets.js.core8 assets.js.med9 it.dadaloop.evershelf.health.DiscoveryScanner10 it.dadaloop.evershelf.health.EverShelfClient11 it.dadaloop.evershelf.health.HealthDb12 it.dadaloop.evershelf.health.InstallResultReceiver13 it.dadaloop.evershelf.health.KeepAliveService14 it.dadaloop.evershelf.health.MetricChartView15 it.dadaloop.evershelf.health.Updater16 it.dadaloop.evershelf.health.WizardActivity17 it.dadaloop.evershelf.kiosk.KioskActivity18 it.dadaloop.evershelf.kiosk.SettingsActivity19 it.dadaloop.evershelf.kiosk.SetupActivity.DeviceAdapter20 it.dadaloop.evershelf.kiosk.scale21 it.dadaloop.evershelf.kiosk.scale.GatewayService22 mcp-server.src23 mcp-server.src.evershelf-api24 scripts25 scripts.check-upgrade-migration26 scripts.i18n-audit27 it.dadaloop.evershelf.health.DiaryAdapter28 it.dadaloop.evershelf.kiosk.SetupActivity29 it.dadaloop.evershelf.health30 it.dadaloop.evershelf.kiosk(global)1api2api.lib3api.lib.med4assets.js5assets.js.app6assets.js.core7assets.js.med8it.dadaloop.evershelf.health.DiscoveryScanner9it.dadaloop.evershelf.health.EverShelfClient10it.dadaloop.evershelf.health.HealthDb11it.dadaloop.evershelf.health.InstallResultReceiver12it.dadaloop.evershelf.health.KeepAliveService13it.dadaloop.evershelf.health.MetricChartView14it.dadaloop.evershelf.health.Updater15it.dadaloop.evershelf.health.WizardActivity16it.dadaloop.evershelf.kiosk.KioskActivity17it.dadaloop.evershelf.kiosk.SettingsActivity18it.dadaloop.evershelf.kiosk.SetupActivity.DeviceAdapter19it.dadaloop.evershelf.kiosk.scale20it.dadaloop.evershelf.kiosk.scale.GatewayService21mcp-server.src22mcp-server.src.evershelf-api23scripts24scripts.check-upgrade-migration25scripts.i18n-audit26it.dadaloop.evershelf.health.DiaryAdapter27it.dadaloop.evershelf.kiosk.SetupActivity28it.dadaloop.evershelf.health29it.dadaloop.evershelf.kiosk301111112121

At a glance — Code Health · 20.8 · Critical · gated by D1, D2, R1, R2, R3, X3, X5 ·

At a glance — Architecture · 85.1 · Strong ·

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

At a glance — Readiness · 23.4 · Critical · gated by D8, D12, R4, R6, P7 ·

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

At a glance — Accessibility · 42.5 · Weak · gated by AC6 ·

At a glance — Performance · 100.0 · Exemplary ·

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 — Injection55High / Critical
A03:2025 — Software Supply Chain Failures10High / Critical
A07:2025 — Authentication Failures6High / Critical
A02:2025 — Security Misconfiguration3High / Critical

Roadmap

Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Resolve the 40 finding(s) in Cyclomatic Complexity.

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

Do thisHelpsEffortDimension
Resolve the 1 No automated tests finding(s) in Code Coverage.+9.5 ptsHighCode Coverage
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.+1.6 ptsLowADR Quality
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.+2.6 ptsMediumType Safety
Resolve the 40 finding(s) in Cyclomatic Complexity.+2.6 ptsMediumCyclomatic Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+2.6 ptsMediumLarge Files
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+2.4 ptsMediumVisual & motion safety
Add tests that import the unreached modules (directly or through their public entry).+2.1 ptsMediumTest Coverage
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.+2.1 ptsMediumTooling

File quality

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

FileScoreBandWorst signal
REDACTED0.6SlopSecrets (history): REDACTED: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.2SlopSecrets (history): REDACTED: REDACTED
REDACTED3.3SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt5.9MixedCode Duplication: Edited copy of a member (12 corresponding lines)
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
api/database.php7.0MixedCyclomatic Complexity: database.migrateDB (cyclomatic 196)

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

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

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

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

Could not be resolved — 12

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

Methodology & how to trust this report

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

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

What we checked — 76 dimensions across the health lenses
D1D2D3D4D5D6D8D12D13D14D15D17D19D20D21D24D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX6M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X16X18X19X2X21X23X25X27X28X29X3X30X5

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, 1349 of 1419 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e86f-83ab-7cd7-a70f-a9e5bbec5917.

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.

  • D12 Dependency Hygiene — 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. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Gradle tree, and its score reflects currency alone.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (5 contributor(s) across 1871 commit(s) sampled, automation and bot accounts excluded). One of them holds 97% of the history; the other 4 hold 0.8% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (mcp-server/package.json), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AC6 Visual & motion safety — 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. 87 further occurrence(s) are not listed individually; the score already reflects all 127.
  • 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. Boot via AndroidApp (evershelf-health-bridge/app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:validateSigningDebug'. > Keystore file '/root/.android/debug.keystore' not found for signing config 'projec…; runtime evidence skipped (launch chosen because evershelf-health-bridge/app/build.gradle.kts applies the Android application plugin and evershelf-health-bridge/gradlew builds it).
  • C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code — 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, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin, PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — 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, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin, PHP is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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.
  • 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. 65 further occurrence(s) are not listed individually; the score already reflects all 105.
  • 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. 405 further occurrence(s) are not listed individually; the score already reflects all 445.
  • X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — 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. 384 further occurrence(s) are not listed individually; the score already reflects all 424.
  • X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X29 Per-element action decided by a fixed element — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 443 further occurrence(s) are not listed individually; the score already reflects all 483.
  • 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 log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

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

Dimensions

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

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

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

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

424 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was index.smartShopping at 351. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being index._formatPrice at 20 — they are counted neither in the figure above nor in this dimension's score.

app._initInventoryRowSwipe::onEnd (cyclomatic 24) · ×2REDACTED:16931
(anonymous) (cyclomatic 16) · ×2assets/js/audit.js:2621
index.smartShopping (cyclomatic 351)REDACTED:20952
app.loadSettingsUI (cyclomatic 206)REDACTED:7128
database.migrateDB (cyclomatic 196)api/database.php:272

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

What to do

  1. Bring the 23 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with index.smartShopping (cyclomatic 351), app.loadSettingsUI (cyclomatic 206), database.migrateDB (cyclomatic 196). — 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 23 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

503 method(s) exceeded the cognitive complexity threshold of 15; the worst was index.smartShopping at 596.

app._initInventoryRowSwipe::onEnd (cognitive 20) · ×2REDACTED:16931
index.smartShopping (cognitive 596)REDACTED:20952
database.migrateDB (cognitive 410)api/database.php:272
index.generateRecipeStream (cognitive 234)REDACTED:15467
app.loadSettingsUI (cognitive 229)REDACTED:7128

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

What to do

  1. Bring the 44 bodies over 60 down to 60 or less in Cognitive Complexity — start with index.smartShopping (cognitive 596), database.migrateDB (cognitive 410), index.generateRecipeStream (cognitive 234). — 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 44 together lifts Cognitive 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: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.2 / 10Stronggated by 54 serious findings✓ 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 9.2 / 10 · rule-coverage 100% · ceiling Prevented

54 god class(es) detected.

MethodTooLong: index.smartShopping · ×32REDACTED:20952
FileTooLong: REDACTED · ×12REDACTED
TooManyMethods: index · ×8REDACTED:1
ClassTooLong: SetupActivity · ×2evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:72

What to do

  1. Resolve the 32 MethodTooLong finding(s) in God Classes — start with REDACTED (22), database.php (2), SetupActivity.kt (2). — One of this dimension's main actionable groups (32 warning-level).
  2. Resolve the 12 FileTooLong finding(s) in God Classes — start with REDACTED, REDACTED, audit.js. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 8 TooManyMethods finding(s) in God Classes — start with REDACTED, product_kind.php, KioskActivity.kt. — One of this dimension's main actionable groups (8 warning-level).

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

D4 · Code Duplication9.1 / 10Stronggated by 100 serious findings✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Verified

71 duplicated block group(s) detected. 2.2 % of the production lines (2,333 of 106,313) are in a reported copy. A further 29 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 100 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) · ×9evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:440
Duplicated block (7 lines × 2) · ×7evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:126
Duplicated block (5 lines × 2) · ×6evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1181
Edited copy of a member (9 corresponding lines) · ×5evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/ControlFragment.kt:152
Edited copy of a member (13 corresponding lines) · ×4evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:177

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

What to do

  1. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with REDACTED (5), SetupActivity.kt, database.php. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), HealthDb.kt, Updater.kt. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with SetupActivity.kt, KioskActivity.kt, REDACTED. — One of this dimension's main actionable groups (6 warning-level).

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

D5 · Coupling8.9 / 10Strong✓ Tool-verified

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

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

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

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

7 production modules (Gradle+npm+source-import), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations, and — for the source no manifest declares — its top-level source directories, with the imports between them as edges; edges a convention plugin adds from buildSrc or build-logic are not visible there; 1 module(s) off the main sequence, with abstractness counted on 4 of the 7 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: api

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.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 2 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

No automated tests — no test code was found in this repository.

No automated tests

What to do

  1. Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).

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

D12 · Dependency Hygiene8.0 3.2 / 10Weak✓ 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 3.2 / 10 · rule-coverage 40% · ceiling Verified

This repository's Gradle dependency graph was RESOLVED BY A BUILD, across every subproject rather than the root alone: 172 artifact(s) resolved, 68 of them gradable against Maven Central, and 55 behind a shipped release. Where a version was requested and a different one won conflict resolution, the RESOLVED version is what is graded — grading the request would recommend an upgrade already applied. Known CVEs in the same graph are a separate question again, reported under D30.

Outdated (compile): com.google.guava:guava · ×55

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

D13 · REDACTED 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

REDACTED 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 3 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 4 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. A further 15 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots4.2 / 10Weak✓ 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 4.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: REDACTED (332×206=68392); REDACTED (148×351=51948); api/database.php (31×196=6076) Repeated repair below the complexity floor: assets/js/core/auth.js (6 of 8 changes were fixes); evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt (3 of 4 changes were fixes)

Hotspot: REDACTED · ×17REDACTED:7128
Repeated repair: assets/js/core/auth.js · ×2assets/js/core/auth.js:97

What to do

  1. Resolve the 17 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED, REDACTED, database.php. — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with auth.js, SettingsActivity.kt. — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundevershelf-kiosk/app/build.gradle.kts:5

What to do

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

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

D21 · Naming Consistency7.5 / 10Strong✓ Tool-verified

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

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

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

2 naming inconsistencies among 80 declarations measured against a convention their peers follow.

`_tryGeminiNumberOCR` spells `OCR` where 12 names in the project spell it `Ocr`REDACTED:5277
`_buildPriceBadgeHTML` spells `HTML` where 66 names in the project spell it `Html`REDACTED:32448

What to do

  1. Resolve the 1 `_tryGeminiNumberOCR` spells `OCR` where 12 names in the project spell… finding(s) in Naming Consistency — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `_buildPriceBadgeHTML` spells `HTML` where 66 names in the project spell… finding(s) in Naming Consistency — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D24 · Comment Value9.8 9.7 / 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.7 / 10 · rule-coverage 98% · ceiling Documented

4 of 2116 judged comments only repeat the code they sit on (0.2 %). 43 comment(s) in another language or script were not judged.

redundant comment · ×4REDACTED:7439
doc comments repeat the namesREDACTED:25

✓ On the Gold path — maintain.

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

D26 · Project Cohesion10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

0 of 4 build units (Gradle, npm) flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md.

D28 · Secrets (history)5.0 / 10Adequate✓ Tool-verified

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

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

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

5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)2.0 / 10Critical✓ Tool-verified

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

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

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

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

55 finding(s): 0 critical, 41 high, 14 medium, 0 low. 36 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 2 file(s) — `REDACTED` (line 58), `evershelf-health-bridge/gradlew` (line 74, line 180) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 4 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 36 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (36 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities8.6 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security9.2 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.6 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: REDACTED↔product_kind.php 87%; REDACTED↔KioskActivity.kt 82%; REDACTED↔security.php 78%

Change coupling: REDACTED ↔ product_kind.php · ×5REDACTED:1

What to do

  1. Resolve the 5 Change coupling finding(s) in Change Coupling — start with REDACTED (2), REDACTED, cron_smart_shopping.php. — One of this dimension's main actionable groups (5 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels5.3 / 10Adequate✓ Tool-verified

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

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

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

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×3) — assets/js/audit.js:1566, assets/js/core/auth.js:112, assets/js/core/auth.js:161
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×4) — assets/js/receipt.js:123, assets/js/receipt.js:125, assets/js/receipt.js:127, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure4.9 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest. — index.html:2
  • With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled. — index.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — index.html:5

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics4.4 / 10Weak✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • The repo's own CSS styles .audit-scope with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — assets/js/audit.js:659, assets/js/audit.js:666
  • This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×3) — assets/js/audit.js:609, assets/js/audit.js:1475, assets/js/audit.js:1914
  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — assets/js/receipt.js:135

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness7.3 / 10Strong✓ Tool-verified

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

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

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

  • aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden. — index.html:118

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety1.0 / 10Critical✓ Tool-verified

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

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

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

  • `.preloader-retry-btn` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:816
  • `.offline-banner` sets color: #fff on background-color: #d97706 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:1225
  • `.back-btn` sets color: #059669 on background-color: #1e293b — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:1503
  • `.tab.active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2099
  • `.search-clear-btn` sets color: #64748b on background-color: #334155 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2130
  • `.search-clear-btn:hover, .search-clear-btn:focus-visible` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2152
  • `.btn-primary` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2772
  • `.btn-success` sets color: white on background-color: #16a34a — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2781
  • `.btn-warning` sets color: white on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2799
  • `#btn-report-bug` sets color: #fff on background-color: #f97316 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:2804
  • `.loc-btn.active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:3055
  • `.qty-btn:active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:3148
  • `.use-unit-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:3267
  • `.frac-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:3476
  • `.shopping-tab:not(.active) .shopping-tab-count` sets color: #7c3aed on background-color: #0f172a — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:4214
  • `.shop-filter-pill.is-active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:5011
  • `.shopping-footer` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:5222
  • `.bug-type-pill.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:6484
  • `.recipe-dialog-close:hover, .recipe-dialog-close:active` sets color: #0f172a on background-color: #0f172a — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:7273
  • `.recipe-result .recipe-tag.recipe-source-tag` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:7406
  • `.mplan-pick-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:7898
  • `.recipe-mealplan-banner` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:7914
  • `.settings-group-count` sets color: #fff on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9010
  • `.ess-pill` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9231
  • `.settings-savebar` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9349
  • `.settings-search-kbd` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9429
  • `.settings-info-box` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9557
  • `.settings-status.error` sets color: #dc2626 on background-color: #fee2e2 — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9623
  • `.recipe-option-chip:has(input:checked)` sets color: #fff on background-color: #10b981 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9809
  • `.recipe-opt-fuel-wrap:has(input:checked)` sets color: #fff on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9817
  • `.recipe-filter-chip.is-active` sets color: #fff on background-color: #10b981 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:9939
  • `.setup-header` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:12705
  • `[data-theme="dark"] .tab.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:13279
  • `[data-theme="dark"] .smart-filter-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:13480
  • `[data-theme="dark"] .btn-banner-use-danger` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:13584
  • `.audit-hit-quick` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:14690
  • `.audit-there` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:14807
  • `.audit-done` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/style.css:15103
  • `.capture-input-row .btn-accent` sets color: #fff on background-color: #34D399 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/surfaces.css:1481
  • `.quick-recipe-bar .btn-quick-recipe, #urgency-recipe-btn` sets color: #FFFFFF on background-color: #EA580C — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — assets/css/surfaces.css:1658

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition5.8 / 10Adequate✓ 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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

M1 · Documentation (README)10.0 / 10Exemplary✓ 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.

M2 · Architecture documentation2.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.

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.
M3 · Folder & project structure8.0 / 10Strong✓ 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 gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability6.5 / 10Adequate✓ Tool-verified

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

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

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `mcp-server`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling6.0 / 10Adequate✓ 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.

  • `REDACTED` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.

What to do

  • Trigger your SAST workflow on pull requests — a scan that only runs on a cron reports history, it does not gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `file_get_contents('https://` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:16379
  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:457, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1357, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1139
  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — mcp-server/src/evershelf-api.js:43

What to do

  • Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ 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.

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 · 15 plain JS — the untyped files are assets/js/audit.js, assets/js/core/auth.js, assets/js/core/dom.js, REDACTED, assets/js/core/support.js, assets/js/core/vocab.js (+9 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.4 / 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.

  • REDACTED:29899 · REDACTED:29962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:29899
  • REDACTED:1432 · REDACTED:1579 — the two spans are one implementation copied and then locally edited — 287 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. — REDACTED:1432
  • REDACTED:7144 · REDACTED:7314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:7144
  • REDACTED:24467 · REDACTED:24495 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:24467
  • REDACTED:29189 · REDACTED:38183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:29189
  • REDACTED:29856 · REDACTED:29939 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:29856
  • REDACTED:20850 · REDACTED:20919 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:20850
  • REDACTED:7568 · REDACTED:9127 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:7568
  • REDACTED:17857 · REDACTED:37964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:17857
  • REDACTED:6384 · REDACTED:6410 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:6384
  • REDACTED:5235 · REDACTED:31386 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:5235
  • REDACTED:15958 · REDACTED:15976 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:15958
  • REDACTED:30858 · REDACTED:31219 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:30858
  • REDACTED:6888 · REDACTED:6908 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:6888
  • REDACTED:10348 · assets/js/screensaver.js:430 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — REDACTED:10348
  • REDACTED:10420 · REDACTED:10744 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:10420
  • REDACTED:13725 · REDACTED:13914 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:13725
  • REDACTED:26574 · REDACTED:31079 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:26574
  • REDACTED:27426 · REDACTED:27450 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:27426
  • REDACTED:32265 · REDACTED:32278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:32265
  • REDACTED:34451 · REDACTED:34480 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:34451
  • REDACTED:42948 · REDACTED:43023 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:42948
  • REDACTED:5151 · REDACTED:5168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:5151
  • REDACTED:6441 · REDACTED:6480 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:6441
  • REDACTED:6973 · REDACTED:7063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:6973
  • REDACTED:8022 · REDACTED:8036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:8022
  • REDACTED:15843 · REDACTED:15887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:15843
  • REDACTED:16194 · REDACTED:16325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:16194
  • REDACTED:17137 · REDACTED:20391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:17137
  • REDACTED:17696 · REDACTED:17766 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:17696
  • REDACTED:22394 · REDACTED:22415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:22394
  • REDACTED:31145 · REDACTED:35485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:31145
  • REDACTED:38474 · REDACTED:38494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:38474
  • REDACTED:204 · REDACTED:254 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:204
  • REDACTED:1493 · REDACTED:1505 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1493
  • REDACTED:1988 · REDACTED:15713 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1988
  • REDACTED:8674 · REDACTED:40718 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:8674
  • REDACTED:12447 · REDACTED:18992 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:12447
  • REDACTED:18145 · REDACTED:30670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:18145
  • REDACTED:19939 · REDACTED:25825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:19939

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.

  • loadSettingsUI has cyclomatic complexity 205 and cognitive complexity 259; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:7128
  • _saveSettingsInner has cyclomatic complexity 171 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:8270
  • submitEditInventory has cyclomatic complexity 132 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:21642
  • submitAdd has cyclomatic complexity 109 and cognitive complexity 156; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:28433
  • renderBannerItem has cyclomatic complexity 100 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:14671
  • renderRecipe has cyclomatic complexity 94 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:38972
  • estimateOpenedExpiryDays has cyclomatic complexity 86 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:4411
  • loop has cyclomatic complexity 79 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. — REDACTED:24410
  • submitProduct has cyclomatic complexity 78 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:26410
  • estimateExpiryDays has cyclomatic complexity 71 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:4301
  • _runStartupCheck has cyclomatic complexity 64 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. — REDACTED:46193
  • _computeSuggestedQtyForPlanDays has cyclomatic complexity 57 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:31624
  • testTTS has cyclomatic complexity 53 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:41522
  • _apiFetchJson has cyclomatic complexity 53 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:9429
  • _medFormSetMode has cyclomatic complexity 50 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:25322
  • cleanupObsoleteBringItems has cyclomatic complexity 50 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:32655
  • showAddForm has cyclomatic complexity 50 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:27619
  • _auditRender has cyclomatic complexity 50 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — assets/js/audit.js:1864
  • renderSmartItem has cyclomatic complexity 49 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:33395
  • syncSettingsFromDB has cyclomatic complexity 47 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6076
  • _startRecipeGeneration has cyclomatic complexity 46 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:42732
  • _initApp has cyclomatic complexity 46 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:46604
  • _scaleAutoFillRecipeUse has cyclomatic complexity 44 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1575
  • _tryConfirmBarcode has cyclomatic complexity 42 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:22308
  • _medDetectCode has cyclomatic complexity 41 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:453
  • showPage has cyclomatic complexity 41 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:9809
  • fetchAllPrices has cyclomatic complexity 40 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:32526
  • showProductAction has cyclomatic complexity 40 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:26596
  • _editMedicalInventoryItem has cyclomatic complexity 40 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:21407
  • _scaleOnMessage has cyclomatic complexity 39 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. — REDACTED:1057
  • showItemDetail has cyclomatic complexity 39 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:17843
  • _medReadLabelOcrInner has cyclomatic complexity 39 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:22954
  • discoverMealie has cyclomatic complexity 39 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:42466
  • submitRecipeUse has cyclomatic complexity 39 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:38203
  • editInventoryItem has cyclomatic complexity 39 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:21041
  • loadUseInventoryInfo has cyclomatic complexity 37 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:28952
  • _setScanModeInner has cyclomatic complexity 37 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:19419
  • renderInventoryItem has cyclomatic complexity 37 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:16581
  • selectAIMatch has cyclomatic complexity 37 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:30971
  • loadShoppingList has cyclomatic complexity 36 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:33889
R3 · Large Files0.0 / 10Critical✓ Tool-verified

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

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

  • assets/js/audit.js has 2541 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — assets/js/audit.js:1
  • assets/js/screensaver.js has 885 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — assets/js/screensaver.js:1
  • assets/js/core/support.js has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — assets/js/core/support.js:1
  • REDACTED 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. — REDACTED:1
  • assets/js/core/vocab.js has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — assets/js/core/vocab.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 Coverage0.0 / 10Critical✓ Tool-verified

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

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

  • 0% of 15 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.8 / 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 Code10.0 / 10Exemplary✓ 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.

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 Imports10.0 / 10Exemplary✓ Tool-verified

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

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

S1 · Web-Security Posture10.0 / 10Exemplary○ Nothing flagged

Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

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

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

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

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

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

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

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

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

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

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

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

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

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

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

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

X2 · Cancellation propagation6.8 / 10Adequate✓ 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 7/15 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.
  • `loadTranslations` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:2365
  • `_loadAboutSection` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:6658
  • `_medImportCatalogFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:19062
  • `_fetchExpiryHistoryAndUpdate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:27880
  • `_startRecipeGeneration` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:42732
  • `_flushOfflineReports` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:46032
  • `ensureApiToken` 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 })`. — assets/js/core/auth.js:55
  • `submit` 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 })`. — assets/js/core/auth.js:118

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.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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

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

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen. Whether a `foreach` leaves the array or collection it is walking alone — PHP raises nothing, but the loop's view and the collection part: an array walked by value (and a Doctrine or Laravel collection) is walked as the snapshot taken when the loop began, so an element added in the body is never visited and one removed is visited anyway; an array walked by reference (`as &$v`) and an SPL container (`SplObjectStorage`, `ArrayObject`, `SplQueue`) are walked live, so an added element is walked too and a removal skips the next one; and after an `array_splice`, `array_shift` or sort every later key names a different element.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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 handling3.6 / 10Weak✓ Tool-verified

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

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

  • `.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. (×4) — sw.js:81, sw.js:125, sw.js:136, …
  • 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. (×19) — sw.js:182, sw.js:213, sw.js:267, …
  • `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×14) — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:214, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:284, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:288, …
  • `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:264, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:272, evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:942

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.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.

What to do

  • Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health20.8Critical — gated by D1, D2, R1, R2, R3, X3, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture85.1StrongSolid.
Maturity63.0Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness23.4Critical — gated by D8, D12, R4, R6, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security79.8Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility42.5Weak — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
Unscored — 3 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 — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 33 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.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 47 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's PHP imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. PHP builds its object graph per request and shares none of it between requests. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 Android app did not build — `./gradlew :app:assembleDebug` exited 1: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:validateSigningDebug'. > Keystore file '/root/.android/debug.keystore' not found for signing config 'projec…; runtime evidence skipped (launch chosen because evershelf-health-bridge/app/build.gradle.kts applies the Android application plugin and evershelf-health-bridge/gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — 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-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .kt, .php, .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (15 value object(s))
  • 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
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • 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
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X24 Document value interpolated into markup unescaped — X24 reached only 47% of this repository's production lines — php (46,853 lines), kotlin (9,026 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 61 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 11 more in this group — see findings.md.
AC2 · Forms & labels · <input> without a programmatic label · ×6
  • <input> without a programmatic label assets/js/audit.js:1566 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label assets/js/core/auth.js:112 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label assets/js/core/auth.js:161 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label assets/js/receipt.js:123 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label assets/js/receipt.js:125 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label assets/js/receipt.js:130 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D28 · Secrets (history) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×2
  • Clickable element isn't keyboard-operable assets/js/audit.js:659 — The repo's own CSS styles .audit-scope with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable assets/js/audit.js:666 — The repo's own CSS styles .audit-scope with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label assets/js/receipt.js:127 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom index.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC5 · ARIA correctness · aria-hidden hides a focusable element · ×1
  • aria-hidden hides a focusable element index.html:118 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (PHPUnit or Pest), and run it in CI so the gap cannot reopen.
Serious — 1247 finding(s)
D3 · God Classes · MethodTooLong · ×32
  • MethodTooLong: index.smartShopping REDACTED:20952 — MethodTooLong — smartShopping runs 690 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 590 over it, 6.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: database.migrateDB api/database.php:272 — MethodTooLong — migrateDB runs 614 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 514 over it, 6.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.generateRecipeStream REDACTED:15467 — MethodTooLong — generateRecipeStream runs 391 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 291 over it, 3.91× 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: index.useFromInventoryCore REDACTED:6863 — MethodTooLong — useFromInventoryCore runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× 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: index.generateRecipe REDACTED:14844 — MethodTooLong — generateRecipe runs 278 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 178 over it, 2.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.recipeText REDACTED:13289 — MethodTooLong — recipeText runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× 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: index.addToInventory REDACTED:5911 — MethodTooLong — addToInventory runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.getServerSettings REDACTED:10295 — MethodTooLong — getServerSettings runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.haInventorySensor REDACTED:3308 — MethodTooLong — haInventorySensor runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.bringSuggestItems REDACTED:22057 — MethodTooLong — bringSuggestItems runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SetupActivity.bindViews evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:258 — MethodTooLong — bindViews runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.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.
  • MethodTooLong: index.shoppingEvaluateFamilyRestock REDACTED:17991 — MethodTooLong — shoppingEvaluateFamilyRestock runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: seasonal.seasonalReviewShopping api/lib/seasonal.php:456 — MethodTooLong — seasonalReviewShopping 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.
  • MethodTooLong: index.getStats REDACTED:9315 — MethodTooLong — getStats runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.saveSettings REDACTED:11677 — MethodTooLong — saveSettings runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: health.computeMealBudget api/lib/health.php:415 — MethodTooLong — computeMealBudget runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: index.importInventory REDACTED:2674 — MethodTooLong — importInventory runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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: monthly_report.evershelfMonthlyReportHtml REDACTED:149 — MethodTooLong — evershelfMonthlyReportHtml runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: health.healthFuelPromptBlock api/lib/health.php:618 — MethodTooLong — healthFuelPromptBlock runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: index.updateInventory REDACTED:7284 — MethodTooLong — updateInventory runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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: SetupActivity.autoDiscover evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1161 — MethodTooLong — autoDiscover runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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: index.ensureShelfLifeLearningBackfilled REDACTED:6487 — MethodTooLong — ensureShelfLifeLearningBackfilled 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.
  • MethodTooLong: index.getConsumptionPredictions REDACTED:9992 — MethodTooLong — getConsumptionPredictions runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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.
  • MethodTooLong: index.locationRenameAction REDACTED:12027 — MethodTooLong — locationRenameAction runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.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.
  • MethodTooLong: index.geminiChat REDACTED:13110 — MethodTooLong — geminiChat runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 7 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×23
  • Swallowed exception (empty catch) sw.js:81 — `.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) sw.js:125 — `.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) sw.js:136 — `.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) sw.js:182 — 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) sw.js:192 — `.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) sw.js:213 — 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) sw.js:267 — 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) sw.js:278 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:80 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:108 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:122 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:160 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:294 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:311 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:354 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:397 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:428 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:607 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:876 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:990 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1596 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:170 — 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) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:691 — 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.8 · ×22
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:816 — `.preloader-retry-btn` sets color: #fff on background-color: #ef4444 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:2099 — `.tab.active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:2152 — `.search-clear-btn:hover, .search-clear-btn:focus-visible` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:2772 — `.btn-primary` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:3055 — `.loc-btn.active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:3148 — `.qty-btn:active` sets color: white on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:3267 — `.use-unit-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:3476 — `.frac-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:5011 — `.shop-filter-pill.is-active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:6484 — `.bug-type-pill.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:7406 — `.recipe-result .recipe-tag.recipe-source-tag` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:7898 — `.mplan-pick-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:7914 — `.recipe-mealplan-banner` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:9231 — `.ess-pill` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:9429 — `.settings-search-kbd` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:9557 — `.settings-info-box` sets color: #64748b on background-color: #0f172a — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:12705 — `.setup-header` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:13279 — `[data-theme="dark"] .tab.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:13480 — `[data-theme="dark"] .smart-filter-btn.active` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:14690 — `.audit-hit-quick` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:14807 — `.audit-there` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.8:1) assets/css/style.css:15103 — `.audit-done` sets color: #fff on background-color: #059669 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D15 · Churn × Complexity Hotspots · Hotspot · ×17
  • Hotspot: REDACTED REDACTED:7128 — REDACTED changed 332 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 206 in app.loadSettingsUI at line 7128. 145 of those changes were fix/bug commits, and the other 187 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:20952 — REDACTED changed 148 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 351 in index.smartShopping at line 20952. 63 of those changes were fix/bug commits, and the other 85 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/database.php api/database.php:272 — api/database.php changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 196 in database.migrateDB at line 272. 7 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/database.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: sw.js sw.js:235 — sw.js changed 311 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in sw.self.addEventListener("notificationclick") at line 235. 131 of those changes were fix/bug commits, and the other 180 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- sw.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: assets/js/audit.js assets/js/audit.js:1864 — assets/js/audit.js changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in audit._auditRender at line 1864. 6 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- assets/js/audit.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:704 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in KioskActivity.launchWebView at line 704. 11 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/seasonal.php api/lib/seasonal.php:456 — api/lib/seasonal.php changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in seasonal.seasonalReviewShopping at line 456. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/seasonal.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/product_kind.php api/lib/product_kind.php:803 — api/lib/product_kind.php changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in product_kind.productKindIsPlausibleGenre at line 803. 7 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/product_kind.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: assets/js/core/vocab.js assets/js/core/vocab.js:410 — assets/js/core/vocab.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in vocab.vocabCaptureLexicon at line 410. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- assets/js/core/vocab.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:595 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in SetupActivity.showStep at line 595. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: assets/js/screensaver.js assets/js/screensaver.js:207 — assets/js/screensaver.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in screensaver._ssPickRecipe at line 207. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- assets/js/screensaver.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/env.php api/lib/env.php:206 — api/lib/env.php changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in env.loadEnvOverrides at line 206. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/env.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/medical.php api/lib/medical.php:521 — api/lib/medical.php changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in medical.medicalDetectCode at line 521. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/medical.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/notify.php api/lib/notify.php:122 — api/lib/notify.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in notify.evershelfNotifyFormatEvent at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/notify.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:273 — REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in med._medOcrFindAic at line 273. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: api/lib/mealie.php api/lib/mealie.php:510 — api/lib/mealie.php changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in mealie.mealieRecipePantryCoverage at line 510. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- api/lib/mealie.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt:104 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in HealthConnectReader.readDay at line 104. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×17
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:214 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:264 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:272 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:284 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:288 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:293 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:942 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1236 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1242 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1379 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1443 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1491 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1504 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1527 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1746 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:107 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:563 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: REDACTED REDACTED — FileTooLong — 31213 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 30713 over it, 62.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 16912 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 16412 over it, 33.82× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/audit.js assets/js/audit.js — FileTooLong — 1536 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 1036 over it, 3.07× 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: kiosk/KioskActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt — FileTooLong — 1428 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 928 over it, 2.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: kiosk/SetupActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt — FileTooLong — 1175 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SetupActivity (72-1662). The bar is 500 significant lines; this is 675 over it, 2.35× 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: api/database.php api/database.php — FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 668 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/health.php api/lib/health.php — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 354 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/medicines.php api/lib/medicines.php — FileTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 235 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/screensaver.js assets/js/screensaver.js — FileTooLong — 650 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 150 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/product_kind.php api/lib/product_kind.php — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/mealie.php api/lib/mealie.php — FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 137 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/seasonal.php api/lib/seasonal.php — FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×11
  • Duplicated block (10 lines × 2 locations) REDACTED:5151 — REDACTED:5151 · REDACTED:5168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:6441 — REDACTED:6441 · REDACTED:6480 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) REDACTED:6973 — REDACTED:6973 · REDACTED:7063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:8022 — REDACTED:8022 · REDACTED:8036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:15843 — REDACTED:15843 · REDACTED:15887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:16194 — REDACTED:16194 · REDACTED:16325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:17137 — REDACTED:17137 · REDACTED:20391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:17696 — REDACTED:17696 · REDACTED:17766 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) REDACTED:22394 — REDACTED:22394 · REDACTED:22415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:31145 — REDACTED:31145 · REDACTED:35485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2 locations) REDACTED:38474 — REDACTED:38474 · REDACTED:38494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:440 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:440-447 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:473-480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:439` calls `stopScan` and `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:472` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) api/database.php:574 — api/database.php:574-581 | api/database.php:609-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:574` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) REDACTED:6386 — REDACTED:6386-6393 | REDACTED:6638-6645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:6578 — REDACTED:6578-6585 | REDACTED:6603-6610 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:7120 — REDACTED:7120-7127 | REDACTED:7136-7143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:8913 — REDACTED:8913-8920 | REDACTED:8941-8948 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:18270 — REDACTED:18270-18277 | REDACTED:18302-18309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:18270` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) api/lib/env.php:68 — api/lib/env.php:68-75 | api/lib/env.php:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/lib/env.php:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) scripts/i18n-audit.py:182 — scripts/i18n-audit.py:182-189 | scripts/i18n-value-audit.py:35-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×9
  • Duplicated block (11 lines × 2 locations) REDACTED:6888 — REDACTED:6888 · REDACTED:6908 — 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 (11 lines × 2 locations) REDACTED:10348 — REDACTED:10348 · assets/js/screensaver.js:430 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (11 lines × 2 locations) REDACTED:10420 — REDACTED:10420 · REDACTED:10744 — 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 (11 lines × 2 locations) REDACTED:13725 — REDACTED:13725 · REDACTED:13914 — 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 (11 lines × 2 locations) REDACTED:26574 — REDACTED:26574 · REDACTED:31079 — 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 (11 lines × 2 locations) REDACTED:27426 — REDACTED:27426 · REDACTED:27450 — 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 (11 lines × 2 locations) REDACTED:32265 — REDACTED:32265 · REDACTED:32278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2 locations) REDACTED:34451 — REDACTED:34451 · REDACTED:34480 — 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 (11 lines × 2 locations) REDACTED:42948 — REDACTED:42948 · REDACTED:43023 — 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.
D3 · God Classes · TooManyMethods · ×8
  • TooManyMethods: index REDACTED:1 — TooManyMethods — 532 methods. The bar is 30 methods; this is 502 over it, 17.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: product_kind api/lib/product_kind.php:1 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: KioskActivity evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:64 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: mealie api/lib/mealie.php:1 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: security api/lib/security.php:1 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SetupActivity evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:72 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WizardActivity evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/WizardActivity.kt:40 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Prefs evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Prefs.kt:11 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X2 · Cancellation propagation · Async function without AbortSignal · ×8
  • Async function without AbortSignal: loadTranslations REDACTED:2365 — `loadTranslations` 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: _loadAboutSection REDACTED:6658 — `_loadAboutSection` 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: _medImportCatalogFile REDACTED:19062 — `_medImportCatalogFile` 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: _fetchExpiryHistoryAndUpdate REDACTED:27880 — `_fetchExpiryHistoryAndUpdate` 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: _startRecipeGeneration REDACTED:42732 — `_startRecipeGeneration` 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: _flushOfflineReports REDACTED:46032 — `_flushOfflineReports` 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: ensureApiToken assets/js/core/auth.js:55 — `ensureApiToken` 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: submit assets/js/core/auth.js:118 — `submit` 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 })`.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×7
  • Duplicated block (7 lines × 2) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:126 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:126-132 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:151-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Updater.kt:88 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Updater.kt:88-94 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1247-1253 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Updater.kt:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) api/database.php:456 — api/database.php:456-462 | api/database.php:535-546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:456` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:12140 — REDACTED:12140-12146 | REDACTED:12346-12352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:12140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:17011 — REDACTED:17011-17017 | REDACTED:17028-17034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) api/lib/medical.php:353 — api/lib/medical.php:353-359 | api/lib/medical.php:372-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:3172 — REDACTED:3172-3178 | REDACTED:3211-3217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×7
  • Duplicated block (9 lines × 2 locations) REDACTED:204 — REDACTED:204 · REDACTED:254 — 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 (9 lines × 2 locations) REDACTED:1493 — REDACTED:1493 · REDACTED:1505 — 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 (9 lines × 2 locations) REDACTED:1988 — REDACTED:1988 · REDACTED:15713 — 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 (9 lines × 2 locations) REDACTED:8674 — REDACTED:8674 · REDACTED:40718 — 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 (9 lines × 2 locations) REDACTED:12447 — REDACTED:12447 · REDACTED:18992 — 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 (9 lines × 2 locations) REDACTED:18145 — REDACTED:18145 · REDACTED:30670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2 locations) REDACTED:19939 — REDACTED:19939 · REDACTED:25825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1181 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1181-1185 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1647-1651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:338 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:338-342 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:35-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:124 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:124-128 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1856-1860 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) api/lib/product_family.php:45 — api/lib/product_family.php:45-50 | api/lib/product_family.php:58-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/lib/product_family.php:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `api/lib/product_family.php:44` calls `array_keys` and `api/lib/product_family.php:56` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) REDACTED:17332 — REDACTED:17332-17336 | REDACTED:17337-17341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) api/lib/vocabulary.php:436 — api/lib/vocabulary.php:436-440 | api/lib/vocabulary.php:441-445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/lib/vocabulary.php:436` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×5
  • Change coupling: REDACTED ↔ product_kind.php REDACTED:1 — `REDACTED` and `api/lib/product_kind.php` change together 87% of the time (13 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `77375d80` fix(shopping): the family comes from the genre that leads the title (…; `6b709150` fix(shopping): the real need, not a tenth of it — onions keep 30 days…; `767169f9` feat(shopping): one number per generic — plurals come from the langua… — run `git show` on any of them.
  • Change coupling: REDACTED ↔ KioskActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:1 — `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt` and `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `1baffe94` release(kiosk): APK 1.7.36 — the BLE gateway no longer starts without…; `690102a6` release(kiosk): APK 1.7.35 — the pin is asked once, when the page is …; `53e2d790` release(kiosk): APK 1.7.34 — a fresh install no longer dies in the pe… — run `git show` on any of them.
  • Change coupling: REDACTED ↔ security.php REDACTED:1 — `REDACTED` and `api/lib/security.php` change together 78% of the time (14 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `266fd8a9` feat(med): per-country barcode schemas (data + sources) and an honest…; `5e71b9a4` feat(med): the opt-in medicine cabinet — backend, data and the discla…; `9c5613cb` refactor(C): app_settings is a client store, not a window on the server — run `git show` on any of them.
  • Change coupling: cron_smart_shopping.php ↔ REDACTED api/cron_smart_shopping.php:1 — `api/cron_smart_shopping.php` and `REDACTED` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `0edf78dd` chore: pre-merge audit — i18n, upgrade safety, docs, comments, dead code; `915fa254` feat(mealie): make the integration work in both directions, automatic…; `ad04b236` feat(med): the catalogue downloads itself, and a read is verified aga… — run `git show` on any of them.
  • Change coupling: bootstrap.php ↔ REDACTED api/bootstrap.php:1 — `api/bootstrap.php` and `REDACTED` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c24e9eda` feat(i18n): the vocabulary is data, the code is language-neutral; `99294169` fix(ai,i18n): identify the product in the UI language, and lock the A…; `d715b6ef` feat(recipes): recipe → shopping list minus the pantry (Q2 of the fea… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×5
  • Edited copy of a member (9 corresponding lines) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/ControlFragment.kt:152 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/ControlFragment.kt:152-161 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/DashboardFragment.kt:80-88 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/MainActivity.kt:154 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/MainActivity.kt:154-166 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/WizardActivity.kt:477-485 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) api/lib/notify.php:61 — api/lib/notify.php:61-69 | api/lib/notify.php:80-92 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) api/lib/product_kind.php:512 — api/lib/product_kind.php:512-520 | REDACTED:16466-16474 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) api/lib/product_kind.php:524 — api/lib/product_kind.php:524-535 | REDACTED:16478-16486 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience REDACTED:16379 — `file_get_contents('https://` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:457 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1357 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1139 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience mcp-server/src/evershelf-api.js:43 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×4
  • Modal dialog does not manage focus assets/js/audit.js:609 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus assets/js/audit.js:1475 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus assets/js/audit.js:1914 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus assets/js/receipt.js:135 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.1 · ×4
  • Low contrast colour pair in CSS (3.1:1) assets/css/style.css:4214 — `.shopping-tab:not(.active) .shopping-tab-count` sets color: #7c3aed on background-color: #0f172a — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.1:1) assets/css/style.css:5222 — `.shopping-footer` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.1:1) assets/css/style.css:9349 — `.settings-savebar` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.1:1) assets/css/style.css:13584 — `[data-theme="dark"] .btn-banner-use-danger` sets color: #64748b on background-color: #1e293b — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:177 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:177-220 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1137-1157 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:18849 — REDACTED:18849-18861 | api/lib/open_prices.php:112-138 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:17494 — REDACTED:17494-17506 | REDACTED:17524-17543 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) api/lib/product_kind.php:143 — api/lib/product_kind.php:143-155 | api/lib/vocabulary.php:387-399 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:188 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:188-198 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1140-1150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) REDACTED:3496 — REDACTED:3496-3506 | REDACTED:3998-4008 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3496` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) REDACTED:8898 — REDACTED:8898-8908 | REDACTED:8929-8939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:15145 — REDACTED:15145-15155 | REDACTED:15721-15731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:15145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) REDACTED:4707 — REDACTED:4707-4714 | REDACTED:4789-4796 | REDACTED:4815-4822 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) REDACTED:12102 — REDACTED:12102-12109 | REDACTED:12320-12327 | REDACTED:12410-12417 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:12102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) REDACTED:18527 — REDACTED:18527-18534 | REDACTED:18597-18604 | REDACTED:18811-18818 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) REDACTED:25495 — REDACTED:25495-25502 | REDACTED:25530-25537 | REDACTED:25549-25556 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:25495` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.1 · ×3
  • Low contrast colour pair in CSS (2.1:1) assets/css/style.css:2799 — `.btn-warning` sets color: white on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (2.1:1) assets/css/style.css:9010 — `.settings-group-count` sets color: #fff on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (2.1:1) assets/css/style.css:9817 — `.recipe-opt-fuel-wrap:has(input:checked)` sets color: #fff on background-color: #f59e0b — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) REDACTED:22842 — REDACTED:22842-22850 | REDACTED:23458-23464 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) api/lib/product_kind.php:1280 — api/lib/product_kind.php:1280-1290 | scripts/check-upgrade-migration.php:128-134 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:25735 — REDACTED:25735-25741 | REDACTED:25777-25784 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×3
  • Duplicated block (9 lines × 2) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/EverShelfClient.kt:229 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/EverShelfClient.kt:229-237 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1449-1457 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/EverShelfClient.kt:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) REDACTED:13111 — REDACTED:13111-13119 | REDACTED:16012-16020 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:13111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:18459 — REDACTED:18459-18467 | REDACTED:18509-18517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:18459` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:457 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:457-468 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1357-1368 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) REDACTED:2558 — REDACTED:2558-2569 | REDACTED:5254-5265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:5266` calls `productSaveParams` and `REDACTED:2571` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) REDACTED:14858 — REDACTED:14858-14869 | REDACTED:15486-15497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) REDACTED:7407 — REDACTED:7407-7420 | REDACTED:7514-7527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:7407` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) REDACTED:19380 — REDACTED:19380-19393 | REDACTED:19449-19462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:24924 — REDACTED:24924-24937 | REDACTED:24939-24952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:24924` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×3
  • Duplicated block (17 lines × 2 locations) REDACTED:24467 — REDACTED:24467 · REDACTED:24495 — 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 (17 lines × 2 locations) REDACTED:29189 — REDACTED:29189 · REDACTED:38183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) REDACTED:29856 — REDACTED:29856 · REDACTED:29939 — 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 (12 lines × 2 locations) · ×3
  • Duplicated block (12 lines × 2 locations) REDACTED:5235 — REDACTED:5235 · REDACTED:31386 — 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) REDACTED:15958 — REDACTED:15958 · REDACTED:15976 — 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) REDACTED:30858 — REDACTED:30858 · REDACTED:31219 — 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.5 · ×2
  • Low contrast colour pair in CSS (2.5:1) assets/css/style.css:9809 — `.recipe-option-chip:has(input:checked)` sets color: #fff on background-color: #10b981 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (2.5:1) assets/css/style.css:9939 — `.recipe-filter-chip.is-active` sets color: #fff on background-color: #10b981 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · app._initInventoryRowSwipe · ×2
  • app._initInventoryRowSwipe::onEnd (cyclomatic 24) REDACTED:16931 — app._initInventoryRowSwipe::onEnd has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (app._initInventoryRowSwipe::onMove) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • app._initInventoryRowSwipe::onMove (cyclomatic 17) REDACTED:16892 — app._initInventoryRowSwipe::onMove has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (app._initInventoryRowSwipe::onEnd) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 16) · ×2
  • (anonymous) (cyclomatic 16) assets/js/audit.js:2621 — (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous) (cyclomatic 16) assets/js/settings_search.js:193 — (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: assets/js/core/auth.js assets/js/core/auth.js:97 — assets/js/core/auth.js changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is auth._promptPairingCode at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(support): a donation is never asked again, later returns on a random start”; “fix(kiosk): dedicated pairing step and hand token to WebView (v1.11.9 / 1.7.24)”; “fix(i18n): use a key for the API-token placeholder”; “fix(auth): keep the pairing dialog above the network-error overlay too”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- assets/js/core/auth.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt:41 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is SettingsActivity.onCreate at line 41), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(kiosk): dedicated pairing step and hand token to WebView (v1.11.9 / 1.7.24)”; “fix(security): require the CSRF header on every POST, not on 25 known ones”; “Fix i18n language consistency across web + kiosk”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 20:37:01 +00:00' --until='2026-11-15 20:37:01 +00:00' --full-history --no-merges -- evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SettingsActivity.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · app._initInventoryRowSwipe · ×2
  • app._initInventoryRowSwipe::onEnd (cognitive 20) REDACTED:16931 — app._initInventoryRowSwipe::onEnd has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (app._initInventoryRowSwipe::onMove) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • app._initInventoryRowSwipe::onMove (cognitive 17) REDACTED:16892 — app._initInventoryRowSwipe::onMove has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (app._initInventoryRowSwipe::onEnd) 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: SetupActivity evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:72 — ClassTooLong — 1122 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 722 over it, 2.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WizardActivity evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/WizardActivity.kt:40 — ClassTooLong — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 45 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:403 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:403-412 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:647-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) api/database.php:618 — api/database.php:618-626 | api/database.php:688-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:618` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:657 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:657-665 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:757-765 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1357-1365 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) REDACTED:24229 — REDACTED:24229-24237 | REDACTED:24321-24329 | REDACTED:24564-24572 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:24229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×2
  • Duplicated block (16–18 lines × 2) REDACTED:20070 — REDACTED:20070-20087 | REDACTED:20188-20203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16–18 lines × 2) api/lib/medicines.php:227 — api/lib/medicines.php:227-244 | api/lib/medicines.php:296-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/lib/medicines.php:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) api/database.php:755 — api/database.php:755-767 | api/database.php:838-850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:755` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) REDACTED:13577 — REDACTED:13577-13589 | REDACTED:14499-14511 — 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 (14 lines × 2 locations) · ×2
  • Duplicated block (14 lines × 2 locations) REDACTED:7568 — REDACTED:7568 · REDACTED:9127 — 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 (14 lines × 2 locations) REDACTED:17857 — REDACTED:17857 · REDACTED:37964 — 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.
AC3 · Page structure · More than one main landmark · ×1
  • More than one main landmark index.html:2 — A document must expose only one main landmark. Multiple visible <main> (or role="main") elements confuse the landmark map and the "skip to content" target. Keep one; remove or hide the rest.
AC3 · Page structure · Multiple navigation landmarks without distinguishing labels · ×1
  • Multiple navigation landmarks without distinguishing labels index.html:2 — With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.2 · ×1
  • Low contrast colour pair in CSS (3.2:1) assets/css/style.css:1225 — `.offline-banner` sets color: #fff on background-color: #d97706 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.9 · ×1
  • Low contrast colour pair in CSS (3.9:1) assets/css/style.css:1503 — `.back-btn` sets color: #059669 on background-color: #1e293b — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.2 · ×1
  • Low contrast colour pair in CSS (2.2:1) assets/css/style.css:2130 — `.search-clear-btn` sets color: #64748b on background-color: #334155 — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.3 · ×1
  • Low contrast colour pair in CSS (3.3:1) assets/css/style.css:2781 — `.btn-success` sets color: white on background-color: #16a34a — 3.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.8 · ×1
  • Low contrast colour pair in CSS (2.8:1) assets/css/style.css:2804 — `#btn-report-bug` sets color: #fff on background-color: #f97316 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.0 · ×1
  • Low contrast colour pair in CSS (1.0:1) assets/css/style.css:7273 — `.recipe-dialog-close:hover, .recipe-dialog-close:active` sets color: #0f172a on background-color: #0f172a — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.0 · ×1
  • Low contrast colour pair in CSS (4.0:1) assets/css/style.css:9623 — `.settings-status.error` sets color: #dc2626 on background-color: #fee2e2 — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.9 · ×1
  • Low contrast colour pair in CSS (1.9:1) assets/css/surfaces.css:1481 — `.capture-input-row .btn-accent` sets color: #fff on background-color: #34D399 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.6 · ×1
  • Low contrast colour pair in CSS (3.6:1) assets/css/surfaces.css:1658 — `.quick-recipe-bar .btn-quick-recipe, #urgency-recipe-btn` sets color: #FFFFFF on background-color: #EA580C — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · index.smartShopping (cyclomatic 351) · ×1
  • index.smartShopping (cyclomatic 351) REDACTED:20952 — index.smartShopping has cyclomatic complexity 351 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.loadSettingsUI (cyclomatic 206) · ×1
  • app.loadSettingsUI (cyclomatic 206) REDACTED:7128 — app.loadSettingsUI has cyclomatic complexity 206 (threshold 15). Of this number, 204 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 · database.migrateDB (cyclomatic 196) · ×1
  • database.migrateDB (cyclomatic 196) api/database.php:272 — database.migrateDB has cyclomatic complexity 196 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._saveSettingsInner (cyclomatic 171) · ×1
  • app._saveSettingsInner (cyclomatic 171) REDACTED:8270 — app._saveSettingsInner has cyclomatic complexity 171 (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 · app.submitEditInventory (cyclomatic 130) · ×1
  • app.submitEditInventory (cyclomatic 130) REDACTED:21642 — app.submitEditInventory has cyclomatic complexity 130 (threshold 15). Of this number, 128 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 · app.renderRecipe (cyclomatic 127) · ×1
  • app.renderRecipe (cyclomatic 127) REDACTED:38972 — app.renderRecipe has cyclomatic complexity 127 (threshold 15). Of this number, 90 points are the body's own statements and 37 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.generateRecipeStream (cyclomatic 123) · ×1
  • index.generateRecipeStream (cyclomatic 123) REDACTED:15467 — index.generateRecipeStream has cyclomatic complexity 123 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.submitAdd (cyclomatic 109) · ×1
  • app.submitAdd (cyclomatic 109) REDACTED:28433 — app.submitAdd has cyclomatic complexity 109 (threshold 15). Of this number, 106 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 · database.estimateOpenedExpiryDaysPHP (cyclomatic 105) · ×1
  • database.estimateOpenedExpiryDaysPHP (cyclomatic 105) api/database.php:1280 — database.estimateOpenedExpiryDaysPHP has cyclomatic complexity 105 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.loadBannerAlerts (cyclomatic 102) · ×1
  • app.loadBannerAlerts (cyclomatic 102) REDACTED:14321 — app.loadBannerAlerts has cyclomatic complexity 102 (threshold 15). Of this number, 20 points are the body's own statements and 82 belong to 14 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 · app.renderBannerItem (cyclomatic 101) · ×1
  • app.renderBannerItem (cyclomatic 101) REDACTED:14671 — app.renderBannerItem has cyclomatic complexity 101 (threshold 15). Of this number, 100 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 · index.useFromInventoryCore (cyclomatic 99) · ×1
  • index.useFromInventoryCore (cyclomatic 99) REDACTED:6863 — index.useFromInventoryCore has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.estimateOpenedExpiryDays (cyclomatic 86) · ×1
  • app.estimateOpenedExpiryDays (cyclomatic 86) REDACTED:4411 — app.estimateOpenedExpiryDays has cyclomatic complexity 86 (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 · app._runStartupCheck (cyclomatic 86) · ×1
  • app._runStartupCheck (cyclomatic 86) REDACTED:46193 — app._runStartupCheck has cyclomatic complexity 86 (threshold 15). Of this number, 61 points are the body's own statements and 25 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 · app.startUnifiedScanner · ×1
  • app.startUnifiedScanner::loop (cyclomatic 78) REDACTED:24410 — app.startUnifiedScanner::loop has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.submitProduct (cyclomatic 76) · ×1
  • app.submitProduct (cyclomatic 76) REDACTED:26410 — app.submitProduct has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index._calcEstimatedTotal (cyclomatic 75) · ×1
  • index._calcEstimatedTotal (cyclomatic 75) REDACTED:25285 — index._calcEstimatedTotal has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.testTTS (cyclomatic 71) · ×1
  • app.testTTS (cyclomatic 71) REDACTED:41522 — app.testTTS has cyclomatic complexity 71 (threshold 15). Of this number, 52 points are the body's own statements and 19 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 · app.estimateExpiryDays (cyclomatic 70) · ×1
  • app.estimateExpiryDays (cyclomatic 70) REDACTED:4301 — app.estimateExpiryDays has cyclomatic complexity 70 (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 · index.generateRecipe (cyclomatic 70) · ×1
  • index.generateRecipe (cyclomatic 70) REDACTED:14844 — index.generateRecipe has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.showProductAction (cyclomatic 69) · ×1
  • app.showProductAction (cyclomatic 69) REDACTED:26596 — app.showProductAction has cyclomatic complexity 69 (threshold 15). Of this number, 40 points are the body's own statements and 29 belong to 4 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 · app._initApp (cyclomatic 65) · ×1
  • app._initApp (cyclomatic 65) REDACTED:46604 — app._initApp has cyclomatic complexity 65 (threshold 15). Of this number, 43 points are the body's own statements and 22 belong to 11 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · database.estimateSealedExpiryDaysPHP (cyclomatic 64) · ×1
  • database.estimateSealedExpiryDaysPHP (cyclomatic 64) api/database.php:1463 — database.estimateSealedExpiryDaysPHP has cyclomatic complexity 64 (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 · app._renderInfoTab (cyclomatic 59) · ×1
  • app._renderInfoTab (cyclomatic 59) REDACTED:6500 — app._renderInfoTab has cyclomatic complexity 59 (threshold 15). Of this number, 33 points are the body's own statements and 26 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SetupActivity.autoDiscover (cyclomatic 58) · ×1
  • SetupActivity.autoDiscover (cyclomatic 58) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1161 — SetupActivity.autoDiscover 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 · seasonal.seasonalReviewShopping (cyclomatic 58) · ×1
  • seasonal.seasonalReviewShopping (cyclomatic 58) api/lib/seasonal.php:456 — seasonal.seasonalReviewShopping 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 · app.showAddForm (cyclomatic 57) · ×1
  • app.showAddForm (cyclomatic 57) REDACTED:27619 — app.showAddForm has cyclomatic complexity 57 (threshold 15). Of this number, 50 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._computeSuggestedQtyForPlanDays (cyclomatic 57) · ×1
  • app._computeSuggestedQtyForPlanDays (cyclomatic 57) REDACTED:31624 — app._computeSuggestedQtyForPlanDays has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.shoppingEvaluateFamilyRestock (cyclomatic 54) · ×1
  • index.shoppingEvaluateFamilyRestock (cyclomatic 54) REDACTED:17991 — index.shoppingEvaluateFamilyRestock has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._scaleAutoFillRecipeUse (cyclomatic 53) · ×1
  • app._scaleAutoFillRecipeUse (cyclomatic 53) REDACTED:1575 — app._scaleAutoFillRecipeUse has cyclomatic complexity 53 (threshold 15). Of this number, 44 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._apiFetchJson (cyclomatic 53) · ×1
  • app._apiFetchJson (cyclomatic 53) REDACTED:9429 — app._apiFetchJson has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.medLookupAction (cyclomatic 51) · ×1
  • index.medLookupAction (cyclomatic 51) REDACTED:11030 — index.medLookupAction has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._captureStartVoice (cyclomatic 50) · ×1
  • app._captureStartVoice (cyclomatic 50) REDACTED:12815 — app._captureStartVoice 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 9 function items inside it that branch (startSession, a function literal at line 13001, a function literal at line 12934, …). 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 · app.editInventoryItem (cyclomatic 50) · ×1
  • app.editInventoryItem (cyclomatic 50) REDACTED:21041 — app.editInventoryItem has cyclomatic complexity 50 (threshold 15). Of this number, 39 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._medFormSetMode (cyclomatic 50) · ×1
  • app._medFormSetMode (cyclomatic 50) REDACTED:25322 — app._medFormSetMode has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.loadUseInventoryInfo (cyclomatic 50) · ×1
  • app.loadUseInventoryInfo (cyclomatic 50) REDACTED:28952 — app.loadUseInventoryInfo has cyclomatic complexity 50 (threshold 15). Of this number, 40 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · audit._auditRender (cyclomatic 50) · ×1
  • audit._auditRender (cyclomatic 50) assets/js/audit.js:1864 — audit._auditRender has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._editMedicalInventoryItem (cyclomatic 49) · ×1
  • app._editMedicalInventoryItem (cyclomatic 49) REDACTED:21407 — app._editMedicalInventoryItem has cyclomatic complexity 49 (threshold 15). Of this number, 40 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app.cleanupObsoleteBringItems (cyclomatic 49) · ×1
  • app.cleanupObsoleteBringItems (cyclomatic 49) REDACTED:32655 — app.cleanupObsoleteBringItems 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 · app.renderSmartItem (cyclomatic 49) · ×1
  • app.renderSmartItem (cyclomatic 49) REDACTED:33395 — app.renderSmartItem 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 · app.enrichRecipeIngredientsStock (cyclomatic 49) · ×1
  • app.enrichRecipeIngredientsStock (cyclomatic 49) REDACTED:37605 — app.enrichRecipeIngredientsStock has cyclomatic complexity 49 (threshold 15). Of this number, 33 points are the body's own statements and 16 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 · app.syncSettingsFromDB (cyclomatic 47) · ×1
  • app.syncSettingsFromDB (cyclomatic 47) REDACTED:6076 — app.syncSettingsFromDB 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 · app._startRecipeGeneration (cyclomatic 47) · ×1
  • app._startRecipeGeneration (cyclomatic 47) REDACTED:42732 — app._startRecipeGeneration has cyclomatic complexity 47 (threshold 15). Of this number, 45 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 · index.updateInventory (cyclomatic 47) · ×1
  • index.updateInventory (cyclomatic 47) REDACTED:7284 — index.updateInventory 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 · index.saveSettings (cyclomatic 47) · ×1
  • index.saveSettings (cyclomatic 47) REDACTED:11677 — index.saveSettings 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 · index.recipeApplyPantryQtyFields (cyclomatic 47) · ×1
  • index.recipeApplyPantryQtyFields (cyclomatic 47) REDACTED:14492 — index.recipeApplyPantryQtyFields 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 · app.fetchAllPrices (cyclomatic 46) · ×1
  • app.fetchAllPrices (cyclomatic 46) REDACTED:32526 — app.fetchAllPrices has cyclomatic complexity 46 (threshold 15). Of this number, 39 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.renderShoppingItems (cyclomatic 46) · ×1
  • app.renderShoppingItems (cyclomatic 46) REDACTED:34864 — app.renderShoppingItems has cyclomatic complexity 46 (threshold 15). Of this number, 28 points are the body's own statements and 18 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.ensureShelfLifeLearningBackfilled (cyclomatic 46) · ×1
  • index.ensureShelfLifeLearningBackfilled (cyclomatic 46) REDACTED:6487 — index.ensureShelfLifeLearningBackfilled has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._handleOfflineApi (cyclomatic 44) · ×1
  • app._handleOfflineApi (cyclomatic 44) REDACTED:43540 — app._handleOfflineApi has cyclomatic complexity 44 (threshold 15). Of this number, 33 points are the body's own statements and 11 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 · med._medDetectCode (cyclomatic 44) · ×1
  • med._medDetectCode (cyclomatic 44) REDACTED:453 — med._medDetectCode has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · health.computeMealBudget (cyclomatic 44) · ×1
  • health.computeMealBudget (cyclomatic 44) api/lib/health.php:415 — health.computeMealBudget has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.submitRecipeUse (cyclomatic 43) · ×1
  • app.submitRecipeUse (cyclomatic 43) REDACTED:38203 — app.submitRecipeUse has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, 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 · app._applyInsightPhase (cyclomatic 42) · ×1
  • app._applyInsightPhase (cyclomatic 42) REDACTED:10815 — app._applyInsightPhase has cyclomatic complexity 42 (threshold 15). Of this number, 17 points are the body's own statements and 25 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._tryConfirmBarcode (cyclomatic 42) · ×1
  • app._tryConfirmBarcode (cyclomatic 42) REDACTED:22308 — app._tryConfirmBarcode 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 · app._medReadLabelOcrInner (cyclomatic 42) · ×1
  • app._medReadLabelOcrInner (cyclomatic 42) REDACTED:22954 — app._medReadLabelOcrInner has cyclomatic complexity 42 (threshold 15). Of this number, 39 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.showLowStockBringPrompt (cyclomatic 42) · ×1
  • app.showLowStockBringPrompt (cyclomatic 42) REDACTED:29597 — app.showLowStockBringPrompt has cyclomatic complexity 42 (threshold 15). Of this number, 36 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.showPage (cyclomatic 41) · ×1
  • app.showPage (cyclomatic 41) REDACTED:9809 — app.showPage has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · app._bindCookingWheelControls (cyclomatic 41) · ×1
  • app._bindCookingWheelControls (cyclomatic 41) REDACTED:40004 — app._bindCookingWheelControls has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 5 of the 41 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 40029, 40093, 40008, …). 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 · recipe_shopping.evershelfRecipeShoppingPlan (cyclomatic 41) · ×1
  • recipe_shopping.evershelfRecipeShoppingPlan (cyclomatic 41) api/lib/recipe_shopping.php:316 — recipe_shopping.evershelfRecipeShoppingPlan has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.showItemDetail (cyclomatic 39) · ×1
  • app.showItemDetail (cyclomatic 39) REDACTED:17843 — app.showItemDetail has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.discoverMealie (cyclomatic 39) · ×1
  • app.discoverMealie (cyclomatic 39) REDACTED:42466 — app.discoverMealie has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._backgroundBringSync (cyclomatic 39) · ×1
  • app._backgroundBringSync (cyclomatic 39) REDACTED:46882 — app._backgroundBringSync has cyclomatic complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qr.evershelfQrFunctionPattern (cyclomatic 39) · ×1
  • qr.evershelfQrFunctionPattern (cyclomatic 39) api/lib/qr.php:267 — qr.evershelfQrFunctionPattern has cyclomatic complexity 39 (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 · app._scaleOnMessage (cyclomatic 38) · ×1
  • app._scaleOnMessage (cyclomatic 38) REDACTED:1057 — app._scaleOnMessage 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 · index.addToInventory (cyclomatic 38) · ×1
  • index.addToInventory (cyclomatic 38) REDACTED:5911 — index.addToInventory has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.mergeIncomingProductFields (cyclomatic 38) · ×1
  • index.mergeIncomingProductFields (cyclomatic 38) REDACTED:7802 — index.mergeIncomingProductFields 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 · medicines.medicinesImportFile (cyclomatic 38) · ×1
  • medicines.medicinesImportFile (cyclomatic 38) api/lib/medicines.php:859 — medicines.medicinesImportFile 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 · app.renderInventoryItem (cyclomatic 37) · ×1
  • app.renderInventoryItem (cyclomatic 37) REDACTED:16581 — app.renderInventoryItem has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.selectAIMatch (cyclomatic 37) · ×1
  • app.selectAIMatch (cyclomatic 37) REDACTED:30971 — app.selectAIMatch has cyclomatic complexity 37 (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 · app.useRecipeIngredient (cyclomatic 37) · ×1
  • app.useRecipeIngredient (cyclomatic 37) REDACTED:37752 — app.useRecipeIngredient has cyclomatic complexity 37 (threshold 15). Of this number, 32 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KioskActivity.launchWebView (cyclomatic 37) · ×1
  • KioskActivity.launchWebView (cyclomatic 37) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:704 — KioskActivity.launchWebView has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._setScanModeInner (cyclomatic 36) · ×1
  • app._setScanModeInner (cyclomatic 36) REDACTED:19419 — app._setScanModeInner has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.startQuaggaScanner (cyclomatic 36) · ×1
  • app.startQuaggaScanner (cyclomatic 36) REDACTED:24616 — app.startQuaggaScanner has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 24720, scanFrame, getFrameDataUrl, …). 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 · app.loadShoppingList (cyclomatic 36) · ×1
  • app.loadShoppingList (cyclomatic 36) REDACTED:33889 — app.loadShoppingList 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 · app.loadLog (cyclomatic 36) · ×1
  • app.loadLog (cyclomatic 36) REDACTED:35707 — app.loadLog has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 35723). 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 · app.formatRecipeShareText (cyclomatic 36) · ×1
  • app.formatRecipeShareText (cyclomatic 36) REDACTED:38574 — app.formatRecipeShareText has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 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 · app._scaleUpdateLiveBox (cyclomatic 35) · ×1
  • app._scaleUpdateLiveBox (cyclomatic 35) REDACTED:1363 — app._scaleUpdateLiveBox 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 · app.loadDashboard · ×1
  • app.loadDashboard::openedRow (cyclomatic 35) REDACTED:13844 — app.loadDashboard::openedRow has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (app.loadDashboard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · app.initScanner (cyclomatic 35) · ×1
  • app.initScanner (cyclomatic 35) REDACTED:21960 — app.initScanner has cyclomatic complexity 35 (threshold 15). 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: 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 · app._localizeSmartReason (cyclomatic 35) · ×1
  • app._localizeSmartReason (cyclomatic 35) REDACTED:33663 — app._localizeSmartReason has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · vocab.vocabCaptureLexicon (cyclomatic 35) · ×1
  • vocab.vocabCaptureLexicon (cyclomatic 35) assets/js/core/vocab.js:410 — vocab.vocabCaptureLexicon has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 7 of the 35 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 426, a function literal at line 440, a function literal at line 448, …). 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 · index.getStats (cyclomatic 35) · ×1
  • index.getStats (cyclomatic 35) REDACTED:9315 — index.getStats 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 · index.recipeScorePantryMatch (cyclomatic 35) · ×1
  • index.recipeScorePantryMatch (cyclomatic 35) REDACTED:14361 — index.recipeScorePantryMatch 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 · index.bringQuickSyncProduct (cyclomatic 35) · ×1
  • index.bringQuickSyncProduct (cyclomatic 35) REDACTED:16742 — index.bringQuickSyncProduct 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 · app._scaleAutoFillUse (cyclomatic 34) · ×1
  • app._scaleAutoFillUse (cyclomatic 34) REDACTED:1422 — app._scaleAutoFillUse has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._bindRowHoldOpen (cyclomatic 34) · ×1
  • app._bindRowHoldOpen (cyclomatic 34) REDACTED:16698 — app._bindRowHoldOpen has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 6 function items inside it that branch (onUp, onDown, onMove, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · app._medConfirmRead (cyclomatic 34) · ×1
  • app._medConfirmRead (cyclomatic 34) REDACTED:23345 — app._medConfirmRead 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 · index.locationRenameAction (cyclomatic 34) · ×1
  • index.locationRenameAction (cyclomatic 34) REDACTED:12027 — index.locationRenameAction has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.bringSuggestItems (cyclomatic 34) · ×1
  • index.bringSuggestItems (cyclomatic 34) REDACTED:22057 — index.bringSuggestItems 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 · screensaver._ssPickRecipe (cyclomatic 33) · ×1
  • screensaver._ssPickRecipe (cyclomatic 33) assets/js/screensaver.js:207 — screensaver._ssPickRecipe has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 217, 213, 230). 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 · index.haInventorySensor (cyclomatic 33) · ×1
  • index.haInventorySensor (cyclomatic 33) REDACTED:3308 — index.haInventorySensor 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 · index.haParseRecipeGenerateInput (cyclomatic 33) · ×1
  • index.haParseRecipeGenerateInput (cyclomatic 33) REDACTED:3648 — index.haParseRecipeGenerateInput 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 · app._locMacroBarHtml (cyclomatic 32) · ×1
  • app._locMacroBarHtml (cyclomatic 32) REDACTED:3184 — app._locMacroBarHtml has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 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 · app._itemDetailQtyInit (cyclomatic 32) · ×1
  • app._itemDetailQtyInit (cyclomatic 32) REDACTED:18177 — app._itemDetailQtyInit has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · screensaver._ssFactCandidates (cyclomatic 32) · ×1
  • screensaver._ssFactCandidates (cyclomatic 32) assets/js/screensaver.js:483 — screensaver._ssFactCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.getConsumptionPredictions (cyclomatic 32) · ×1
  • index.getConsumptionPredictions (cyclomatic 32) REDACTED:9992 — index.getConsumptionPredictions has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._renderAntiWasteSection (cyclomatic 31) · ×1
  • app._renderAntiWasteSection (cyclomatic 31) REDACTED:10100 — app._renderAntiWasteSection has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, 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 · app.installMealie (cyclomatic 31) · ×1
  • app.installMealie (cyclomatic 31) REDACTED:42534 — app.installMealie 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 · index._parseOffProductJson (cyclomatic 31) · ×1
  • index._parseOffProductJson (cyclomatic 31) REDACTED:4706 — index._parseOffProductJson 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 · app._captureParse (cyclomatic 30) · ×1
  • app._captureParse (cyclomatic 30) REDACTED:13142 — app._captureParse 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 · app._fetchExpiryHistoryAndUpdate (cyclomatic 30) · ×1
  • app._fetchExpiryHistoryAndUpdate (cyclomatic 30) REDACTED:27880 — app._fetchExpiryHistoryAndUpdate 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 · app._applyAIProductHint (cyclomatic 30) · ×1
  • app._applyAIProductHint (cyclomatic 30) REDACTED:27952 — app._applyAIProductHint has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · audit._auditElsewhereView (cyclomatic 30) · ×1
  • audit._auditElsewhereView (cyclomatic 30) assets/js/audit.js:1450 — audit._auditElsewhereView has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · HealthConnectReader.readDay (cyclomatic 29) · ×1
  • HealthConnectReader.readDay (cyclomatic 29) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt:104 — HealthConnectReader.readDay 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 · index.importInventory (cyclomatic 29) · ×1
  • index.importInventory (cyclomatic 29) REDACTED:2674 — index.importInventory 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 · medicines.medicineSearchFuzzy (cyclomatic 29) · ×1
  • medicines.medicineSearchFuzzy (cyclomatic 29) api/lib/medicines.php:640 — medicines.medicineSearchFuzzy 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 · app.getExpiredSafety (cyclomatic 28) · ×1
  • app.getExpiredSafety (cyclomatic 28) REDACTED:4007 — app.getExpiredSafety 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 · app.onBarcodeDetected (cyclomatic 28) · ×1
  • app.onBarcodeDetected (cyclomatic 28) REDACTED:25163 — app.onBarcodeDetected has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._initSmartSuggestedChips (cyclomatic 28) · ×1
  • app._initSmartSuggestedChips (cyclomatic 28) REDACTED:33347 — app._initSmartSuggestedChips has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._cookingVoiceStart (cyclomatic 28) · ×1
  • app._cookingVoiceStart (cyclomatic 28) REDACTED:39665 — app._cookingVoiceStart has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._setupCollectCurrent (cyclomatic 28) · ×1
  • app._setupCollectCurrent (cyclomatic 28) REDACTED:45815 — app._setupCollectCurrent 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 · app._finishSetup (cyclomatic 28) · ×1
  • app._finishSetup (cyclomatic 28) REDACTED:45905 — app._finishSetup has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · audit._auditBegin (cyclomatic 28) · ×1
  • audit._auditBegin (cyclomatic 28) assets/js/audit.js:1685 — audit._auditBegin has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KioskActivity.checkForUpdates (cyclomatic 28) · ×1
  • KioskActivity.checkForUpdates (cyclomatic 28) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1215 — KioskActivity.checkForUpdates 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 · index.ttsProxy (cyclomatic 28) · ×1
  • index.ttsProxy (cyclomatic 28) REDACTED:2869 — index.ttsProxy 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 · index.barcodeResolveExternal (cyclomatic 28) · ×1
  • index.barcodeResolveExternal (cyclomatic 28) REDACTED:4878 — index.barcodeResolveExternal 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 · index.bringUpsertSmartItem (cyclomatic 28) · ×1
  • index.bringUpsertSmartItem (cyclomatic 28) REDACTED:18929 — index.bringUpsertSmartItem 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 · medicines.medicinesSyncSources (cyclomatic 28) · ×1
  • medicines.medicinesSyncSources (cyclomatic 28) api/lib/medicines.php:204 — medicines.medicinesSyncSources 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 · app._recipeArchiveCardHtml (cyclomatic 27) · ×1
  • app._recipeArchiveCardHtml (cyclomatic 27) REDACTED:36765 — app._recipeArchiveCardHtml has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · app.cookRecipeDeductSelected (cyclomatic 27) · ×1
  • app.cookRecipeDeductSelected (cyclomatic 27) REDACTED:39278 — app.cookRecipeDeductSelected 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 · app.saveHaSettings (cyclomatic 27) · ×1
  • app.saveHaSettings (cyclomatic 27) REDACTED:40681 — app.saveHaSettings has cyclomatic complexity 27 (threshold 15). Of this number, 25 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 · vocab.vocabSameLemmaWord (cyclomatic 27) · ×1
  • vocab.vocabSameLemmaWord (cyclomatic 27) assets/js/core/vocab.js:255 — vocab.vocabSameLemmaWord has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, 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 · screensaver._ssViewNutrition (cyclomatic 27) · ×1
  • screensaver._ssViewNutrition (cyclomatic 27) assets/js/screensaver.js:423 — screensaver._ssViewNutrition has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 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 · index.barcodeHttpParallel (cyclomatic 27) · ×1
  • index.barcodeHttpParallel (cyclomatic 27) REDACTED:4631 — index.barcodeHttpParallel 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 · index.medClassifyAction (cyclomatic 27) · ×1
  • index.medClassifyAction (cyclomatic 27) REDACTED:11409 — index.medClassifyAction 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 · health.healthLogMeal (cyclomatic 27) · ×1
  • health.healthLogMeal (cyclomatic 27) api/lib/health.php:918 — health.healthLogMeal has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.updateScaleReadButtons (cyclomatic 26) · ×1
  • app.updateScaleReadButtons (cyclomatic 26) REDACTED:2154 — app.updateScaleReadButtons has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._kioskVoiceShimClass (cyclomatic 26) · ×1
  • app._kioskVoiceShimClass (cyclomatic 26) REDACTED:11586 — app._kioskVoiceShimClass has cyclomatic complexity 26 (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 · app._captureQtyFor (cyclomatic 26) · ×1
  • app._captureQtyFor (cyclomatic 26) REDACTED:13375 — app._captureQtyFor has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._inventoryExpiryBadgeHtml (cyclomatic 26) · ×1
  • app._inventoryExpiryBadgeHtml (cyclomatic 26) REDACTED:16498 — app._inventoryExpiryBadgeHtml 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 · app._fractionChipOptions (cyclomatic 26) · ×1
  • app._fractionChipOptions (cyclomatic 26) REDACTED:18695 — app._fractionChipOptions has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.onAddUnitChange (cyclomatic 26) · ×1
  • app.onAddUnitChange (cyclomatic 26) REDACTED:28036 — app.onAddUnitChange has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.geminiChat (cyclomatic 26) · ×1
  • index.geminiChat (cyclomatic 26) REDACTED:13110 — index.geminiChat 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 · index.bringDedupeGenerics (cyclomatic 26) · ×1
  • index.bringDedupeGenerics (cyclomatic 26) REDACTED:19157 — index.bringDedupeGenerics 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 · env.loadEnvOverrides (cyclomatic 26) · ×1
  • env.loadEnvOverrides (cyclomatic 26) api/lib/env.php:206 — env.loadEnvOverrides 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 · health.healthSaveProfile (cyclomatic 26) · ×1
  • health.healthSaveProfile (cyclomatic 26) api/lib/health.php:123 — health.healthSaveProfile has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · medical.medicalDetectCode (cyclomatic 26) · ×1
  • medical.medicalDetectCode (cyclomatic 26) api/lib/medical.php:521 — medical.medicalDetectCode 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 · handleTool (cyclomatic 26) · ×1
  • handleTool (cyclomatic 26) mcp-server/src/create-server.js:128 — handleTool has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · app.updateScanQuickRail (cyclomatic 25) · ×1
  • app.updateScanQuickRail (cyclomatic 25) REDACTED:5122 — app.updateScanQuickRail has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._tryGeminiVisualBarcode (cyclomatic 25) · ×1
  • app._tryGeminiVisualBarcode (cyclomatic 25) REDACTED:5866 — app._tryGeminiVisualBarcode has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._renderSpendSection (cyclomatic 25) · ×1
  • app._renderSpendSection (cyclomatic 25) REDACTED:10549 — app._renderSpendSection has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, 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 · app._captureSubmit (cyclomatic 25) · ×1
  • app._captureSubmit (cyclomatic 25) REDACTED:13447 — app._captureSubmit has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · app.formatQuantityParts (cyclomatic 25) · ×1
  • app.formatQuantityParts (cyclomatic 25) REDACTED:16322 — app.formatQuantityParts has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._inventorySearchScore (cyclomatic 25) · ×1
  • app._inventorySearchScore (cyclomatic 25) REDACTED:17401 — app._inventorySearchScore 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 · app._renderMedDataset (cyclomatic 25) · ×1
  • app._renderMedDataset (cyclomatic 25) REDACTED:24261 — app._renderMedDataset 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 · app._apiErrorText (cyclomatic 25) · ×1
  • app._apiErrorText (cyclomatic 25) REDACTED:28402 — app._apiErrorText 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 · app.analyzeWithAI (cyclomatic 25) · ×1
  • app.analyzeWithAI (cyclomatic 25) REDACTED:30843 — app.analyzeWithAI has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._initShopRowSwipe (cyclomatic 25) · ×1
  • app._initShopRowSwipe (cyclomatic 25) REDACTED:34590 — app._initShopRowSwipe has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (onEnd, onMove, onStart, …). 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 · SetupActivity.showStep (cyclomatic 25) · ×1
  • SetupActivity.showStep (cyclomatic 25) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:595 — SetupActivity.showStep has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.tesseractReadExpiry (cyclomatic 25) · ×1
  • index.tesseractReadExpiry (cyclomatic 25) REDACTED:12823 — index.tesseractReadExpiry has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.computeShoppingNameBase (cyclomatic 25) · ×1
  • index.computeShoppingNameBase (cyclomatic 25) REDACTED:16660 — index.computeShoppingNameBase has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.internalShoppingDedupeGenerics (cyclomatic 25) · ×1
  • index.internalShoppingDedupeGenerics (cyclomatic 25) REDACTED:22523 — index.internalShoppingDedupeGenerics has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._checkWebappUpdate (cyclomatic 24) · ×1
  • app._checkWebappUpdate (cyclomatic 24) REDACTED:743 — app._checkWebappUpdate has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 754, 753, 781, …). 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 · app._findBestAiCatalogMatch (cyclomatic 24) · ×1
  • app._findBestAiCatalogMatch (cyclomatic 24) REDACTED:5631 — app._findBestAiCatalogMatch has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._setScanStatus (cyclomatic 24) · ×1
  • app._setScanStatus (cyclomatic 24) REDACTED:22119 — app._setScanStatus 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 · app._saveExternalBarcodeProduct (cyclomatic 24) · ×1
  • app._saveExternalBarcodeProduct (cyclomatic 24) REDACTED:25046 — app._saveExternalBarcodeProduct has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app.confirmMoveAfterUse (cyclomatic 24) · ×1
  • app.confirmMoveAfterUse (cyclomatic 24) REDACTED:30293 — app.confirmMoveAfterUse has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.saveRecipeToArchive (cyclomatic 24) · ×1
  • app.saveRecipeToArchive (cyclomatic 24) REDACTED:36170 — app.saveRecipeToArchive has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._extractTimerLabel (cyclomatic 24) · ×1
  • app._extractTimerLabel (cyclomatic 24) REDACTED:41819 — app._extractTimerLabel has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._renderMealPlanHint (cyclomatic 24) · ×1
  • app._renderMealPlanHint (cyclomatic 24) REDACTED:42254 — app._renderMealPlanHint has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.templatesApply (cyclomatic 24) · ×1
  • index.templatesApply (cyclomatic 24) REDACTED:22853 — index.templatesApply 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 · health.healthNormalizeDailyPayload (cyclomatic 24) · ×1
  • health.healthNormalizeDailyPayload (cyclomatic 24) api/lib/health.php:166 — health.healthNormalizeDailyPayload has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · product_kind.productKindIsPlausibleGenre (cyclomatic 24) · ×1
  • product_kind.productKindIsPlausibleGenre (cyclomatic 24) api/lib/product_kind.php:803 — product_kind.productKindIsPlausibleGenre has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._scaleUpdateStatus (cyclomatic 23) · ×1
  • app._scaleUpdateStatus (cyclomatic 23) REDACTED:1834 — app._scaleUpdateStatus has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._shopRowIsMedical (cyclomatic 23) · ×1
  • app._shopRowIsMedical (cyclomatic 23) REDACTED:3810 — app._shopRowIsMedical has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (flag, a function literal at line 3821, a function literal at line 3819). 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 · app._shelfyOpenAdd (cyclomatic 23) · ×1
  • app._shelfyOpenAdd (cyclomatic 23) REDACTED:12618 — app._shelfyOpenAdd has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._captureScoreName (cyclomatic 23) · ×1
  • app._captureScoreName (cyclomatic 23) REDACTED:13233 — app._captureScoreName 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 · app._applyLocalBarcodeProductFixes (cyclomatic 23) · ×1
  • app._applyLocalBarcodeProductFixes (cyclomatic 23) REDACTED:24897 — app._applyLocalBarcodeProductFixes 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 · app._showUseAllSlideConfirm (cyclomatic 23) · ×1
  • app._showUseAllSlideConfirm (cyclomatic 23) REDACTED:30421 — app._showUseAllSlideConfirm 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 8 function items inside it that branch (onPointerDown, onPointerMove, setEnabled, …). 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 · app.submitUse (cyclomatic 23) · ×1
  • app.submitUse (cyclomatic 23) REDACTED:30689 — app.submitUse has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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 · app._buildPricePayload (cyclomatic 23) · ×1
  • app._buildPricePayload (cyclomatic 23) REDACTED:32257 — app._buildPricePayload has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 32259). 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 · audit._auditStateBlob (cyclomatic 23) · ×1
  • audit._auditStateBlob (cyclomatic 23) assets/js/audit.js:328 — audit._auditStateBlob has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · database.recipesBackfillAndDedupByHash (cyclomatic 23) · ×1
  • database.recipesBackfillAndDedupByHash (cyclomatic 23) api/database.php:1720 — database.recipesBackfillAndDedupByHash 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 · index.inventoryImportValidateRow (cyclomatic 23) · ×1
  • index.inventoryImportValidateRow (cyclomatic 23) REDACTED:2407 — index.inventoryImportValidateRow has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.clientLog (cyclomatic 23) · ×1
  • index.clientLog (cyclomatic 23) REDACTED:4407 — index.clientLog has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.saveProduct (cyclomatic 23) · ×1
  • index.saveProduct (cyclomatic 23) REDACTED:5227 — index.saveProduct 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 · index.applyAutoProductRules (cyclomatic 23) · ×1
  • index.applyAutoProductRules (cyclomatic 23) REDACTED:5801 — index.applyAutoProductRules 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 · index.collectDuplicateProductIds (cyclomatic 23) · ×1
  • index.collectDuplicateProductIds (cyclomatic 23) REDACTED:8252 — index.collectDuplicateProductIds 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 · index.bringAddDepletedProduct (cyclomatic 23) · ×1
  • index.bringAddDepletedProduct (cyclomatic 23) REDACTED:19774 — index.bringAddDepletedProduct 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 · health.healthFuelPromptBlock (cyclomatic 23) · ×1
  • health.healthFuelPromptBlock (cyclomatic 23) api/lib/health.php:618 — health.healthFuelPromptBlock 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 · notify.evershelfNotifyFormatEvent (cyclomatic 23) · ×1
  • notify.evershelfNotifyFormatEvent (cyclomatic 23) api/lib/notify.php:122 — notify.evershelfNotifyFormatEvent 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 · qr.evershelfQrPenalty (cyclomatic 23) · ×1
  • qr.evershelfQrPenalty (cyclomatic 23) api/lib/qr.php:470 — qr.evershelfQrPenalty 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 · _ssLoad (cyclomatic 23) · ×1
  • _ssLoad (cyclomatic 23) assets/js/screensaver.js:77 — _ssLoad has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._scaleAutoFillAdd (cyclomatic 22) · ×1
  • app._scaleAutoFillAdd (cyclomatic 22) REDACTED:1283 — app._scaleAutoFillAdd has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._submitCustomLocationRename (cyclomatic 22) · ×1
  • app._submitCustomLocationRename (cyclomatic 22) REDACTED:3523 — app._submitCustomLocationRename has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._showAiMatchChoices (cyclomatic 22) · ×1
  • app._showAiMatchChoices (cyclomatic 22) REDACTED:5441 — app._showAiMatchChoices has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._renderMonthlyStatsSection (cyclomatic 22) · ×1
  • app._renderMonthlyStatsSection (cyclomatic 22) REDACTED:10427 — app._renderMonthlyStatsSection has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.itemDetailToggleVacuum (cyclomatic 22) · ×1
  • app.itemDetailToggleVacuum (cyclomatic 22) REDACTED:18051 — app.itemDetailToggleVacuum has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._medShowAsk (cyclomatic 22) · ×1
  • app._medShowAsk (cyclomatic 22) REDACTED:23539 — app._medShowAsk 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 · app._medFillFromCatalogue (cyclomatic 22) · ×1
  • app._medFillFromCatalogue (cyclomatic 22) REDACTED:24016 — app._medFillFromCatalogue has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, 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 · app.showUseForm (cyclomatic 22) · ×1
  • app.showUseForm (cyclomatic 22) REDACTED:28687 — app.showUseForm 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 · app.confirmRecipeMove (cyclomatic 22) · ×1
  • app.confirmRecipeMove (cyclomatic 22) REDACTED:38347 — app.confirmRecipeMove has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.spesaModeAfterAdd (cyclomatic 22) · ×1
  • app.spesaModeAfterAdd (cyclomatic 22) REDACTED:44709 — app.spesaModeAfterAdd has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · audit._auditOtherPacksHtml (cyclomatic 22) · ×1
  • audit._auditOtherPacksHtml (cyclomatic 22) assets/js/audit.js:1277 — audit._auditOtherPacksHtml has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1283). 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 · KioskActivity.installWithPackageInstaller (cyclomatic 22) · ×1
  • KioskActivity.installWithPackageInstaller (cyclomatic 22) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1569 — KioskActivity.installWithPackageInstaller 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 · index.undoTransaction (cyclomatic 22) · ×1
  • index.undoTransaction (cyclomatic 22) REDACTED:8951 — index.undoTransaction has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.medDebugAction (cyclomatic 22) · ×1
  • index.medDebugAction (cyclomatic 22) REDACTED:10881 — index.medDebugAction 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 · product_kind.productKindWordsSimilar (cyclomatic 22) · ×1
  • product_kind.productKindWordsSimilar (cyclomatic 22) api/lib/product_kind.php:1037 — product_kind.productKindWordsSimilar has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sale_units.saleUnitSnap (cyclomatic 22) · ×1
  • sale_units.saleUnitSnap (cyclomatic 22) api/lib/sale_units.php:102 — sale_units.saleUnitSnap 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 · app._scaleHandleChoiceScreenRise (cyclomatic 21) · ×1
  • app._scaleHandleChoiceScreenRise (cyclomatic 21) REDACTED:1219 — app._scaleHandleChoiceScreenRise has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._updateRecipeUseScaleCompare (cyclomatic 21) · ×1
  • app._updateRecipeUseScaleCompare (cyclomatic 21) REDACTED:1530 — app._updateRecipeUseScaleCompare 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 · app._renderImportPreview (cyclomatic 21) · ×1
  • app._renderImportPreview (cyclomatic 21) REDACTED:2708 — app._renderImportPreview has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, 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 · app._openCaptureSheetInner (cyclomatic 21) · ×1
  • app._openCaptureSheetInner (cyclomatic 21) REDACTED:11318 — app._openCaptureSheetInner has cyclomatic complexity 21 (threshold 15). Of this number, 13 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 · app.saveEditedProductInfo (cyclomatic 21) · ×1
  • app.saveEditedProductInfo (cyclomatic 21) REDACTED:27196 — app.saveEditedProductInfo 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 · app._recipeArchiveMissingInfo (cyclomatic 21) · ×1
  • app._recipeArchiveMissingInfo (cyclomatic 21) REDACTED:36608 — app._recipeArchiveMissingInfo has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 36613, 36635). 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 · app.saveNotifySettings (cyclomatic 21) · ×1
  • app.saveNotifySettings (cyclomatic 21) REDACTED:41085 — app.saveNotifySettings 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 · app._setupSteps (cyclomatic 21) · ×1
  • app._setupSteps (cyclomatic 21) REDACTED:45460 — app._setupSteps has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 45507, 45625, 45575, …). 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 · audit._auditSearchMatches (cyclomatic 21) · ×1
  • audit._auditSearchMatches (cyclomatic 21) assets/js/audit.js:754 — audit._auditSearchMatches 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 · screensaver._ssViewMeal (cyclomatic 21) · ×1
  • screensaver._ssViewMeal (cyclomatic 21) assets/js/screensaver.js:273 — screensaver._ssViewMeal has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.haGenerateRecipe (cyclomatic 21) · ×1
  • index.haGenerateRecipe (cyclomatic 21) REDACTED:3776 — index.haGenerateRecipe has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.recipeEnrichIngredientsFromPantry (cyclomatic 21) · ×1
  • index.recipeEnrichIngredientsFromPantry (cyclomatic 21) REDACTED:14574 — index.recipeEnrichIngredientsFromPantry 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 · index.bringSyncSpecs (cyclomatic 21) · ×1
  • index.bringSyncSpecs (cyclomatic 21) REDACTED:19243 — index.bringSyncSpecs 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 · index.getShoppingPrice (cyclomatic 21) · ×1
  • index.getShoppingPrice (cyclomatic 21) REDACTED:25147 — index.getShoppingPrice 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 · medicines.medicinesProviderParseRow (cyclomatic 21) · ×1
  • medicines.medicinesProviderParseRow (cyclomatic 21) api/lib/medicines.php:1162 — medicines.medicinesProviderParseRow 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 · app.removeLocation (cyclomatic 20) · ×1
  • app.removeLocation (cyclomatic 20) REDACTED:3654 — app.removeLocation has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._confirmAiDetectedProduct (cyclomatic 20) · ×1
  • app._confirmAiDetectedProduct (cyclomatic 20) REDACTED:5748 — app._confirmAiDetectedProduct 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 · app._bannerPriority (cyclomatic 20) · ×1
  • app._bannerPriority (cyclomatic 20) REDACTED:14598 — app._bannerPriority 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 · app._itemDetailOtherPlacesHtml (cyclomatic 20) · ×1
  • app._itemDetailOtherPlacesHtml (cyclomatic 20) REDACTED:17723 — app._itemDetailOtherPlacesHtml has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 17737, 17730, 17733, …). 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 · app._finishStockWithUndo (cyclomatic 20) · ×1
  • app._finishStockWithUndo (cyclomatic 20) REDACTED:18126 — app._finishStockWithUndo has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._itemDetailConsume (cyclomatic 20) · ×1
  • app._itemDetailConsume (cyclomatic 20) REDACTED:18934 — app._itemDetailConsume has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._medImportCatalogFile (cyclomatic 20) · ×1
  • app._medImportCatalogFile (cyclomatic 20) REDACTED:19062 — app._medImportCatalogFile has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._medDebugPanel (cyclomatic 20) · ×1
  • app._medDebugPanel (cyclomatic 20) REDACTED:23885 — app._medDebugPanel has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23887, 23905, 23890). 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 · app._medExpiryFillPickers (cyclomatic 20) · ×1
  • app._medExpiryFillPickers (cyclomatic 20) REDACTED:25675 — app._medExpiryFillPickers has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.editProductFromAction (cyclomatic 20) · ×1
  • app.editProductFromAction (cyclomatic 20) REDACTED:26937 — app.editProductFromAction has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._ensureAddProductRow (cyclomatic 20) · ×1
  • app._ensureAddProductRow (cyclomatic 20) REDACTED:28354 — app._ensureAddProductRow has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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 · app._normalizeRecipeIngQtyNumber (cyclomatic 20) · ×1
  • app._normalizeRecipeIngQtyNumber (cyclomatic 20) REDACTED:37401 — app._normalizeRecipeIngQtyNumber has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · audit._auditAnswer (cyclomatic 20) · ×1
  • audit._auditAnswer (cyclomatic 20) assets/js/audit.js:2227 — audit._auditAnswer has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · audit._auditFinish (cyclomatic 20) · ×1
  • audit._auditFinish (cyclomatic 20) assets/js/audit.js:2490 — audit._auditFinish 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 · med._medGs1Parse (cyclomatic 20) · ×1
  • med._medGs1Parse (cyclomatic 20) REDACTED:64 — med._medGs1Parse 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 · med._medCodeMatches (cyclomatic 20) · ×1
  • med._medCodeMatches (cyclomatic 20) REDACTED:532 — med._medCodeMatches 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 · index.findDuplicateProductId (cyclomatic 20) · ×1
  • index.findDuplicateProductId (cyclomatic 20) REDACTED:8057 — index.findDuplicateProductId 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 · index.bringAddItems (cyclomatic 20) · ×1
  • index.bringAddItems (cyclomatic 20) REDACTED:19942 — index.bringAddItems 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 · index._computeAllShoppingPrices (cyclomatic 20) · ×1
  • index._computeAllShoppingPrices (cyclomatic 20) REDACTED:24888 — index._computeAllShoppingPrices 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 · ai_provider.aiOpenAiChatCompletions (cyclomatic 20) · ×1
  • ai_provider.aiOpenAiChatCompletions (cyclomatic 20) api/lib/ai_provider.php:169 — ai_provider.aiOpenAiChatCompletions 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 · health.healthEstimateProductMacros (cyclomatic 20) · ×1
  • health.healthEstimateProductMacros (cyclomatic 20) api/lib/health.php:1045 — health.healthEstimateProductMacros 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 · mealie.mealiePickRecipe (cyclomatic 20) · ×1
  • mealie.mealiePickRecipe (cyclomatic 20) api/lib/mealie.php:614 — mealie.mealiePickRecipe 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 · medicines._medicinesImportXml (cyclomatic 20) · ×1
  • medicines._medicinesImportXml (cyclomatic 20) api/lib/medicines.php:1049 — medicines._medicinesImportXml 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 · vocabulary.vocabSameLemmaWord (cyclomatic 20) · ×1
  • vocabulary.vocabSameLemmaWord (cyclomatic 20) api/lib/vocabulary.php:407 — vocabulary.vocabSameLemmaWord has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._tickScanCloud (cyclomatic 19) · ×1
  • app._tickScanCloud (cyclomatic 19) REDACTED:4979 — app._tickScanCloud 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 · app._tryGeminiNumberOCR (cyclomatic 19) · ×1
  • app._tryGeminiNumberOCR (cyclomatic 19) REDACTED:5277 — app._tryGeminiNumberOCR has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._openAiSavedProduct (cyclomatic 19) · ×1
  • app._openAiSavedProduct (cyclomatic 19) REDACTED:5682 — app._openAiSavedProduct has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · app._loadBackupTab (cyclomatic 19) · ×1
  • app._loadBackupTab (cyclomatic 19) REDACTED:6234 — app._loadBackupTab 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 · app._paintKioskVersion (cyclomatic 19) · ×1
  • app._paintKioskVersion (cyclomatic 19) REDACTED:7800 — app._paintKioskVersion has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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 · app.saveCalendarSettings (cyclomatic 19) · ×1
  • app.saveCalendarSettings (cyclomatic 19) REDACTED:8661 — app.saveCalendarSettings has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._essRenderBackup (cyclomatic 19) · ×1
  • app._essRenderBackup (cyclomatic 19) REDACTED:9177 — app._essRenderBackup 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 · app._aiCostFmtMoney (cyclomatic 19) · ×1
  • app._aiCostFmtMoney (cyclomatic 19) REDACTED:9602 — app._aiCostFmtMoney has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.loadDashboard (cyclomatic 19) · ×1
  • app.loadDashboard (cyclomatic 19) REDACTED:13676 — app.loadDashboard has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (app.loadDashboard::openedRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · app.loadSeasonalReview (cyclomatic 19) · ×1
  • app.loadSeasonalReview (cyclomatic 19) REDACTED:14078 — app.loadSeasonalReview has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.freezeInventoryItem (cyclomatic 19) · ×1
  • app.freezeInventoryItem (cyclomatic 19) REDACTED:15295 — app.freezeInventoryItem has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._scaleApplyToItemDetail (cyclomatic 19) · ×1
  • app._scaleApplyToItemDetail (cyclomatic 19) REDACTED:18568 — app._scaleApplyToItemDetail has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._renderMedClassify (cyclomatic 19) · ×1
  • app._renderMedClassify (cyclomatic 19) REDACTED:19796 — app._renderMedClassify has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app.deleteInventoryItem (cyclomatic 19) · ×1
  • app.deleteInventoryItem (cyclomatic 19) REDACTED:20919 — app.deleteInventoryItem has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._currentProductFromExternal (cyclomatic 19) · ×1
  • app._currentProductFromExternal (cyclomatic 19) REDACTED:24949 — app._currentProductFromExternal 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 · app._maybeStartUseFormIdleCountdown (cyclomatic 19) · ×1
  • app._maybeStartUseFormIdleCountdown (cyclomatic 19) REDACTED:29875 — app._maybeStartUseFormIdleCountdown has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._showMovePrompt (cyclomatic 19) · ×1
  • app._showMovePrompt (cyclomatic 19) REDACTED:30112 — app._showMovePrompt has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, 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 · app.loadSmartShopping (cyclomatic 19) · ×1
  • app.loadSmartShopping (cyclomatic 19) REDACTED:33088 — app.loadSmartShopping has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._updateRecipeStockHintsAfterScale (cyclomatic 19) · ×1
  • app._updateRecipeStockHintsAfterScale (cyclomatic 19) REDACTED:37721 — app._updateRecipeStockHintsAfterScale has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 37723). 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 · app.startCookingMode (cyclomatic 19) · ×1
  • app.startCookingMode (cyclomatic 19) REDACTED:39863 — app.startCookingMode has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._initBrowserTtsVoices (cyclomatic 19) · ×1
  • app._initBrowserTtsVoices (cyclomatic 19) REDACTED:41298 — app._initBrowserTtsVoices has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (populate, a function literal at line 41349, a function literal at line 41320, …). 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 · app._showFamilySiblingSuggest (cyclomatic 19) · ×1
  • app._showFamilySiblingSuggest (cyclomatic 19) REDACTED:44891 — app._showFamilySiblingSuggest has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 44896, 44940, 44943). 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 · app._getMissingSetupSteps (cyclomatic 19) · ×1
  • app._getMissingSetupSteps (cyclomatic 19) REDACTED:45411 — app._getMissingSetupSteps 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 · audit._auditMedOpen (cyclomatic 19) · ×1
  • audit._auditMedOpen (cyclomatic 19) assets/js/audit.js:2182 — audit._auditMedOpen 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 · med._medPackSize (cyclomatic 19) · ×1
  • med._medPackSize (cyclomatic 19) REDACTED:395 — med._medPackSize 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 · screensaver._ssAlertRows (cyclomatic 19) · ×1
  • screensaver._ssAlertRows (cyclomatic 19) assets/js/screensaver.js:344 — screensaver._ssAlertRows has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 357, push, a function literal at line 373, …). 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 · sw.self.addEventListener("notificationclick") (cyclomatic 19) · ×1
  • sw.self.addEventListener("notificationclick") (cyclomatic 19) sw.js:235 — sw.self.addEventListener("notificationclick") has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 272, 246, 244). 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 · MetricChartView.onDraw (cyclomatic 19) · ×1
  • MetricChartView.onDraw (cyclomatic 19) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/MetricChartView.kt:62 — MetricChartView.onDraw 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 · index.checkRateLimit (cyclomatic 19) · ×1
  • index.checkRateLimit (cyclomatic 19) REDACTED:139 — index.checkRateLimit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.getMacroStats (cyclomatic 19) · ×1
  • index.getMacroStats (cyclomatic 19) REDACTED:9837 — index.getMacroStats has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index._locationDeletePersist (cyclomatic 19) · ×1
  • index._locationDeletePersist (cyclomatic 19) REDACTED:12310 — index._locationDeletePersist has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.shoppingUpdateRemainingNeedOnList (cyclomatic 19) · ×1
  • index.shoppingUpdateRemainingNeedOnList (cyclomatic 19) REDACTED:18237 — index.shoppingUpdateRemainingNeedOnList has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.shoppingAddItemsCore (cyclomatic 19) · ×1
  • index.shoppingAddItemsCore (cyclomatic 19) REDACTED:22732 — index.shoppingAddItemsCore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mealie_setup.mealieInstall (cyclomatic 19) · ×1
  • mealie_setup.mealieInstall (cyclomatic 19) api/lib/mealie_setup.php:348 — mealie_setup.mealieInstall has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · qr.evershelfQrCodewords (cyclomatic 19) · ×1
  • qr.evershelfQrCodewords (cyclomatic 19) api/lib/qr.php:122 — qr.evershelfQrCodewords has cyclomatic complexity 19 (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 · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) sw.js:235 — (anonymous) has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 272, 246, 244). 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 · app._scaleDensityForProduct (cyclomatic 18) · ×1
  • app._scaleDensityForProduct (cyclomatic 18) REDACTED:1330 — app._scaleDensityForProduct 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 · app._scoutBarcodeRegion (cyclomatic 18) · ×1
  • app._scoutBarcodeRegion (cyclomatic 18) REDACTED:4807 — app._scoutBarcodeRegion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · app._openFreeApisDialog (cyclomatic 18) · ×1
  • app._openFreeApisDialog (cyclomatic 18) REDACTED:7054 — app._openFreeApisDialog has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 7061). 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 · app.formatQuantity (cyclomatic 18) · ×1
  • app.formatQuantity (cyclomatic 18) REDACTED:16190 — app.formatQuantity 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 · app._itemDetailMedSummaryHtml (cyclomatic 18) · ×1
  • app._itemDetailMedSummaryHtml (cyclomatic 18) REDACTED:18368 — app._itemDetailMedSummaryHtml has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.throwWasteForProduct (cyclomatic 18) · ×1
  • app.throwWasteForProduct (cyclomatic 18) REDACTED:20712 — app.throwWasteForProduct has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._medStockAddDirect (cyclomatic 18) · ×1
  • app._medStockAddDirect (cyclomatic 18) REDACTED:26353 — app._medStockAddDirect 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 · app._renderUseExpiryHint (cyclomatic 18) · ×1
  • app._renderUseExpiryHint (cyclomatic 18) REDACTED:28851 — app._renderUseExpiryHint has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._syncTagsFromBringSpec (cyclomatic 18) · ×1
  • app._syncTagsFromBringSpec (cyclomatic 18) REDACTED:33615 — app._syncTagsFromBringSpec 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 · app._shopRowBought (cyclomatic 18) · ×1
  • app._shopRowBought (cyclomatic 18) REDACTED:34229 — app._shopRowBought 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 · app._recipeMissingPopover (cyclomatic 18) · ×1
  • app._recipeMissingPopover (cyclomatic 18) REDACTED:36672 — app._recipeMissingPopover has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · app._cookingHighlightText (cyclomatic 18) · ×1
  • app._cookingHighlightText (cyclomatic 18) REDACTED:40150 — app._cookingHighlightText has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 40171, a function literal at line 40161, collect, …). 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 · app._renderCookingStepIngredients (cyclomatic 18) · ×1
  • app._renderCookingStepIngredients (cyclomatic 18) REDACTED:40226 — app._renderCookingStepIngredients has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 40243, 40231). 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 · app._applyHaSettingsUI (cyclomatic 18) · ×1
  • app._applyHaSettingsUI (cyclomatic 18) REDACTED:40506 — app._applyHaSettingsUI 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 · app.applyHaTtsPreset (cyclomatic 18) · ×1
  • app.applyHaTtsPreset (cyclomatic 18) REDACTED:40632 — app.applyHaTtsPreset 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 · app._applyNotifySettingsUI (cyclomatic 18) · ×1
  • app._applyNotifySettingsUI (cyclomatic 18) REDACTED:40800 — app._applyNotifySettingsUI has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, 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 · app._updateMealieSetupStatus (cyclomatic 18) · ×1
  • app._updateMealieSetupStatus (cyclomatic 18) REDACTED:42430 — app._updateMealieSetupStatus 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 · app._spesaSessionFieldChange (cyclomatic 18) · ×1
  • app._spesaSessionFieldChange (cyclomatic 18) REDACTED:44621 — app._spesaSessionFieldChange 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 · app._spesaRemovePurchasedFromList (cyclomatic 18) · ×1
  • app._spesaRemovePurchasedFromList (cyclomatic 18) REDACTED:44767 — app._spesaRemovePurchasedFromList has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · app._spesaBannerStat (cyclomatic 18) · ×1
  • app._spesaBannerStat (cyclomatic 18) REDACTED:44951 — app._spesaBannerStat has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · app._setupTestNotify (cyclomatic 18) · ×1
  • app._setupTestNotify (cyclomatic 18) REDACTED:45747 — app._setupTestNotify has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · audit._auditAdoptRunCounts (cyclomatic 18) · ×1
  • audit._auditAdoptRunCounts (cyclomatic 18) assets/js/audit.js:702 — audit._auditAdoptRunCounts 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 · audit._auditHitFactsHtml (cyclomatic 18) · ×1
  • audit._auditHitFactsHtml (cyclomatic 18) assets/js/audit.js:802 — audit._auditHitFactsHtml 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 · audit._auditFlush (cyclomatic 18) · ×1
  • audit._auditFlush (cyclomatic 18) assets/js/audit.js:2443 — audit._auditFlush has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (send). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · med._medOcrFindAic (cyclomatic 18) · ×1
  • med._medOcrFindAic (cyclomatic 18) REDACTED:273 — med._medOcrFindAic 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 · vocab.vocabTermMatchScore (cyclomatic 18) · ×1
  • vocab.vocabTermMatchScore (cyclomatic 18) assets/js/core/vocab.js:70 — vocab.vocabTermMatchScore 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 · index.inventoryImportParseCsv (cyclomatic 18) · ×1
  • index.inventoryImportParseCsv (cyclomatic 18) REDACTED:1957 — index.inventoryImportParseCsv has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.getServerSettings (cyclomatic 18) · ×1
  • index.getServerSettings (cyclomatic 18) REDACTED:10295 — index.getServerSettings has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipeNormalizeParsedRecipe (cyclomatic 18) · ×1
  • index.recipeNormalizeParsedRecipe (cyclomatic 18) REDACTED:14093 — index.recipeNormalizeParsedRecipe has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipeFromIngredient (cyclomatic 18) · ×1
  • index.recipeFromIngredient (cyclomatic 18) REDACTED:15352 — index.recipeFromIngredient has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mealie.mealieRecipePantryCoverage (cyclomatic 18) · ×1
  • mealie.mealieRecipePantryCoverage (cyclomatic 18) api/lib/mealie.php:510 — mealie.mealieRecipePantryCoverage 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 · notify.evershelfNotifySend (cyclomatic 18) · ×1
  • notify.evershelfNotifySend (cyclomatic 18) api/lib/notify.php:465 — notify.evershelfNotifySend 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 · product_kind.productKindFromDictionary (cyclomatic 18) · ×1
  • product_kind.productKindFromDictionary (cyclomatic 18) api/lib/product_kind.php:431 — product_kind.productKindFromDictionary 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 · product_kind.productKindApply (cyclomatic 18) · ×1
  • product_kind.productKindApply (cyclomatic 18) api/lib/product_kind.php:1357 — product_kind.productKindApply 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 · push_actions.evershelfPushInboxEntries (cyclomatic 18) · ×1
  • push_actions.evershelfPushInboxEntries (cyclomatic 18) api/lib/push_actions.php:124 — push_actions.evershelfPushInboxEntries 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 · seasonal.staleInventoryItems (cyclomatic 18) · ×1
  • seasonal.staleInventoryItems (cyclomatic 18) api/lib/seasonal.php:711 — seasonal.staleInventoryItems 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 · shopping_guards.shoppingQtyToConfPacks (cyclomatic 18) · ×1
  • shopping_guards.shoppingQtyToConfPacks (cyclomatic 18) api/lib/shopping_guards.php:188 — shopping_guards.shoppingQtyToConfPacks 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 · app._onImportFileSelected (cyclomatic 17) · ×1
  • app._onImportFileSelected (cyclomatic 17) REDACTED:2661 — app._onImportFileSelected has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._confirmImportInventory (cyclomatic 17) · ×1
  • app._confirmImportInventory (cyclomatic 17) REDACTED:2776 — app._confirmImportInventory has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._renderBackupTab (cyclomatic 17) · ×1
  • app._renderBackupTab (cyclomatic 17) REDACTED:6272 — app._renderBackupTab has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._dataSourcesHtml (cyclomatic 17) · ×1
  • app._dataSourcesHtml (cyclomatic 17) REDACTED:6946 — app._dataSourcesHtml 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 one function literal inside it that branches (line 6947). 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 · app._kioskUpdateResult (cyclomatic 17) · ×1
  • app._kioskUpdateResult (cyclomatic 17) REDACTED:7633 — app._kioskUpdateResult has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._essRenderToken (cyclomatic 17) · ×1
  • app._essRenderToken (cyclomatic 17) REDACTED:9095 — app._essRenderToken has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._medCabinetContextPayload (cyclomatic 17) · ×1
  • app._medCabinetContextPayload (cyclomatic 17) REDACTED:17101 — app._medCabinetContextPayload has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 17104, 17103). 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 · app._submitWasteRecord (cyclomatic 17) · ×1
  • app._submitWasteRecord (cyclomatic 17) REDACTED:20850 — app._submitWasteRecord has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.checkInventoryForProduct (cyclomatic 17) · ×1
  • app.checkInventoryForProduct (cyclomatic 17) REDACTED:26912 — app.checkInventoryForProduct has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app.recalculateAddExpiry (cyclomatic 17) · ×1
  • app.recalculateAddExpiry (cyclomatic 17) REDACTED:27844 — app.recalculateAddExpiry has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.selectPurchaseType (cyclomatic 17) · ×1
  • app.selectPurchaseType (cyclomatic 17) REDACTED:28145 — app.selectPurchaseType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.adjustUseQty (cyclomatic 17) · ×1
  • app.adjustUseQty (cyclomatic 17) REDACTED:29186 — app.adjustUseQty has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app._shopQtyPopover (cyclomatic 17) · ×1
  • app._shopQtyPopover (cyclomatic 17) REDACTED:34306 — app._shopQtyPopover has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app._recipeUseHeadHtml (cyclomatic 17) · ×1
  • app._recipeUseHeadHtml (cyclomatic 17) REDACTED:37960 — app._recipeUseHeadHtml has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._cookingVoiceHint (cyclomatic 17) · ×1
  • app._cookingVoiceHint (cyclomatic 17) REDACTED:39755 — app._cookingVoiceHint 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, 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 · app.testNotify (cyclomatic 17) · ×1
  • app.testNotify (cyclomatic 17) REDACTED:41144 — app.testNotify has cyclomatic complexity 17 (threshold 15). 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, 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 · app._chatMatchProductsInText (cyclomatic 17) · ×1
  • app._chatMatchProductsInText (cyclomatic 17) REDACTED:43183 — app._chatMatchProductsInText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · audit._auditScanStart (cyclomatic 17) · ×1
  • audit._auditScanStart (cyclomatic 17) assets/js/audit.js:1133 — audit._auditScanStart has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · med._medChoiceCandidates (cyclomatic 17) · ×1
  • med._medChoiceCandidates (cyclomatic 17) REDACTED:212 — med._medChoiceCandidates has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.evershelfExpiryNeedsAttention (cyclomatic 17) · ×1
  • index.evershelfExpiryNeedsAttention (cyclomatic 17) REDACTED:2971 — index.evershelfExpiryNeedsAttention has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.callGemini (cyclomatic 17) · ×1
  • index.callGemini (cyclomatic 17) REDACTED:12448 — index.callGemini has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.getOpenedShelfLifeDays (cyclomatic 17) · ×1
  • index.getOpenedShelfLifeDays (cyclomatic 17) REDACTED:12712 — index.getOpenedShelfLifeDays has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipeParseGeminiJson (cyclomatic 17) · ×1
  • index.recipeParseGeminiJson (cyclomatic 17) REDACTED:14137 — index.recipeParseGeminiJson has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipeItemExpiryPriority (cyclomatic 17) · ×1
  • index.recipeItemExpiryPriority (cyclomatic 17) REDACTED:14787 — index.recipeItemExpiryPriority 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. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.createLocalBackup (cyclomatic 17) · ×1
  • index.createLocalBackup (cyclomatic 17) REDACTED:16885 — index.createLocalBackup has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.bringGetList (cyclomatic 17) · ×1
  • index.bringGetList (cyclomatic 17) REDACTED:19635 — index.bringGetList has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.smartInferShoppingCycleDays (cyclomatic 17) · ×1
  • index.smartInferShoppingCycleDays (cyclomatic 17) REDACTED:20342 — index.smartInferShoppingCycleDays has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mealie.mealieScoreRecipeForPantry (cyclomatic 17) · ×1
  • mealie.mealieScoreRecipeForPantry (cyclomatic 17) api/lib/mealie.php:447 — mealie.mealieScoreRecipeForPantry has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · product_kind.productKindRewriteNameNumber (cyclomatic 17) · ×1
  • product_kind.productKindRewriteNameNumber (cyclomatic 17) api/lib/product_kind.php:292 — product_kind.productKindRewriteNameNumber has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · product_kind.productKindShoppingGeneric (cyclomatic 17) · ×1
  • product_kind.productKindShoppingGeneric (cyclomatic 17) api/lib/product_kind.php:663 — product_kind.productKindShoppingGeneric has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · weather.weatherFetchCurrent (cyclomatic 17) · ×1
  • weather.weatherFetchCurrent (cyclomatic 17) REDACTED:123 — weather.weatherFetchCurrent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _auditSearchMoveHere (cyclomatic 17) · ×1
  • _auditSearchMoveHere (cyclomatic 17) assets/js/audit.js:960 — _auditSearchMoveHere has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 4 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 · app._medFormIconEmoji (cyclomatic 16) · ×1
  • app._medFormIconEmoji (cyclomatic 16) REDACTED:443 — app._medFormIconEmoji has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._openedPao (cyclomatic 16) · ×1
  • app._openedPao (cyclomatic 16) REDACTED:4113 — app._openedPao has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._freeApiActive (cyclomatic 16) · ×1
  • app._freeApiActive (cyclomatic 16) REDACTED:6812 — app._freeApiActive has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._alertItemMeta (cyclomatic 16) · ×1
  • app._alertItemMeta (cyclomatic 16) REDACTED:13603 — app._alertItemMeta has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.renderDashItem (cyclomatic 16) · ×1
  • app.renderDashItem (cyclomatic 16) REDACTED:15914 — app.renderDashItem has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.loadInventory (cyclomatic 16) · ×1
  • app.loadInventory (cyclomatic 16) REDACTED:16402 — app.loadInventory has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._medRefreshStatus (cyclomatic 16) · ×1
  • app._medRefreshStatus (cyclomatic 16) REDACTED:19100 — app._medRefreshStatus has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.onEditUnitChange (cyclomatic 16) · ×1
  • app.onEditUnitChange (cyclomatic 16) REDACTED:21605 — app.onEditUnitChange has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._finishBarcodeResolved (cyclomatic 16) · ×1
  • app._finishBarcodeResolved (cyclomatic 16) REDACTED:25004 — app._finishBarcodeResolved has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._saveVacuumAndStay (cyclomatic 16) · ×1
  • app._saveVacuumAndStay (cyclomatic 16) REDACTED:30265 — app._saveVacuumAndStay has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.submitUseAll (cyclomatic 16) · ×1
  • app.submitUseAll (cyclomatic 16) REDACTED:30347 — app.submitUseAll has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._lookupCatalogShoppingName (cyclomatic 16) · ×1
  • app._lookupCatalogShoppingName (cyclomatic 16) REDACTED:31902 — app._lookupCatalogShoppingName has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.syncShoppingPriceTotal (cyclomatic 16) · ×1
  • app.syncShoppingPriceTotal (cyclomatic 16) REDACTED:32217 — app.syncShoppingPriceTotal has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._recipeScrubbedItems (cyclomatic 16) · ×1
  • app._recipeScrubbedItems (cyclomatic 16) REDACTED:36560 — app._recipeScrubbedItems has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 36569, 36565). 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. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._recipeResolvePieceQty (cyclomatic 16) · ×1
  • app._recipeResolvePieceQty (cyclomatic 16) REDACTED:37448 — app._recipeResolvePieceQty has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._recipeGetServingCapForIngredient (cyclomatic 16) · ×1
  • app._recipeGetServingCapForIngredient (cyclomatic 16) REDACTED:37465 — app._recipeGetServingCapForIngredient has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app._buildTtsRequest (cyclomatic 16) · ×1
  • app._buildTtsRequest (cyclomatic 16) REDACTED:40372 — app._buildTtsRequest has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.speakCookingStep (cyclomatic 16) · ×1
  • app.speakCookingStep (cyclomatic 16) REDACTED:40445 — app.speakCookingStep has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.readScaleForEdit (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · audit._auditLoadState (cyclomatic 16) · ×1
  • audit._auditLoadState (cyclomatic 16) assets/js/audit.js:385 — audit._auditLoadState has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, 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 · audit._auditScanHit (cyclomatic 16) · ×1
  • audit._auditScanHit (cyclomatic 16) assets/js/audit.js:1359 — audit._auditScanHit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · audit._auditAssignPick (cyclomatic 16) · ×1
  • audit._auditAssignPick (cyclomatic 16) assets/js/audit.js:1649 — audit._auditAssignPick has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · audit._auditReopen (cyclomatic 16) · ×1
  • audit._auditReopen (cyclomatic 16) assets/js/audit.js:2381 — audit._auditReopen has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · audit.document.addEventListener("keydown") (cyclomatic 16) · ×1
  • audit.document.addEventListener("keydown") (cyclomatic 16) assets/js/audit.js:2621 — audit.document.addEventListener("keydown") 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 · vocab.vocabCategoryOfName (cyclomatic 16) · ×1
  • vocab.vocabCategoryOfName (cyclomatic 16) assets/js/core/vocab.js:134 — vocab.vocabCategoryOfName has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · settings_search.document.addEventListener("keydown") (cyclomatic 16) · ×1
  • settings_search.document.addEventListener("keydown") (cyclomatic 16) assets/js/settings_search.js:193 — settings_search.document.addEventListener("keydown") has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SyncEngine.syncNow (cyclomatic 16) · ×1
  • SyncEngine.syncNow (cyclomatic 16) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/SyncEngine.kt:39 — SyncEngine.syncNow 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 · SetupActivity.testConnection (cyclomatic 16) · ×1
  • SetupActivity.testConnection (cyclomatic 16) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:792 — SetupActivity.testConnection 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 · index.recordShelfLifeSample (cyclomatic 16) · ×1
  • index.recordShelfLifeSample (cyclomatic 16) REDACTED:6358 — index.recordShelfLifeSample has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipeResolvePieceQty (cyclomatic 16) · ×1
  • index.recipeResolvePieceQty (cyclomatic 16) REDACTED:13657 — index.recipeResolvePieceQty has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.bringCleanupObsolete (cyclomatic 16) · ×1
  • index.bringCleanupObsolete (cyclomatic 16) REDACTED:19379 — index.bringCleanupObsolete has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.bringAutoAddCritical (cyclomatic 16) · ×1
  • index.bringAutoAddCritical (cyclomatic 16) REDACTED:19448 — index.bringAutoAddCritical has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.internalShoppingAutoAddCritical (cyclomatic 16) · ×1
  • index.internalShoppingAutoAddCritical (cyclomatic 16) REDACTED:19502 — index.internalShoppingAutoAddCritical has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.recipesArchiveUpsert (cyclomatic 16) · ×1
  • index.recipesArchiveUpsert (cyclomatic 16) REDACTED:23521 — index.recipesArchiveUpsert has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: index._formatPrice (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · env.evershelfWriteEnvFile (cyclomatic 16) · ×1
  • env.evershelfWriteEnvFile (cyclomatic 16) api/lib/env.php:319 — env.evershelfWriteEnvFile 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 · mealie.mealieListRecipes (cyclomatic 16) · ×1
  • mealie.mealieListRecipes (cyclomatic 16) api/lib/mealie.php:305 — mealie.mealieListRecipes 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 · medicines._medicinesImportJson (cyclomatic 16) · ×1
  • medicines._medicinesImportJson (cyclomatic 16) api/lib/medicines.php:991 — medicines._medicinesImportJson 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 · seasonal.seasonalMatchProduce (cyclomatic 16) · ×1
  • seasonal.seasonalMatchProduce (cyclomatic 16) api/lib/seasonal.php:273 — seasonal.seasonalMatchProduce 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 · security.evershelfTtsUrlAllowed (cyclomatic 16) · ×1
  • security.evershelfTtsUrlAllowed (cyclomatic 16) api/lib/security.php:610 — security.evershelfTtsUrlAllowed 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 · telegram.telegramWebhookHandle (cyclomatic 16) · ×1
  • telegram.telegramWebhookHandle (cyclomatic 16) api/lib/telegram.php:27 — telegram.telegramWebhookHandle 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 · scale_relay.wsRead (cyclomatic 16) · ×1
  • scale_relay.wsRead (cyclomatic 16) api/scale_relay.php:190 — scale_relay.wsRead 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 · _maybeShowSupportPrompt (cyclomatic 16) · ×1
  • _maybeShowSupportPrompt (cyclomatic 16) assets/js/core/support.js:370 — _maybeShowSupportPrompt 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.
D2 · Cognitive Complexity · index.smartShopping (cognitive 596) · ×1
  • index.smartShopping (cognitive 596) REDACTED:20952 — index.smartShopping has cognitive complexity 596 (threshold 15). Drivers by points: if/else 113 (297 pts), boolean chains 153, ternaries 55 (131 pts), loops 9 (13 pts), error handling 2 (nesting depth added 264). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the 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 · database.migrateDB (cognitive 410) · ×1
  • database.migrateDB (cognitive 410) api/database.php:272 — database.migrateDB has cognitive complexity 410 (threshold 15). Drivers by points: if/else 112 (257 pts), error handling 29 (69 pts), loops 17 (36 pts), boolean chains 33, ternaries 4 (15 pts) (nesting depth added 215). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the 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 · index.generateRecipeStream (cognitive 234) · ×1
  • index.generateRecipeStream (cognitive 234) REDACTED:15467 — index.generateRecipeStream has cognitive complexity 234 (threshold 15). Drivers by points: if/else 64 (138 pts), ternaries 14 (43 pts), boolean chains 28, loops 13 (24 pts), error handling 1 (nesting depth added 114). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.loadSettingsUI (cognitive 229) · ×1
  • app.loadSettingsUI (cognitive 229) REDACTED:7128 — app.loadSettingsUI has cognitive complexity 229 (threshold 15). Drivers by points: if/else 95 (133 pts), boolean chains 94, error handling 1, loops 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 · app._saveSettingsInner (cognitive 173) · ×1
  • app._saveSettingsInner (cognitive 173) REDACTED:8270 — app._saveSettingsInner has cognitive complexity 173 (threshold 15). Drivers by points: if/else 81 (83 pts), boolean chains 70, ternaries 15 (17 pts), error handling 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.useFromInventoryCore (cognitive 172) · ×1
  • index.useFromInventoryCore (cognitive 172) REDACTED:6863 — index.useFromInventoryCore has cognitive complexity 172 (threshold 15). Drivers by points: if/else 48 (97 pts), ternaries 18 (41 pts), boolean chains 30, error handling 2, loops 1 (2 pts) (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.startUnifiedScanner · ×1
  • app.startUnifiedScanner::loop (cognitive 152) REDACTED:24410 — app.startUnifiedScanner::loop has cognitive complexity 152 (threshold 15). Drivers by points: if/else 38 (106 pts), boolean chains 18, error handling 5 (18 pts), ternaries 6 (10 pts) (nesting depth added 85). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.submitAdd (cognitive 152) · ×1
  • app.submitAdd (cognitive 152) REDACTED:28433 — app.submitAdd has cognitive complexity 152 (threshold 15). Drivers by points: if/else 35 (64 pts), boolean chains 47, ternaries 14 (28 pts), error handling 4 (10 pts), loops 1 (3 pts) (nesting depth added 51). Of this number, 146 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 · app.submitEditInventory (cognitive 142) · ×1
  • app.submitEditInventory (cognitive 142) REDACTED:21642 — app.submitEditInventory has cognitive complexity 142 (threshold 15). Drivers by points: boolean chains 66, if/else 38 (52 pts), ternaries 14 (23 pts), error handling 1 (nesting depth added 23). Of this number, 140 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 · app.renderRecipe (cognitive 139) · ×1
  • app.renderRecipe (cognitive 139) REDACTED:38972 — app.renderRecipe has cognitive complexity 139 (threshold 15). Drivers by points: if/else 40 (59 pts), boolean chains 51, ternaries 15 (29 pts) (nesting depth added 33). Of this number, 95 points are the body's own statements and 44 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · database.estimateOpenedExpiryDaysPHP (cognitive 136) · ×1
  • database.estimateOpenedExpiryDaysPHP (cognitive 136) api/database.php:1280 — database.estimateOpenedExpiryDaysPHP has cognitive complexity 136 (threshold 15). Drivers by points: if/else 101 (133 pts), boolean chains 3 (nesting depth added 32). 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 · index.generateRecipe (cognitive 126) · ×1
  • index.generateRecipe (cognitive 126) REDACTED:14844 — index.generateRecipe has cognitive complexity 126 (threshold 15). Drivers by points: if/else 37 (68 pts), ternaries 6 (25 pts), boolean chains 20, loops 7 (13 pts) (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index._calcEstimatedTotal (cognitive 115) · ×1
  • index._calcEstimatedTotal (cognitive 115) REDACTED:25285 — index._calcEstimatedTotal has cognitive complexity 115 (threshold 15). Drivers by points: if/else 29 (67 pts), boolean chains 28, ternaries 4 (14 pts), match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.renderBannerItem (cognitive 113) · ×1
  • app.renderBannerItem (cognitive 113) REDACTED:14671 — app.renderBannerItem has cognitive complexity 113 (threshold 15). Drivers by points: if/else 43 (63 pts), boolean chains 28, ternaries 11 (22 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._runStartupCheck (cognitive 112) · ×1
  • app._runStartupCheck (cognitive 112) REDACTED:46193 — app._runStartupCheck has cognitive complexity 112 (threshold 15). Drivers by points: if/else 35 (52 pts), ternaries 15 (30 pts), boolean chains 24, error handling 3 (4 pts), loops 2 (nesting depth added 33). Of this number, 76 points are the body's own statements and 36 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 · app.loadBannerAlerts (cognitive 107) · ×1
  • app.loadBannerAlerts (cognitive 107) REDACTED:14321 — app.loadBannerAlerts has cognitive complexity 107 (threshold 15). Drivers by points: if/else 47 (59 pts), boolean chains 42, ternaries 4 (5 pts), error handling 1 (nesting depth added 13). Of this number, 23 points are the body's own statements and 84 belong to 14 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SetupActivity.autoDiscover (cognitive 105) · ×1
  • SetupActivity.autoDiscover (cognitive 105) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1161 — SetupActivity.autoDiscover has cognitive complexity 105 (threshold 15). Drivers by points: if/else 23 (58 pts), loops 15 (23 pts), boolean chains 15, error handling 4 (6 pts), match/switch 2 (3 pts) (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the 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 · app.syncSettingsFromDB (cognitive 104) · ×1
  • app.syncSettingsFromDB (cognitive 104) REDACTED:6076 — app.syncSettingsFromDB has cognitive complexity 104 (threshold 15). Drivers by points: if/else 33 (75 pts), error handling 9 (25 pts), boolean chains 4 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.estimateOpenedExpiryDays (cognitive 97) · ×1
  • app.estimateOpenedExpiryDays (cognitive 97) REDACTED:4411 — app.estimateOpenedExpiryDays has cognitive complexity 97 (threshold 15). Drivers by points: if/else 81 (93 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.submitProduct (cognitive 94) · ×1
  • app.submitProduct (cognitive 94) REDACTED:26410 — app.submitProduct has cognitive complexity 94 (threshold 15). Drivers by points: boolean chains 36, if/else 21 (34 pts), ternaries 12 (23 pts), error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seasonal.seasonalReviewShopping (cognitive 93) · ×1
  • seasonal.seasonalReviewShopping (cognitive 93) api/lib/seasonal.php:456 — seasonal.seasonalReviewShopping has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (54 pts), ternaries 8 (15 pts), boolean chains 13, loops 7 (8 pts), error handling 3 (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 · index.shoppingEvaluateFamilyRestock (cognitive 92) · ×1
  • index.shoppingEvaluateFamilyRestock (cognitive 92) REDACTED:17991 — index.shoppingEvaluateFamilyRestock has cognitive complexity 92 (threshold 15). Drivers by points: if/else 24 (48 pts), boolean chains 18, ternaries 6 (17 pts), loops 5 (9 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.medLookupAction (cognitive 91) · ×1
  • index.medLookupAction (cognitive 91) REDACTED:11030 — index.medLookupAction has cognitive complexity 91 (threshold 15). Drivers by points: if/else 21 (47 pts), loops 7 (18 pts), boolean chains 16, ternaries 6 (10 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.testTTS (cognitive 87) · ×1
  • app.testTTS (cognitive 87) REDACTED:41522 — app.testTTS has cognitive complexity 87 (threshold 15). Drivers by points: if/else 27 (55 pts), boolean chains 26, ternaries 2 (4 pts), error handling 2 (nesting depth added 30). Of this number, 76 points are the body's own statements and 11 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app._initApp (cognitive 86) · ×1
  • app._initApp (cognitive 86) REDACTED:46604 — app._initApp has cognitive complexity 86 (threshold 15). Drivers by points: if/else 33 (46 pts), boolean chains 19, error handling 8 (14 pts), ternaries 3 (7 pts) (nesting depth added 23). Of this number, 55 points are the body's own statements and 31 belong to 11 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.ensureShelfLifeLearningBackfilled (cognitive 83) · ×1
  • index.ensureShelfLifeLearningBackfilled (cognitive 83) REDACTED:6487 — index.ensureShelfLifeLearningBackfilled has cognitive complexity 83 (threshold 15). Drivers by points: if/else 18 (37 pts), ternaries 8 (19 pts), loops 10 (17 pts), boolean chains 7, error handling 1 (3 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.enrichRecipeIngredientsStock (cognitive 82) · ×1
  • app.enrichRecipeIngredientsStock (cognitive 82) REDACTED:37605 — app.enrichRecipeIngredientsStock has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (53 pts), boolean chains 19, loops 3 (7 pts), error handling 2 (3 pts) (nesting depth added 37). Of this number, 67 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app._scaleAutoFillRecipeUse (cognitive 75) · ×1
  • app._scaleAutoFillRecipeUse (cognitive 75) REDACTED:1575 — app._scaleAutoFillRecipeUse has cognitive complexity 75 (threshold 15). Drivers by points: if/else 42 (63 pts), boolean chains 12 (nesting depth added 21). Of this number, 57 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.estimateExpiryDays (cognitive 75) · ×1
  • app.estimateExpiryDays (cognitive 75) REDACTED:4301 — app.estimateExpiryDays has cognitive complexity 75 (threshold 15). Drivers by points: if/else 60 (64 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · index.bringSuggestItems (cognitive 73) · ×1
  • index.bringSuggestItems (cognitive 73) REDACTED:22057 — index.bringSuggestItems has cognitive complexity 73 (threshold 15). Drivers by points: if/else 17 (42 pts), ternaries 10 (19 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.cleanupObsoleteBringItems (cognitive 70) · ×1
  • app.cleanupObsoleteBringItems (cognitive 70) REDACTED:32655 — app.cleanupObsoleteBringItems has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 20, loops 7 (11 pts), error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.saveSettings (cognitive 70) · ×1
  • index.saveSettings (cognitive 70) REDACTED:11677 — index.saveSettings has cognitive complexity 70 (threshold 15). Drivers by points: if/else 28 (44 pts), loops 8 (10 pts), boolean chains 8, ternaries 2 (5 pts), error handling 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._startRecipeGeneration (cognitive 69) · ×1
  • app._startRecipeGeneration (cognitive 69) REDACTED:42732 — app._startRecipeGeneration has cognitive complexity 69 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 17, ternaries 6 (10 pts), error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 20). Of this number, 67 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.renderShoppingItems (cognitive 68) · ×1
  • app.renderShoppingItems (cognitive 68) REDACTED:34864 — app.renderShoppingItems has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 15, ternaries 6 (14 pts), loops 7 (10 pts) (nesting depth added 23). Of this number, 39 points are the body's own statements and 29 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qr.evershelfQrFunctionPattern (cognitive 67) · ×1
  • qr.evershelfQrFunctionPattern (cognitive 67) api/lib/qr.php:267 — qr.evershelfQrFunctionPattern has cognitive complexity 67 (threshold 15). Drivers by points: loops 12 (24 pts), boolean chains 18, if/else 5 (14 pts), ternaries 3 (11 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 · index.bringQuickSyncProduct (cognitive 66) · ×1
  • index.bringQuickSyncProduct (cognitive 66) REDACTED:16742 — index.bringQuickSyncProduct has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (33 pts), ternaries 8 (20 pts), boolean chains 8, loops 2 (5 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qr.evershelfQrPenalty (cognitive 66) · ×1
  • qr.evershelfQrPenalty (cognitive 66) api/lib/qr.php:470 — qr.evershelfQrPenalty has cognitive complexity 66 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 11 (25 pts), ternaries 3 (14 pts), boolean chains 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._apiFetchJson (cognitive 65) · ×1
  • app._apiFetchJson (cognitive 65) REDACTED:9429 — app._apiFetchJson has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (43 pts), boolean chains 16, error handling 2 (4 pts), loops 1, ternaries 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 · app.showProductAction (cognitive 65) · ×1
  • app.showProductAction (cognitive 65) REDACTED:26596 — app.showProductAction has cognitive complexity 65 (threshold 15). Drivers by points: if/else 32 (42 pts), boolean chains 15, ternaries 3 (5 pts), loops 1 (3 pts) (nesting depth added 14). Of this number, 28 points are the body's own statements and 37 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getStats (cognitive 64) · ×1
  • index.getStats (cognitive 64) REDACTED:9315 — index.getStats has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 13, ternaries 3 (9 pts), loops 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 · index.updateInventory (cognitive 63) · ×1
  • index.updateInventory (cognitive 63) REDACTED:7284 — index.updateInventory has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (30 pts), ternaries 6 (14 pts), boolean chains 13, error handling 4 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recipe_shopping.evershelfRecipeShoppingPlan (cognitive 63) · ×1
  • recipe_shopping.evershelfRecipeShoppingPlan (cognitive 63) api/lib/recipe_shopping.php:316 — recipe_shopping.evershelfRecipeShoppingPlan has cognitive complexity 63 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 8 (18 pts), boolean chains 12, loops 5 (6 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.fetchAllPrices (cognitive 62) · ×1
  • app.fetchAllPrices (cognitive 62) REDACTED:32526 — app.fetchAllPrices has cognitive complexity 62 (threshold 15). Drivers by points: if/else 30 (48 pts), boolean chains 11, error handling 2, ternaries 1 (nesting depth added 18). Of this number, 51 points are the body's own statements and 11 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 · app._computeSuggestedQtyForPlanDays (cognitive 61) · ×1
  • app._computeSuggestedQtyForPlanDays (cognitive 61) REDACTED:31624 — app._computeSuggestedQtyForPlanDays has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 25, ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._renderInfoTab (cognitive 60) · ×1
  • app._renderInfoTab (cognitive 60) REDACTED:6500 — app._renderInfoTab has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 25, if/else 19 (21 pts), ternaries 9 (13 pts), error handling 1 (nesting depth added 6). Of this number, 31 points are the body's own statements and 29 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.
D2 · Cognitive Complexity · app.renderSmartItem (cognitive 59) · ×1
  • app.renderSmartItem (cognitive 59) REDACTED:33395 — app.renderSmartItem has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 19 (32 pts), boolean chains 14, if/else 12 (13 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 · medicines.medicinesImportFile (cognitive 59) · ×1
  • medicines.medicinesImportFile (cognitive 59) api/lib/medicines.php:859 — medicines.medicinesImportFile has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (37 pts), boolean chains 10, loops 3 (7 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getConsumptionPredictions (cognitive 58) · ×1
  • index.getConsumptionPredictions (cognitive 58) REDACTED:9992 — index.getConsumptionPredictions has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (38 pts), ternaries 5 (10 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._scaleOnMessage (cognitive 57) · ×1
  • app._scaleOnMessage (cognitive 57) REDACTED:1057 — app._scaleOnMessage has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KioskActivity.launchWebView (cognitive 56) · ×1
  • KioskActivity.launchWebView (cognitive 56) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:704 — KioskActivity.launchWebView has cognitive complexity 56 (threshold 15). Drivers by points: if/else 35 (42 pts), error handling 7 (10 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). 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 · app._medReadLabelOcrInner (cognitive 55) · ×1
  • app._medReadLabelOcrInner (cognitive 55) REDACTED:22954 — app._medReadLabelOcrInner has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 8, ternaries 3 (7 pts), error handling 2 (5 pts), loops 1 (nesting depth added 19). Of this number, 51 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · medical.medicalDetectCode (cognitive 55) · ×1
  • medical.medicalDetectCode (cognitive 55) api/lib/medical.php:521 — medical.medicalDetectCode has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 4 (16 pts), loops 5 (11 pts), boolean chains 5 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app._tryConfirmBarcode (cognitive 54) · ×1
  • app._tryConfirmBarcode (cognitive 54) REDACTED:22308 — app._tryConfirmBarcode has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 16, ternaries 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.discoverMealie (cognitive 54) · ×1
  • app.discoverMealie (cognitive 54) REDACTED:42466 — app.discoverMealie has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 12, ternaries 2 (4 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._handleOfflineApi (cognitive 54) · ×1
  • app._handleOfflineApi (cognitive 54) REDACTED:43540 — app._handleOfflineApi has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 21 (nesting depth added 11). Of this number, 40 points are the body's own statements and 14 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 · app.loadUseInventoryInfo (cognitive 52) · ×1
  • app.loadUseInventoryInfo (cognitive 52) REDACTED:28952 — app.loadUseInventoryInfo has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 18, ternaries 7 (10 pts), error handling 1 (nesting depth added 11). Of this number, 46 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.haInventorySensor (cognitive 52) · ×1
  • index.haInventorySensor (cognitive 52) REDACTED:3308 — index.haInventorySensor has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (31 pts), loops 4 (9 pts), ternaries 4 (6 pts), error handling 2 (3 pts), boolean chains 2, match/switch 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 · medicines.medicinesSyncSources (cognitive 52) · ×1
  • medicines.medicinesSyncSources (cognitive 52) api/lib/medicines.php:204 — medicines.medicinesSyncSources has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 6 (16 pts), loops 4 (8 pts), boolean chains 4 (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 · app.submitRecipeUse (cognitive 51) · ×1
  • app.submitRecipeUse (cognitive 51) REDACTED:38203 — app.submitRecipeUse has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 24, if/else 13 (20 pts), ternaries 3 (6 pts), error handling 1 (nesting depth added 10). Of this number, 46 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · med._medDetectCode (cognitive 50) · ×1
  • med._medDetectCode (cognitive 50) REDACTED:453 — med._medDetectCode has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 22, if/else 11 (20 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 12). Of this number, 47 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 · index.importInventory (cognitive 50) · ×1
  • index.importInventory (cognitive 50) REDACTED:2674 — index.importInventory has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 3 (9 pts), loops 4 (7 pts), boolean chains 3, error handling 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 · index.mergeIncomingProductFields (cognitive 50) · ×1
  • index.mergeIncomingProductFields (cognitive 50) REDACTED:7802 — index.mergeIncomingProductFields has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 15, ternaries 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 · health.computeMealBudget (cognitive 50) · ×1
  • health.computeMealBudget (cognitive 50) api/lib/health.php:415 — health.computeMealBudget has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 15, ternaries 4 (7 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 · app.startQuaggaScanner (cognitive 49) · ×1
  • app.startQuaggaScanner (cognitive 49) REDACTED:24616 — app.startQuaggaScanner has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 8, ternaries 4 (6 pts), error handling 1 (nesting depth added 13). Most of this is not in the body itself: 6 of the 49 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 24720, scanFrame, getFrameDataUrl, …). 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 · app.showAddForm (cognitive 49) · ×1
  • app.showAddForm (cognitive 49) REDACTED:27619 — app.showAddForm has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 15, ternaries 7 (8 pts) (nesting depth added 5). Of this number, 45 points are the body's own statements and 4 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 · app.loadShoppingList (cognitive 49) · ×1
  • app.loadShoppingList (cognitive 49) REDACTED:33889 — app.loadShoppingList has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 9, loops 2 (5 pts), error handling 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._scaleAutoFillUse (cognitive 48) · ×1
  • app._scaleAutoFillUse (cognitive 48) REDACTED:1422 — app._scaleAutoFillUse has cognitive complexity 48 (threshold 15). Drivers by points: if/else 30 (41 pts), boolean chains 7 (nesting depth added 11). Of this number, 40 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._inventoryExpiryBadgeHtml (cognitive 48) · ×1
  • app._inventoryExpiryBadgeHtml (cognitive 48) REDACTED:16498 — app._inventoryExpiryBadgeHtml has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (29 pts), ternaries 5 (17 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.showItemDetail (cognitive 48) · ×1
  • app.showItemDetail (cognitive 48) REDACTED:17843 — app.showItemDetail has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 12 (21 pts), if/else 15 (20 pts), boolean chains 7 (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 · app._backgroundBringSync (cognitive 48) · ×1
  • app._backgroundBringSync (cognitive 48) REDACTED:46882 — app._backgroundBringSync has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 15, ternaries 1 (3 pts), loops 2, error handling 1 (nesting depth added 12). Of this number, 40 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.applyAutoProductRules (cognitive 48) · ×1
  • index.applyAutoProductRules (cognitive 48) REDACTED:5801 — index.applyAutoProductRules has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 7 (18 pts), boolean chains 3, loops 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 · index.recipeScorePantryMatch (cognitive 48) · ×1
  • index.recipeScorePantryMatch (cognitive 48) REDACTED:14361 — index.recipeScorePantryMatch has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 11, ternaries 3 (7 pts), loops 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeApplyPantryQtyFields (cognitive 48) · ×1
  • index.recipeApplyPantryQtyFields (cognitive 48) REDACTED:14492 — index.recipeApplyPantryQtyFields has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 19, ternaries 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringUpsertSmartItem (cognitive 48) · ×1
  • index.bringUpsertSmartItem (cognitive 48) REDACTED:18929 — index.bringUpsertSmartItem has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 10, ternaries 4 (9 pts), loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringDedupeGenerics (cognitive 48) · ×1
  • index.bringDedupeGenerics (cognitive 48) REDACTED:19157 — index.bringDedupeGenerics has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 2 (8 pts), boolean chains 6, loops 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 · medicines._medicinesImportXml (cognitive 48) · ×1
  • medicines._medicinesImportXml (cognitive 48) api/lib/medicines.php:1049 — medicines._medicinesImportXml has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 4 (11 pts), boolean chains 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 · index.shoppingAddItemsCore (cognitive 47) · ×1
  • index.shoppingAddItemsCore (cognitive 47) REDACTED:22732 — index.shoppingAddItemsCore has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 7 (22 pts), if/else 10 (21 pts), boolean chains 3, loops 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 · index.templatesApply (cognitive 47) · ×1
  • index.templatesApply (cognitive 47) REDACTED:22853 — index.templatesApply has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 5 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._medFormSetMode (cognitive 46) · ×1
  • app._medFormSetMode (cognitive 46) REDACTED:25322 — app._medFormSetMode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (23 pts), ternaries 7 (15 pts), boolean chains 8 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _auditRender (cognitive 46) · ×1
  • _auditRender (cognitive 46) assets/js/audit.js:1864 — _auditRender has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 20, ternaries 20, if/else 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.showLowStockBringPrompt (cognitive 45) · ×1
  • app.showLowStockBringPrompt (cognitive 45) REDACTED:29597 — app.showLowStockBringPrompt has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 16, error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 12). Of this number, 33 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 · index.addToInventory (cognitive 45) · ×1
  • index.addToInventory (cognitive 45) REDACTED:5911 — index.addToInventory has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 13, ternaries 6 (8 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 · KioskActivity.checkForUpdates (cognitive 44) · ×1
  • KioskActivity.checkForUpdates (cognitive 44) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1215 — KioskActivity.checkForUpdates has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (31 pts), error handling 4 (5 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.barcodeHttpParallel (cognitive 44) · ×1
  • index.barcodeHttpParallel (cognitive 44) REDACTED:4631 — index.barcodeHttpParallel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 10, loops 6 (10 pts), ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.getExpiredSafety (cognitive 43) · ×1
  • app.getExpiredSafety (cognitive 43) REDACTED:4007 — app.getExpiredSafety has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 6 (14 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.renderInventoryItem (cognitive 43) · ×1
  • app.renderInventoryItem (cognitive 43) REDACTED:16581 — app.renderInventoryItem has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 17 (22 pts), if/else 8 (11 pts), boolean chains 10 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._fetchExpiryHistoryAndUpdate (cognitive 43) · ×1
  • app._fetchExpiryHistoryAndUpdate (cognitive 43) REDACTED:27880 — app._fetchExpiryHistoryAndUpdate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 10, ternaries 4 (8 pts), error handling 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 · app._bindCookingWheelControls (cognitive 43) · ×1
  • app._bindCookingWheelControls (cognitive 43) REDACTED:40004 — app._bindCookingWheelControls has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (28 pts), ternaries 7 (8 pts), boolean chains 7 (nesting depth added 6). Most of this is not in the body itself: 4 of the 43 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 40029, 40093, 40008, …). 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 · app._setupCollectCurrent (cognitive 43) · ×1
  • app._setupCollectCurrent (cognitive 43) REDACTED:45815 — app._setupCollectCurrent has cognitive complexity 43 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index._parseOffProductJson (cognitive 43) · ×1
  • index._parseOffProductJson (cognitive 43) REDACTED:4706 — index._parseOffProductJson has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 11 (16 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.barcodeResolveExternal (cognitive 43) · ×1
  • index.barcodeResolveExternal (cognitive 43) REDACTED:4878 — index.barcodeResolveExternal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 4, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · medicines.medicineSearchFuzzy (cognitive 43) · ×1
  • medicines.medicineSearchFuzzy (cognitive 43) api/lib/medicines.php:640 — medicines.medicineSearchFuzzy has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 7 (8 pts), ternaries 4 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._captureParse (cognitive 42) · ×1
  • app._captureParse (cognitive 42) REDACTED:13142 — app._captureParse has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 10 (14 pts), boolean chains 8 (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 · app.editInventoryItem (cognitive 42) · ×1
  • app.editInventoryItem (cognitive 42) REDACTED:21041 — app.editInventoryItem has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 25, ternaries 8 (9 pts), if/else 6 (8 pts) (nesting depth added 3). Of this number, 30 points are the body's own statements and 12 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.loadLog (cognitive 42) · ×1
  • app.loadLog (cognitive 42) REDACTED:35707 — app.loadLog has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 7 (14 pts), boolean chains 12, error handling 1 (nesting depth added 11). Most of this is not in the body itself: 12 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 35723). 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 · app.formatRecipeShareText (cognitive 42) · ×1
  • app.formatRecipeShareText (cognitive 42) REDACTED:38574 — app.formatRecipeShareText has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 12, ternaries 4 (7 pts) (nesting depth added 8). Of this number, 32 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.collectDuplicateProductIds (cognitive 42) · ×1
  • index.collectDuplicateProductIds (cognitive 42) REDACTED:8252 — index.collectDuplicateProductIds has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.loadDashboard · ×1
  • app.loadDashboard::openedRow (cognitive 41) REDACTED:13844 — app.loadDashboard::openedRow has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 14, ternaries 6 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (app.loadDashboard) 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 · app._itemDetailQtyInit (cognitive 40) · ×1
  • app._itemDetailQtyInit (cognitive 40) REDACTED:18177 — app._itemDetailQtyInit has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 8 (18 pts), boolean chains 13, if/else 8 (9 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._medConfirmRead (cognitive 40) · ×1
  • app._medConfirmRead (cognitive 40) REDACTED:23345 — app._medConfirmRead has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (12 pts), ternaries 7 (11 pts), error handling 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · database.recipesBackfillAndDedupByHash (cognitive 40) · ×1
  • database.recipesBackfillAndDedupByHash (cognitive 40) api/database.php:1720 — database.recipesBackfillAndDedupByHash has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 5 (8 pts), error handling 2 (4 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 · index.medClassifyAction (cognitive 40) · ×1
  • index.medClassifyAction (cognitive 40) REDACTED:11409 — index.medClassifyAction has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 5 (8 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.geminiChat (cognitive 40) · ×1
  • index.geminiChat (cognitive 40) REDACTED:13110 — index.geminiChat has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8, ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.internalShoppingDedupeGenerics (cognitive 40) · ×1
  • index.internalShoppingDedupeGenerics (cognitive 40) REDACTED:22523 — index.internalShoppingDedupeGenerics has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (10 pts), boolean chains 8, loops 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._scaleUpdateLiveBox (cognitive 39) · ×1
  • app._scaleUpdateLiveBox (cognitive 39) REDACTED:1363 — app._scaleUpdateLiveBox has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 10, ternaries 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.cookRecipeDeductSelected (cognitive 39) · ×1
  • app.cookRecipeDeductSelected (cognitive 39) REDACTED:39278 — app.cookRecipeDeductSelected has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 10, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.haParseRecipeGenerateInput (cognitive 39) · ×1
  • index.haParseRecipeGenerateInput (cognitive 39) REDACTED:3648 — index.haParseRecipeGenerateInput has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 13, ternaries 5 (6 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 · index.locationRenameAction (cognitive 39) · ×1
  • index.locationRenameAction (cognitive 39) REDACTED:12027 — index.locationRenameAction has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 13, ternaries 3 (4 pts), error handling 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · app.onBarcodeDetected (cognitive 38) · ×1
  • app.onBarcodeDetected (cognitive 38) REDACTED:25163 — app.onBarcodeDetected has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 10, error handling 3 (7 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 15 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HealthConnectReader.readDay (cognitive 38) · ×1
  • HealthConnectReader.readDay (cognitive 38) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt:104 — HealthConnectReader.readDay has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (29 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mealie.mealieRecipePantryCoverage (cognitive 38) · ×1
  • mealie.mealieRecipePantryCoverage (cognitive 38) api/lib/mealie.php:510 — mealie.mealieRecipePantryCoverage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5 (12 pts), boolean chains 3, ternaries 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 · app._editMedicalInventoryItem (cognitive 37) · ×1
  • app._editMedicalInventoryItem (cognitive 37) REDACTED:21407 — app._editMedicalInventoryItem has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 28, ternaries 6 (7 pts), if/else 2 (nesting depth added 1). Of this number, 30 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.selectAIMatch (cognitive 37) · ×1
  • app.selectAIMatch (cognitive 37) REDACTED:30971 — app.selectAIMatch has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 19, if/else 11 (17 pts), error handling 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KioskActivity.installWithPackageInstaller (cognitive 37) · ×1
  • KioskActivity.installWithPackageInstaller (cognitive 37) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1569 — KioskActivity.installWithPackageInstaller has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (27 pts), error handling 5 (9 pts), match/switch 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 · index.saveProduct (cognitive 37) · ×1
  • index.saveProduct (cognitive 37) REDACTED:5227 — index.saveProduct has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 4 (7 pts), boolean chains 5, error handling 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 · env.loadEnvOverrides (cognitive 37) · ×1
  • env.loadEnvOverrides (cognitive 37) api/lib/env.php:206 — env.loadEnvOverrides has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 7, ternaries 3 (5 pts), error handling 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · med._medOcrFindAic (cognitive 36) · ×1
  • med._medOcrFindAic (cognitive 36) REDACTED:273 — med._medOcrFindAic has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (8 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.medDebugAction (cognitive 36) · ×1
  • index.medDebugAction (cognitive 36) REDACTED:10881 — index.medDebugAction has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 4 (8 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.showPage (cognitive 35) · ×1
  • app.showPage (cognitive 35) REDACTED:9809 — app.showPage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.initScanner (cognitive 35) · ×1
  • app.initScanner (cognitive 35) REDACTED:21960 — app.initScanner has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (12 pts), ternaries 4, error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.useRecipeIngredient (cognitive 35) · ×1
  • app.useRecipeIngredient (cognitive 35) REDACTED:37752 — app.useRecipeIngredient has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 18, if/else 8 (9 pts), ternaries 6 (7 pts), error handling 1 (nesting depth added 2). Of this number, 30 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.installMealie (cognitive 35) · ×1
  • app.installMealie (cognitive 35) REDACTED:42534 — app.installMealie has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 9, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · index._computeAllShoppingPrices (cognitive 35) · ×1
  • index._computeAllShoppingPrices (cognitive 35) REDACTED:24888 — index._computeAllShoppingPrices has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (10 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._findBestAiCatalogMatch (cognitive 34) · ×1
  • app._findBestAiCatalogMatch (cognitive 34) REDACTED:5631 — app._findBestAiCatalogMatch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (nesting depth added 12). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._applyInsightPhase (cognitive 34) · ×1
  • app._applyInsightPhase (cognitive 34) REDACTED:10815 — app._applyInsightPhase has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 14, if/else 12 (13 pts), ternaries 6, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 17 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app._renderMealPlanHint (cognitive 34) · ×1
  • app._renderMealPlanHint (cognitive 34) REDACTED:42254 — app._renderMealPlanHint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 12). Of this number, 26 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetupActivity.showStep (cognitive 34) · ×1
  • SetupActivity.showStep (cognitive 34) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:595 — SetupActivity.showStep has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 9, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.callGemini (cognitive 34) · ×1
  • index.callGemini (cognitive 34) REDACTED:12448 — index.callGemini has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (4 pts), boolean chains 2, ternaries 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 · index.tesseractReadExpiry (cognitive 34) · ×1
  • index.tesseractReadExpiry (cognitive 34) REDACTED:12823 — index.tesseractReadExpiry has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.shoppingUpdateRemainingNeedOnList (cognitive 34) · ×1
  • index.shoppingUpdateRemainingNeedOnList (cognitive 34) REDACTED:18237 — index.shoppingUpdateRemainingNeedOnList has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 3 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringAddItems (cognitive 34) · ×1
  • index.bringAddItems (cognitive 34) REDACTED:19942 — index.bringAddItems has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · health.healthFuelPromptBlock (cognitive 34) · ×1
  • health.healthFuelPromptBlock (cognitive 34) api/lib/health.php:618 — health.healthFuelPromptBlock has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mealie.mealieScoreRecipeForPantry (cognitive 34) · ×1
  • mealie.mealieScoreRecipeForPantry (cognitive 34) api/lib/mealie.php:447 — mealie.mealieScoreRecipeForPantry has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (11 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._captureScoreName (cognitive 33) · ×1
  • app._captureScoreName (cognitive 33) REDACTED:13233 — app._captureScoreName has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (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 · app._setScanModeInner (cognitive 33) · ×1
  • app._setScanModeInner (cognitive 33) REDACTED:19419 — app._setScanModeInner has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16, boolean chains 11, ternaries 4 (6 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.analyzeWithAI (cognitive 33) · ×1
  • app.analyzeWithAI (cognitive 33) REDACTED:30843 — app.analyzeWithAI has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 6, error handling 2 (nesting depth added 8). Of this number, 16 points are the body's own statements and 17 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindIsKnownWord (cognitive 33) · ×1
  • product_kind.productKindIsKnownWord (cognitive 33) api/lib/product_kind.php:1142 — product_kind.productKindIsKnownWord has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 4 (11 pts), ternaries 1 (3 pts) (nesting depth added 21). 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 · app.confirmRecipeMove (cognitive 32) · ×1
  • app.confirmRecipeMove (cognitive 32) REDACTED:38347 — app.confirmRecipeMove has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 9, ternaries 3 (5 pts), error handling 1 (nesting depth added 11). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · med._medGs1Parse (cognitive 32) · ×1
  • med._medGs1Parse (cognitive 32) REDACTED:64 — med._medGs1Parse has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vocab.vocabCaptureLexicon (cognitive 32) · ×1
  • vocab.vocabCaptureLexicon (cognitive 32) assets/js/core/vocab.js:410 — vocab.vocabCaptureLexicon has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 20, if/else 7, ternaries 5. Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 426, a function literal at line 440, a function literal at line 448, …). 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 · screensaver._ssFactCandidates (cognitive 32) · ×1
  • screensaver._ssFactCandidates (cognitive 32) assets/js/screensaver.js:483 — screensaver._ssFactCandidates has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 20, ternaries 4 (7 pts), if/else 5 (nesting depth added 3). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.ttsProxy (cognitive 32) · ×1
  • index.ttsProxy (cognitive 32) REDACTED:2869 — index.ttsProxy has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 6, 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 · index.recipeEnrichIngredientsFromPantry (cognitive 32) · ×1
  • index.recipeEnrichIngredientsFromPantry (cognitive 32) REDACTED:14574 — index.recipeEnrichIngredientsFromPantry has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · notify.evershelfNotifyFormatEvent (cognitive 32) · ×1
  • notify.evershelfNotifyFormatEvent (cognitive 32) api/lib/notify.php:122 — notify.evershelfNotifyFormatEvent has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 6 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._applyLocalBarcodeProductFixes (cognitive 31) · ×1
  • app._applyLocalBarcodeProductFixes (cognitive 31) REDACTED:24897 — app._applyLocalBarcodeProductFixes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 10 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MetricChartView.onDraw (cognitive 31) · ×1
  • MetricChartView.onDraw (cognitive 31) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/MetricChartView.kt:62 — MetricChartView.onDraw has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringAddDepletedProduct (cognitive 31) · ×1
  • index.bringAddDepletedProduct (cognitive 31) REDACTED:19774 — index.bringAddDepletedProduct has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 6 (10 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · health.healthLogMeal (cognitive 31) · ×1
  • health.healthLogMeal (cognitive 31) api/lib/health.php:918 — health.healthLogMeal has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 9 (10 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mealie.mealieListRecipes (cognitive 31) · ×1
  • mealie.mealieListRecipes (cognitive 31) api/lib/mealie.php:305 — mealie.mealieListRecipes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (7 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 · medicines._medicinesImportJson (cognitive 31) · ×1
  • medicines._medicinesImportJson (cognitive 31) api/lib/medicines.php:991 — medicines._medicinesImportJson has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 2 (5 pts), loops 2 (3 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 · _auditBegin (cognitive 31) · ×1
  • _auditBegin (cognitive 31) assets/js/audit.js:1685 — _auditBegin has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 13, ternaries 7 (10 pts), if/else 6 (8 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._renderAntiWasteSection (cognitive 30) · ×1
  • app._renderAntiWasteSection (cognitive 30) REDACTED:10100 — app._renderAntiWasteSection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 5, ternaries 2, loops 1 (nesting depth added 2). Of this number, 21 points are the body's own statements and 9 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 · app._applyAIProductHint (cognitive 30) · ×1
  • app._applyAIProductHint (cognitive 30) REDACTED:27952 — app._applyAIProductHint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 11, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · med._medCodeMatches (cognitive 30) · ×1
  • med._medCodeMatches (cognitive 30) REDACTED:532 — med._medCodeMatches has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.findDuplicateProductId (cognitive 30) · ×1
  • index.findDuplicateProductId (cognitive 30) REDACTED:8057 — index.findDuplicateProductId has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.medSymptomSearchAction (cognitive 30) · ×1
  • index.medSymptomSearchAction (cognitive 30) REDACTED:11338 — index.medSymptomSearchAction has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (9 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.computeShoppingNameBase (cognitive 30) · ×1
  • index.computeShoppingNameBase (cognitive 30) REDACTED:16660 — index.computeShoppingNameBase has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 13, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sale_units.saleUnitSnap (cognitive 30) · ×1
  • sale_units.saleUnitSnap (cognitive 30) api/lib/sale_units.php:102 — sale_units.saleUnitSnap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seasonal.staleInventoryItems (cognitive 30) · ×1
  • seasonal.staleInventoryItems (cognitive 30) api/lib/seasonal.php:711 — seasonal.staleInventoryItems has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 5 (10 pts), loops 2, 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 · app.updateScanQuickRail (cognitive 29) · ×1
  • app.updateScanQuickRail (cognitive 29) REDACTED:5122 — app.updateScanQuickRail has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 11, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._captureStartVoice (cognitive 29) · ×1
  • app._captureStartVoice (cognitive 29) REDACTED:12815 — app._captureStartVoice has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 8, error handling 4 (7 pts), ternaries 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 9 function items inside it that branch (startSession, armSilenceStop, armHandOver, …). 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 · app.confirmMoveAfterUse (cognitive 29) · ×1
  • app.confirmMoveAfterUse (cognitive 29) REDACTED:30293 — app.confirmMoveAfterUse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 9, ternaries 3 (5 pts), error handling 1 (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._initShopRowSwipe (cognitive 29) · ×1
  • app._initShopRowSwipe (cognitive 29) REDACTED:34590 — app._initShopRowSwipe has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (onEnd, onMove, onStart, …). 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 · screensaver._ssPickRecipe (cognitive 29) · ×1
  • screensaver._ssPickRecipe (cognitive 29) assets/js/screensaver.js:207 — screensaver._ssPickRecipe has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 15, if/else 11 (12 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 217, 213, 230). 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 · index.bringSyncSpecs (cognitive 29) · ×1
  • index.bringSyncSpecs (cognitive 29) REDACTED:19243 — index.bringSyncSpecs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, 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 · app._updateRecipeUseScaleCompare (cognitive 28) · ×1
  • app._updateRecipeUseScaleCompare (cognitive 28) REDACTED:1530 — app._updateRecipeUseScaleCompare has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._tryGeminiVisualBarcode (cognitive 28) · ×1
  • app._tryGeminiVisualBarcode (cognitive 28) REDACTED:5866 — app._tryGeminiVisualBarcode has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (12 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._finishStockWithUndo (cognitive 28) · ×1
  • app._finishStockWithUndo (cognitive 28) REDACTED:18126 — app._finishStockWithUndo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 2 (5 pts), error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 20 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._fractionChipOptions (cognitive 28) · ×1
  • app._fractionChipOptions (cognitive 28) REDACTED:18695 — app._fractionChipOptions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 9, ternaries 2 (nesting depth added 5). Of this number, 24 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._medShowAsk (cognitive 28) · ×1
  • app._medShowAsk (cognitive 28) REDACTED:23539 — app._medShowAsk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, error handling 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 · app._recipeArchiveCardHtml (cognitive 28) · ×1
  • app._recipeArchiveCardHtml (cognitive 28) REDACTED:36765 — app._recipeArchiveCardHtml has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (9 pts), if/else 8, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.saveHaSettings (cognitive 28) · ×1
  • app.saveHaSettings (cognitive 28) REDACTED:40681 — app.saveHaSettings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, ternaries 3 (4 pts), error handling 1 (nesting depth added 5). Of this number, 23 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vocab.vocabTermMatchScore (cognitive 28) · ×1
  • vocab.vocabTermMatchScore (cognitive 28) assets/js/core/vocab.js:70 — vocab.vocabTermMatchScore has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeNormalizeParsedRecipe (cognitive 28) · ×1
  • index.recipeNormalizeParsedRecipe (cognitive 28) REDACTED:14093 — index.recipeNormalizeParsedRecipe has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipesArchiveUpsert (cognitive 28) · ×1
  • index.recipesArchiveUpsert (cognitive 28) REDACTED:23521 — index.recipesArchiveUpsert has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 1 (3 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 · medical.medicalGs1Parse (cognitive 28) · ×1
  • medical.medicalGs1Parse (cognitive 28) api/lib/medical.php:230 — medical.medicalGs1Parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · medicines.medicinesProviderParseRow (cognitive 28) · ×1
  • medicines.medicinesProviderParseRow (cognitive 28) api/lib/medicines.php:1162 — medicines.medicinesProviderParseRow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 8, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindIsPlausibleGenre (cognitive 28) · ×1
  • product_kind.productKindIsPlausibleGenre (cognitive 28) api/lib/product_kind.php:803 — product_kind.productKindIsPlausibleGenre has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8, loops 3 (5 pts), ternaries 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.
D2 · Cognitive Complexity · seasonal.seasonalMatchProduce (cognitive 28) · ×1
  • seasonal.seasonalMatchProduce (cognitive 28) api/lib/seasonal.php:273 — seasonal.seasonalMatchProduce has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), boolean chains 4, 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 · app._scoutBarcodeRegion (cognitive 27) · ×1
  • app._scoutBarcodeRegion (cognitive 27) REDACTED:4807 — app._scoutBarcodeRegion has cognitive complexity 27 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 6 (8 pts), boolean chains 4, ternaries 1 (3 pts), error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._captureQtyFor (cognitive 27) · ×1
  • app._captureQtyFor (cognitive 27) REDACTED:13375 — app._captureQtyFor has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (10 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.formatQuantityParts (cognitive 27) · ×1
  • app.formatQuantityParts (cognitive 27) REDACTED:16322 — app.formatQuantityParts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._bindRowHoldOpen (cognitive 27) · ×1
  • app._bindRowHoldOpen (cognitive 27) REDACTED:16698 — app._bindRowHoldOpen has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14, boolean chains 13. Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 6 function items inside it that branch (onDown, onMove, onUp, …). 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 · app._saveExternalBarcodeProduct (cognitive 27) · ×1
  • app._saveExternalBarcodeProduct (cognitive 27) REDACTED:25046 — app._saveExternalBarcodeProduct has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 7 (12 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.onAddUnitChange (cognitive 27) · ×1
  • app.onAddUnitChange (cognitive 27) REDACTED:28036 — app.onAddUnitChange has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app.showUseForm (cognitive 27) · ×1
  • app.showUseForm (cognitive 27) REDACTED:28687 — app.showUseForm has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._finishSetup (cognitive 27) · ×1
  • app._finishSetup (cognitive 27) REDACTED:45905 — app._finishSetup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 6, error handling 2. 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: 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 · sw.self.addEventListener("notificationclick") (cognitive 27) · ×1
  • sw.self.addEventListener("notificationclick") (cognitive 27) sw.js:235 — sw.self.addEventListener("notificationclick") has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, error handling 2 (6 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 272, 246, 244). 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 · index.bringMigrateNamesInternal (cognitive 27) · ×1
  • index.bringMigrateNamesInternal (cognitive 27) REDACTED:20111 — index.bringMigrateNamesInternal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.shoppingRemoveInternal (cognitive 27) · ×1
  • index.shoppingRemoveInternal (cognitive 27) REDACTED:23027 — index.shoppingRemoveInternal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_provider.aiRunConnectionTest (cognitive 27) · ×1
  • ai_provider.aiRunConnectionTest (cognitive 27) api/lib/ai_provider.php:279 — ai_provider.aiRunConnectionTest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindFromDictionary (cognitive 27) · ×1
  • product_kind.productKindFromDictionary (cognitive 27) api/lib/product_kind.php:431 — product_kind.productKindFromDictionary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qr.evershelfQrCodewords (cognitive 27) · ×1
  • qr.evershelfQrCodewords (cognitive 27) api/lib/qr.php:122 — qr.evershelfQrCodewords has cognitive complexity 27 (threshold 15). Drivers by points: loops 13 (17 pts), if/else 2 (6 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · (anonymous) (cognitive 27) · ×1
  • (anonymous) (cognitive 27) sw.js:235 — (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, error handling 2 (6 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 272, 246, 244). 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 · app._loadBackupTab (cognitive 26) · ×1
  • app._loadBackupTab (cognitive 26) REDACTED:6234 — app._loadBackupTab has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.deleteInventoryItem (cognitive 26) · ×1
  • app.deleteInventoryItem (cognitive 26) REDACTED:20919 — app.deleteInventoryItem has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3 (6 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 9). Of this number, 15 points are the body's own statements and 11 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 · app._renderMedDataset (cognitive 26) · ×1
  • app._renderMedDataset (cognitive 26) REDACTED:24261 — app._renderMedDataset has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app.loadSmartShopping (cognitive 26) · ×1
  • app.loadSmartShopping (cognitive 26) REDACTED:33088 — app.loadSmartShopping has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, error handling 1 (nesting depth added 6). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._chatMatchProductsInText (cognitive 26) · ×1
  • app._chatMatchProductsInText (cognitive 26) REDACTED:43183 — app._chatMatchProductsInText has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit._auditElsewhereView (cognitive 26) · ×1
  • audit._auditElsewhereView (cognitive 26) assets/js/audit.js:1450 — audit._auditElsewhereView has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 18, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · audit._auditFinish (cognitive 26) · ×1
  • audit._auditFinish (cognitive 26) assets/js/audit.js:2490 — audit._auditFinish has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.inventoryImportValidateRow (cognitive 26) · ×1
  • index.inventoryImportValidateRow (cognitive 26) REDACTED:2407 — index.inventoryImportValidateRow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 4, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.clientLog (cognitive 26) · ×1
  • index.clientLog (cognitive 26) REDACTED:4407 — index.clientLog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 7, boolean chains 4, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.internalShoppingAutoAddCritical (cognitive 26) · ×1
  • index.internalShoppingAutoAddCritical (cognitive 26) REDACTED:19502 — index.internalShoppingAutoAddCritical has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (4 pts), loops 2, 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 · index.smartInferShoppingCycleDays (cognitive 26) · ×1
  • index.smartInferShoppingCycleDays (cognitive 26) REDACTED:20342 — index.smartInferShoppingCycleDays has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), ternaries 2, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_provider.aiOpenAiChatCompletions (cognitive 26) · ×1
  • ai_provider.aiOpenAiChatCompletions (cognitive 26) api/lib/ai_provider.php:169 — ai_provider.aiOpenAiChatCompletions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5 (7 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · health.healthNormalizeDailyPayload (cognitive 26) · ×1
  • health.healthNormalizeDailyPayload (cognitive 26) api/lib/health.php:166 — health.healthNormalizeDailyPayload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10, ternaries 8 (10 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · health.healthEstimateProductMacros (cognitive 26) · ×1
  • health.healthEstimateProductMacros (cognitive 26) api/lib/health.php:1045 — health.healthEstimateProductMacros has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 5 (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 · vocabSameLemmaWord (cognitive 26) · ×1
  • vocabSameLemmaWord (cognitive 26) assets/js/core/vocab.js:255 — vocabSameLemmaWord has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (11 pts), loops 1, ternaries 1 (nesting depth added 3). Of this number, 23 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, 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 · app._renderMonthlyStatsSection (cognitive 25) · ×1
  • app._renderMonthlyStatsSection (cognitive 25) REDACTED:10427 — app._renderMonthlyStatsSection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (9 pts), boolean chains 4 (nesting depth added 7). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._shelfyOpenAdd (cognitive 25) · ×1
  • app._shelfyOpenAdd (cognitive 25) REDACTED:12618 — app._shelfyOpenAdd has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (7 pts), error handling 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._contrastScanCanvas (cognitive 25) · ×1
  • app._contrastScanCanvas (cognitive 25) REDACTED:22855 — app._contrastScanCanvas has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 6 (7 pts), if/else 3 (5 pts), error handling 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 · app._finishBarcodeResolved (cognitive 25) · ×1
  • app._finishBarcodeResolved (cognitive 25) REDACTED:25004 — app._finishBarcodeResolved has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, error handling 1 (4 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.saveEditedProductInfo (cognitive 25) · ×1
  • app.saveEditedProductInfo (cognitive 25) REDACTED:27196 — app.saveEditedProductInfo has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), ternaries 2 (4 pts), error handling 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 · app.selectPurchaseType (cognitive 25) · ×1
  • app.selectPurchaseType (cognitive 25) REDACTED:28145 — app.selectPurchaseType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · screensaver._ssViewNutrition (cognitive 25) · ×1
  • screensaver._ssViewNutrition (cognitive 25) assets/js/screensaver.js:423 — screensaver._ssViewNutrition has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, if/else 7, ternaries 2. Of this number, 19 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · SetupActivity.testConnection (cognitive 25) · ×1
  • SetupActivity.testConnection (cognitive 25) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:792 — SetupActivity.testConnection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (7 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getOpenedShelfLifeDays (cognitive 25) · ×1
  • index.getOpenedShelfLifeDays (cognitive 25) REDACTED:12712 — index.getOpenedShelfLifeDays has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4 (8 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getShoppingPrice (cognitive 25) · ×1
  • index.getShoppingPrice (cognitive 25) REDACTED:25147 — index.getShoppingPrice has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · health.healthSaveProfile (cognitive 25) · ×1
  • health.healthSaveProfile (cognitive 25) api/lib/health.php:123 — health.healthSaveProfile has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13, boolean chains 8, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mealie.mealiePickRecipe (cognitive 25) · ×1
  • mealie.mealiePickRecipe (cognitive 25) api/lib/mealie.php:614 — mealie.mealiePickRecipe has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · push_actions.evershelfPushInboxEntries (cognitive 25) · ×1
  • push_actions.evershelfPushInboxEntries (cognitive 25) api/lib/push_actions.php:124 — push_actions.evershelfPushInboxEntries has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vocabulary.vocabTermMatchScore (cognitive 25) · ×1
  • vocabulary.vocabTermMatchScore (cognitive 25) api/lib/vocabulary.php:110 — vocabulary.vocabTermMatchScore has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ssLoad (cognitive 25) · ×1
  • _ssLoad (cognitive 25) assets/js/screensaver.js:77 — _ssLoad has cognitive complexity 25 (threshold 15). Drivers by points: error handling 5 (7 pts), boolean chains 6, if/else 5 (6 pts), ternaries 5 (6 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _maybeShowSupportPrompt (cognitive 25) · ×1
  • _maybeShowSupportPrompt (cognitive 25) assets/js/core/support.js:370 — _maybeShowSupportPrompt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._essRenderBackup (cognitive 24) · ×1
  • app._essRenderBackup (cognitive 24) REDACTED:9177 — app._essRenderBackup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._captureSubmit (cognitive 24) · ×1
  • app._captureSubmit (cognitive 24) REDACTED:13447 — app._captureSubmit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 9 (nesting depth added 2). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._inventorySearchScore (cognitive 24) · ×1
  • app._inventorySearchScore (cognitive 24) REDACTED:17401 — app._inventorySearchScore has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, boolean chains 9. 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 · app._itemDetailConsume (cognitive 24) · ×1
  • app._itemDetailConsume (cognitive 24) REDACTED:18934 — app._itemDetailConsume has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 2 (5 pts), error handling 2 (3 pts) (nesting depth added 5). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.submitUse (cognitive 24) · ×1
  • app.submitUse (cognitive 24) REDACTED:30689 — app.submitUse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 2 (4 pts), error handling 1 (nesting depth added 3). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: 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 · app._buildPricePayload (cognitive 24) · ×1
  • app._buildPricePayload (cognitive 24) REDACTED:32257 — app._buildPricePayload has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (9 pts), ternaries 1 (3 pts) (nesting depth added 5). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 32259). 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 · app._recipeGetServingCapForIngredient (cognitive 24) · ×1
  • app._recipeGetServingCapForIngredient (cognitive 24) REDACTED:37465 — app._recipeGetServingCapForIngredient has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit._auditSearchMatches (cognitive 24) · ×1
  • audit._auditSearchMatches (cognitive 24) assets/js/audit.js:754 — audit._auditSearchMatches has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (8 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KioskActivity.onActivityResult (cognitive 24) · ×1
  • KioskActivity.onActivityResult (cognitive 24) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:2137 — KioskActivity.onActivityResult has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.inventoryImportParseCsv (cognitive 24) · ×1
  • index.inventoryImportParseCsv (cognitive 24) REDACTED:1957 — index.inventoryImportParseCsv has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.haGenerateRecipe (cognitive 24) · ×1
  • index.haGenerateRecipe (cognitive 24) REDACTED:3776 — index.haGenerateRecipe has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7 (8 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.undoTransaction (cognitive 24) · ×1
  • index.undoTransaction (cognitive 24) REDACTED:8951 — index.undoTransaction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, ternaries 3 (5 pts), error handling 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 · index.bringGetList (cognitive 24) · ×1
  • index.bringGetList (cognitive 24) REDACTED:19635 — index.bringGetList has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 3 (6 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.internalShoppingNormalizeNames (cognitive 24) · ×1
  • index.internalShoppingNormalizeNames (cognitive 24) REDACTED:22380 — index.internalShoppingNormalizeNames has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (7 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mealie.mealieSyncCache (cognitive 24) · ×1
  • mealie.mealieSyncCache (cognitive 24) api/lib/mealie.php:237 — mealie.mealieSyncCache has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._tickScanCloud (cognitive 23) · ×1
  • app._tickScanCloud (cognitive 23) REDACTED:4979 — app._tickScanCloud has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (6 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._renderBackupTab (cognitive 23) · ×1
  • app._renderBackupTab (cognitive 23) REDACTED:6272 — app._renderBackupTab has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.renderDashItem (cognitive 23) · ×1
  • app.renderDashItem (cognitive 23) REDACTED:15914 — app.renderDashItem has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 6 (7 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 · app.onEditUnitChange (cognitive 23) · ×1
  • app.onEditUnitChange (cognitive 23) REDACTED:21605 — app.onEditUnitChange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 7 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app._apiErrorText (cognitive 23) · ×1
  • app._apiErrorText (cognitive 23) REDACTED:28402 — app._apiErrorText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, boolean chains 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 · app._submitUseAllAt (cognitive 23) · ×1
  • app._submitUseAllAt (cognitive 23) REDACTED:30653 — app._submitUseAllAt has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 4 (6 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). Of this number, 15 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._extractTimerLabel (cognitive 23) · ×1
  • app._extractTimerLabel (cognitive 23) REDACTED:41819 — app._extractTimerLabel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7, loops 2 (nesting depth added 4). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch 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.listInventory (cognitive 23) · ×1
  • index.listInventory (cognitive 23) REDACTED:5677 — index.listInventory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (5 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeFinalizeIngQty (cognitive 23) · ×1
  • index.recipeFinalizeIngQty (cognitive 23) REDACTED:13788 — index.recipeFinalizeIngQty has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringCleanupObsolete (cognitive 23) · ×1
  • index.bringCleanupObsolete (cognitive 23) REDACTED:19379 — index.bringCleanupObsolete has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.auditStateSanitize (cognitive 23) · ×1
  • index.auditStateSanitize (cognitive 23) REDACTED:23287 — index.auditStateSanitize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (7 pts), loops 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_provider.aiGeminiPayloadToOpenAiMessages (cognitive 23) · ×1
  • ai_provider.aiGeminiPayloadToOpenAiMessages (cognitive 23) api/lib/ai_provider.php:120 — ai_provider.aiGeminiPayloadToOpenAiMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demo.evershelfDemoRebuild (cognitive 23) · ×1
  • demo.evershelfDemoRebuild (cognitive 23) api/lib/demo.php:253 — demo.evershelfDemoRebuild has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4, ternaries 2 (4 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._scaleHandleChoiceScreenRise (cognitive 22) · ×1
  • app._scaleHandleChoiceScreenRise (cognitive 22) REDACTED:1219 — app._scaleHandleChoiceScreenRise has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._scaleAutoFillAdd (cognitive 22) · ×1
  • app._scaleAutoFillAdd (cognitive 22) REDACTED:1283 — app._scaleAutoFillAdd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8 (nesting depth added 2). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · app._scaleUpdateStatus (cognitive 22) · ×1
  • app._scaleUpdateStatus (cognitive 22) REDACTED:1834 — app._scaleUpdateStatus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, error handling 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._applyFixedZoom (cognitive 22) · ×1
  • app._applyFixedZoom (cognitive 22) REDACTED:4663 — app._applyFixedZoom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._openAiSavedProduct (cognitive 22) · ×1
  • app._openAiSavedProduct (cognitive 22) REDACTED:5682 — app._openAiSavedProduct has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 9 (nesting depth added 3). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · app._confirmAiDetectedProduct (cognitive 22) · ×1
  • app._confirmAiDetectedProduct (cognitive 22) REDACTED:5748 — app._confirmAiDetectedProduct has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 3 (6 pts), error handling 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 · app.loadDashboard (cognitive 22) · ×1
  • app.loadDashboard (cognitive 22) REDACTED:13676 — app.loadDashboard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 27, ternaries 12 (24 pts), error handling 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (app.loadDashboard::openedRow) 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 · app.itemDetailToggleVacuum (cognitive 22) · ×1
  • app.itemDetailToggleVacuum (cognitive 22) REDACTED:18051 — app.itemDetailToggleVacuum has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app._scaleApplyToItemDetail (cognitive 22) · ×1
  • app._scaleApplyToItemDetail (cognitive 22) REDACTED:18568 — app._scaleApplyToItemDetail has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · app._showUseAllSlideConfirm (cognitive 22) · ×1
  • app._showUseAllSlideConfirm (cognitive 22) REDACTED:30421 — app._showUseAllSlideConfirm has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 3, error handling 1. Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (onPointerDown, onPointerMove, setEnabled, …). 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 · app.loadRecipeArchive (cognitive 22) · ×1
  • app.loadRecipeArchive (cognitive 22) REDACTED:36825 — app.loadRecipeArchive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (9 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 · app._spesaRemovePurchasedFromList (cognitive 22) · ×1
  • app._spesaRemovePurchasedFromList (cognitive 22) REDACTED:44767 — app._spesaRemovePurchasedFromList has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), error handling 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetupActivity.getDeviceLanIp (cognitive 22) · ×1
  • SetupActivity.getDeviceLanIp (cognitive 22) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:1639 — SetupActivity.getDeviceLanIp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 2 (3 pts), error handling 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 · index._locationDeletePersist (cognitive 22) · ×1
  • index._locationDeletePersist (cognitive 22) REDACTED:12310 — index._locationDeletePersist has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeGetServingCapForIngredient (cognitive 22) · ×1
  • index.recipeGetServingCapForIngredient (cognitive 22) REDACTED:13701 — index.recipeGetServingCapForIngredient has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 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 · index.recipeFromIngredient (cognitive 22) · ×1
  • index.recipeFromIngredient (cognitive 22) REDACTED:15352 — index.recipeFromIngredient has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.shoppingAddDepletedInternal (cognitive 22) · ×1
  • index.shoppingAddDepletedInternal (cognitive 22) REDACTED:19878 — index.shoppingAddDepletedInternal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindWordsSimilar (cognitive 22) · ×1
  • product_kind.productKindWordsSimilar (cognitive 22) api/lib/product_kind.php:1037 — product_kind.productKindWordsSimilar has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), loops 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 · product_kind.productKindApply (cognitive 22) · ×1
  • product_kind.productKindApply (cognitive 22) api/lib/product_kind.php:1357 — product_kind.productKindApply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vocabulary.vocabSameLemmaWord (cognitive 22) · ×1
  • vocabulary.vocabSameLemmaWord (cognitive 22) api/lib/vocabulary.php:407 — vocabulary.vocabSameLemmaWord has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (10 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _medPackSize (cognitive 22) · ×1
  • _medPackSize (cognitive 22) REDACTED:395 — _medPackSize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 1 (3 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 · app._checkWebappUpdate (cognitive 21) · ×1
  • app._checkWebappUpdate (cognitive 21) REDACTED:743 — app._checkWebappUpdate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 4 (6 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 754, 753, 781, …). 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 · app._submitCustomLocationRename (cognitive 21) · ×1
  • app._submitCustomLocationRename (cognitive 21) REDACTED:3523 — app._submitCustomLocationRename has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._kioskUpdateResult (cognitive 21) · ×1
  • app._kioskUpdateResult (cognitive 21) REDACTED:7633 — app._kioskUpdateResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._renderSpendSection (cognitive 21) · ×1
  • app._renderSpendSection (cognitive 21) REDACTED:10549 — app._renderSpendSection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (7 pts), ternaries 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._openCaptureSheetInner (cognitive 21) · ×1
  • app._openCaptureSheetInner (cognitive 21) REDACTED:11318 — app._openCaptureSheetInner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._setScanStatus (cognitive 21) · ×1
  • app._setScanStatus (cognitive 21) REDACTED:22119 — app._setScanStatus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._medFillFromCatalogue (cognitive 21) · ×1
  • app._medFillFromCatalogue (cognitive 21) REDACTED:24016 — app._medFillFromCatalogue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 4 (nesting depth added 1). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, 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 · app._medStockAddDirect (cognitive 21) · ×1
  • app._medStockAddDirect (cognitive 21) REDACTED:26353 — app._medStockAddDirect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · app._maybeStartUseFormIdleCountdown (cognitive 21) · ×1
  • app._maybeStartUseFormIdleCountdown (cognitive 21) REDACTED:29875 — app._maybeStartUseFormIdleCountdown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6 (nesting depth added 3). Of this number, 15 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.startCookingMode (cognitive 21) · ×1
  • app.startCookingMode (cognitive 21) REDACTED:39863 — app.startCookingMode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · app.spesaModeAfterAdd (cognitive 21) · ×1
  • app.spesaModeAfterAdd (cognitive 21) REDACTED:44709 — app.spesaModeAfterAdd has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (8 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._setupSteps (cognitive 21) · ×1
  • app._setupSteps (cognitive 21) REDACTED:45460 — app._setupSteps has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 9, loops 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 45507, 45625, 45465, …). 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 · audit._auditAnswer (cognitive 21) · ×1
  • audit._auditAnswer (cognitive 21) assets/js/audit.js:2227 — audit._auditAnswer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 6 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 · audit._auditReopen (cognitive 21) · ×1
  • audit._auditReopen (cognitive 21) assets/js/audit.js:2381 — audit._auditReopen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getMacroStats (cognitive 21) · ×1
  • index.getMacroStats (cognitive 21) REDACTED:9837 — index.getMacroStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index._resolveShoppingPriceItem (cognitive 21) · ×1
  • index._resolveShoppingPriceItem (cognitive 21) REDACTED:24792 — index._resolveShoppingPriceItem has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · i18n.evershelfTr (cognitive 21) · ×1
  • i18n.evershelfTr (cognitive 21) api/lib/i18n.php:18 — i18n.evershelfTr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · medical.medicalCodeMatches (cognitive 21) · ×1
  • medical.medicalCodeMatches (cognitive 21) api/lib/medical.php:618 — medical.medicalCodeMatches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 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 · recipe_shopping.evershelfIngredientStock (cognitive 21) · ×1
  • recipe_shopping.evershelfIngredientStock (cognitive 21) api/lib/recipe_shopping.php:222 — recipe_shopping.evershelfIngredientStock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · security.evershelfTtsUrlAllowed (cognitive 21) · ×1
  • security.evershelfTtsUrlAllowed (cognitive 21) api/lib/security.php:610 — security.evershelfTtsUrlAllowed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shopping_sync.evershelfShoppingRowStillNeeded (cognitive 21) · ×1
  • shopping_sync.evershelfShoppingRowStillNeeded (cognitive 21) api/lib/shopping_sync.php:336 — shopping_sync.evershelfShoppingRowStillNeeded has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _ssViewMeal (cognitive 21) · ×1
  • _ssViewMeal (cognitive 21) assets/js/screensaver.js:273 — _ssViewMeal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 3 (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 · app._renderImportPreview (cognitive 20) · ×1
  • app._renderImportPreview (cognitive 20) REDACTED:2708 — app._renderImportPreview has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 3, ternaries 3. Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.removeLocation (cognitive 20) · ×1
  • app.removeLocation (cognitive 20) REDACTED:3654 — app.removeLocation has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._shopRowIsMedical (cognitive 20) · ×1
  • app._shopRowIsMedical (cognitive 20) REDACTED:3810 — app._shopRowIsMedical has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, ternaries 4 (6 pts), if/else 5 (nesting depth added 2). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 3821, flag, a function literal at line 3819). 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 · app._openedPao (cognitive 20) · ×1
  • app._openedPao (cognitive 20) REDACTED:4113 — app._openedPao has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.saveCalendarSettings (cognitive 20) · ×1
  • app.saveCalendarSettings (cognitive 20) REDACTED:8661 — app.saveCalendarSettings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._aiCostPillPaint (cognitive 20) · ×1
  • app._aiCostPillPaint (cognitive 20) REDACTED:9623 — app._aiCostPillPaint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · app.filterInventory (cognitive 20) · ×1
  • app.filterInventory (cognitive 20) REDACTED:17472 — app.filterInventory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). Of this number, 17 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 · app.adjustUseQty (cognitive 20) · ×1
  • app.adjustUseQty (cognitive 20) REDACTED:29186 — app.adjustUseQty has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._lookupCatalogShoppingName (cognitive 20) · ×1
  • app._lookupCatalogShoppingName (cognitive 20) REDACTED:31902 — app._lookupCatalogShoppingName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 5). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.addSmartToBring (cognitive 20) · ×1
  • app.addSmartToBring (cognitive 20) REDACTED:33536 — app.addSmartToBring has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._recipeUseHeadHtml (cognitive 20) · ×1
  • app._recipeUseHeadHtml (cognitive 20) REDACTED:37960 — app._recipeUseHeadHtml has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._cookingVoiceStart (cognitive 20) · ×1
  • app._cookingVoiceStart (cognitive 20) REDACTED:39665 — app._cookingVoiceStart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · audit._auditOtherPacksHtml (cognitive 20) · ×1
  • audit._auditOtherPacksHtml (cognitive 20) assets/js/audit.js:1277 — audit._auditOtherPacksHtml has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 7, if/else 1. Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 1283). 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 · http.requestListener (cognitive 20) · ×1
  • http.requestListener (cognitive 20) mcp-server/src/http.js:28 — http.requestListener has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KioskActivity.onRequestPermissionsResult (cognitive 20) · ×1
  • KioskActivity.onRequestPermissionsResult (cognitive 20) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:508 — KioskActivity.onRequestPermissionsResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KioskActivity.installApk (cognitive 20) · ×1
  • KioskActivity.installApk (cognitive 20) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1485 — KioskActivity.installApk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetupActivity.bindViews (cognitive 20) · ×1
  • SetupActivity.bindViews (cognitive 20) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:258 — SetupActivity.bindViews has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, match/switch 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 · index.geminiChatPharmacyMedicines (cognitive 20) · ×1
  • index.geminiChatPharmacyMedicines (cognitive 20) REDACTED:13063 — index.geminiChatPharmacyMedicines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (5 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeParseGeminiJson (cognitive 20) · ×1
  • index.recipeParseGeminiJson (cognitive 20) REDACTED:14137 — index.recipeParseGeminiJson has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.createLocalBackup (cognitive 20) · ×1
  • index.createLocalBackup (cognitive 20) REDACTED:16885 — index.createLocalBackup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 3 (5 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.bringIsPurchasedBlocked (cognitive 20) · ×1
  • index.bringIsPurchasedBlocked (cognitive 20) REDACTED:18647 — index.bringIsPurchasedBlocked has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.bringAutoAddCritical (cognitive 20) · ×1
  • index.bringAutoAddCritical (cognitive 20) REDACTED:19448 — index.bringAutoAddCritical has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.smartFloorPieceSuggestion (cognitive 20) · ×1
  • index.smartFloorPieceSuggestion (cognitive 20) REDACTED:20687 — index.smartFloorPieceSuggestion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (10 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 · index.templatesSave (cognitive 20) · ×1
  • index.templatesSave (cognitive 20) REDACTED:22799 — index.templatesSave has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (9 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 · env.evershelfWriteEnvFile (cognitive 20) · ×1
  • env.evershelfWriteEnvFile (cognitive 20) api/lib/env.php:319 — env.evershelfWriteEnvFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 3, 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 · mealie_setup.mealieDiscoveryCandidates (cognitive 20) · ×1
  • mealie_setup.mealieDiscoveryCandidates (cognitive 20) api/lib/mealie_setup.php:68 — mealie_setup.mealieDiscoveryCandidates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 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 · mealie_setup.mealieInstall (cognitive 20) · ×1
  • mealie_setup.mealieInstall (cognitive 20) api/lib/mealie_setup.php:348 — mealie_setup.mealieInstall has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · medical.medicalPaoRules (cognitive 20) · ×1
  • medical.medicalPaoRules (cognitive 20) api/lib/medical.php:670 — medical.medicalPaoRules has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qr.evershelfQrPlaceData (cognitive 20) · ×1
  • qr.evershelfQrPlaceData (cognitive 20) api/lib/qr.php:352 — qr.evershelfQrPlaceData has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (7 pts), ternaries 2 (7 pts), if/else 2 (6 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 · weather.weatherFetchCurrent (cognitive 20) · ×1
  • weather.weatherFetchCurrent (cognitive 20) REDACTED:123 — weather.weatherFetchCurrent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, ternaries 5 (6 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleTool (cognitive 20) · ×1
  • handleTool (cognitive 20) mcp-server/src/create-server.js:128 — handleTool has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), other 3, match/switch 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · app.guessLocation (cognitive 19) · ×1
  • app.guessLocation (cognitive 19) REDACTED:4549 — app.guessLocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._tryGeminiNumberOCR (cognitive 19) · ×1
  • app._tryGeminiNumberOCR (cognitive 19) REDACTED:5277 — app._tryGeminiNumberOCR has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._bannerPriority (cognitive 19) · ×1
  • app._bannerPriority (cognitive 19) REDACTED:14598 — app._bannerPriority has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._itemDetailOtherPlacesHtml (cognitive 19) · ×1
  • app._itemDetailOtherPlacesHtml (cognitive 19) REDACTED:17723 — app._itemDetailOtherPlacesHtml has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (6 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 17737, 17733, 17730, …). 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 · app._medImportCatalogFile (cognitive 19) · ×1
  • app._medImportCatalogFile (cognitive 19) REDACTED:19062 — app._medImportCatalogFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app._medDebugPanel (cognitive 19) · ×1
  • app._medDebugPanel (cognitive 19) REDACTED:23885 — app._medDebugPanel has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 5, if/else 3 (4 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23887, 23905, 23890). 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 · app.createQuickProduct (cognitive 19) · ×1
  • app.createQuickProduct (cognitive 19) REDACTED:25970 — app.createQuickProduct has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 2 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 26003). 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 · app.saveAIProductDirect (cognitive 19) · ×1
  • app.saveAIProductDirect (cognitive 19) REDACTED:31060 — app.saveAIProductDirect has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.speakCookingStep (cognitive 19) · ×1
  • app.speakCookingStep (cognitive 19) REDACTED:40445 — app.speakCookingStep has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app.saveNotifySettings (cognitive 19) · ×1
  • app.saveNotifySettings (cognitive 19) REDACTED:41085 — app.saveNotifySettings has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 1 (2 pts), error handling 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 · app._applyOptimisticUpdate (cognitive 19) · ×1
  • app._applyOptimisticUpdate (cognitive 19) REDACTED:43660 — app._applyOptimisticUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._hideNetworkOverlay (cognitive 19) · ×1
  • app._hideNetworkOverlay (cognitive 19) REDACTED:43820 — app._hideNetworkOverlay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 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 · app._showFamilySiblingSuggest (cognitive 19) · ×1
  • app._showFamilySiblingSuggest (cognitive 19) REDACTED:44891 — app._showFamilySiblingSuggest has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 44896, 44940, 44943). 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 · audit._auditStateBlob (cognitive 19) · ×1
  • audit._auditStateBlob (cognitive 19) assets/js/audit.js:328 — audit._auditStateBlob has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 16, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · audit._auditMedOpen (cognitive 19) · ×1
  • audit._auditMedOpen (cognitive 19) assets/js/audit.js:2182 — audit._auditMedOpen has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 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 · audit._auditFlush · ×1
  • audit._auditFlush::send (cognitive 19) assets/js/audit.js:2453 — audit._auditFlush::send has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncEngine.syncNow (cognitive 19) · ×1
  • SyncEngine.syncNow (cognitive 19) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/SyncEngine.kt:39 — SyncEngine.syncNow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Updater.check (cognitive 19) · ×1
  • Updater.check (cognitive 19) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Updater.kt:32 — Updater.check has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.checkRateLimit (cognitive 19) · ×1
  • index.checkRateLimit (cognitive 19) REDACTED:139 — index.checkRateLimit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.confirmFinishedCore (cognitive 19) · ×1
  • index.confirmFinishedCore (cognitive 19) REDACTED:8614 — index.confirmFinishedCore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (6 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getInventoryAnomalies (cognitive 19) · ×1
  • index.getInventoryAnomalies (cognitive 19) REDACTED:9079 — index.getInventoryAnomalies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.recipeScrubUnavailableMentionsInSteps (cognitive 19) · ×1
  • index.recipeScrubUnavailableMentionsInSteps (cognitive 19) REDACTED:13992 — index.recipeScrubUnavailableMentionsInSteps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.searchOpenFoodFacts (cognitive 19) · ×1
  • index.searchOpenFoodFacts (cognitive 19) REDACTED:16121 — index.searchOpenFoodFacts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindRewriteNameNumber (cognitive 19) · ×1
  • product_kind.productKindRewriteNameNumber (cognitive 19) api/lib/product_kind.php:292 — product_kind.productKindRewriteNameNumber has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 2, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qr.evershelfQrMatrix (cognitive 19) · ×1
  • qr.evershelfQrMatrix (cognitive 19) api/lib/qr.php:37 — qr.evershelfQrMatrix has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sale_units.saleUnitRuleFor (cognitive 19) · ×1
  • sale_units.saleUnitRuleFor (cognitive 19) api/lib/sale_units.php:55 — sale_units.saleUnitRuleFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shopping_guards.shoppingQtyToConfPacks (cognitive 19) · ×1
  • shopping_guards.shoppingQtyToConfPacks (cognitive 19) api/lib/shopping_guards.php:188 — shopping_guards.shoppingQtyToConfPacks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._confirmImportInventory (cognitive 18) · ×1
  • app._confirmImportInventory (cognitive 18) REDACTED:2776 — app._confirmImportInventory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._locMacroBarHtml (cognitive 18) · ×1
  • app._locMacroBarHtml (cognitive 18) REDACTED:3184 — app._locMacroBarHtml has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 7. Of this number, 14 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, 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 · app._showAiMatchChoices (cognitive 18) · ×1
  • app._showAiMatchChoices (cognitive 18) REDACTED:5441 — app._showAiMatchChoices has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, if/else 2, 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 · app._paintKioskVersion (cognitive 18) · ×1
  • app._paintKioskVersion (cognitive 18) REDACTED:7800 — app._paintKioskVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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 · app._aiCostFmtMoney (cognitive 18) · ×1
  • app._aiCostFmtMoney (cognitive 18) REDACTED:9602 — app._aiCostFmtMoney has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.freezeInventoryItem (cognitive 18) · ×1
  • app.freezeInventoryItem (cognitive 18) REDACTED:15295 — app.freezeInventoryItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.formatQuantity (cognitive 18) · ×1
  • app.formatQuantity (cognitive 18) REDACTED:16190 — app.formatQuantity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8 (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 · app.loadInventory (cognitive 18) · ×1
  • app.loadInventory (cognitive 18) REDACTED:16402 — app.loadInventory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 3, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._currentProductFromExternal (cognitive 18) · ×1
  • app._currentProductFromExternal (cognitive 18) REDACTED:24949 — app._currentProductFromExternal has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 18. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.editProductFromAction (cognitive 18) · ×1
  • app.editProductFromAction (cognitive 18) REDACTED:26937 — app.editProductFromAction has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._renderUseExpiryHint (cognitive 18) · ×1
  • app._renderUseExpiryHint (cognitive 18) REDACTED:28851 — app._renderUseExpiryHint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 2 (3 pts) (nesting depth added 1). 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, 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 · app._floorPieceSuggestion (cognitive 18) · ×1
  • app._floorPieceSuggestion (cognitive 18) REDACTED:31532 — app._floorPieceSuggestion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.parseQtyFromSpec (cognitive 18) · ×1
  • app.parseQtyFromSpec (cognitive 18) REDACTED:32798 — app.parseQtyFromSpec has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.migrateBringNames (cognitive 18) · ×1
  • app.migrateBringNames (cognitive 18) REDACTED:33508 — app.migrateBringNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, error handling 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 · app._syncTagsFromBringSpec (cognitive 18) · ×1
  • app._syncTagsFromBringSpec (cognitive 18) REDACTED:33615 — app._syncTagsFromBringSpec has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.renderCookingStep (cognitive 18) · ×1
  • app.renderCookingStep (cognitive 18) REDACTED:40262 — app.renderCookingStep has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._spesaSessionFieldChange (cognitive 18) · ×1
  • app._spesaSessionFieldChange (cognitive 18) REDACTED:44621 — app._spesaSessionFieldChange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._getMissingSetupSteps (cognitive 18) · ×1
  • app._getMissingSetupSteps (cognitive 18) REDACTED:45411 — app._getMissingSetupSteps has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · audit._auditScanStart (cognitive 18) · ×1
  • audit._auditScanStart (cognitive 18) assets/js/audit.js:1133 — audit._auditScanStart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 5 (7 pts), boolean chains 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · vocab.vocabIsPreparedSalad (cognitive 18) · ×1
  • vocab.vocabIsPreparedSalad (cognitive 18) assets/js/core/vocab.js:201 — vocab.vocabIsPreparedSalad has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · receipt._receiptConfirm (cognitive 18) · ×1
  • receipt._receiptConfirm (cognitive 18) assets/js/receipt.js:161 — receipt._receiptConfirm has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1, 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 · SetupActivity.requestPermissions (cognitive 18) · ×1
  • SetupActivity.requestPermissions (cognitive 18) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:743 — SetupActivity.requestPermissions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (18 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 · database.estimateSealedExpiryDaysPHP (cognitive 18) · ×1
  • database.estimateSealedExpiryDaysPHP (cognitive 18) api/database.php:1463 — database.estimateSealedExpiryDaysPHP has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.exportInventory (cognitive 18) · ×1
  • index.exportInventory (cognitive 18) REDACTED:1808 — index.exportInventory has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (14 pts), loops 2 (3 pts), if/else 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 · index.getSpendStats (cognitive 18) · ×1
  • index.getSpendStats (cognitive 18) REDACTED:9771 — index.getSpendStats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (6 pts), loops 3, 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 · index.recipeResolvePieceQty (cognitive 18) · ×1
  • index.recipeResolvePieceQty (cognitive 18) REDACTED:13657 — index.recipeResolvePieceQty has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 6, if/else 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.smartShoppingCached (cognitive 18) · ×1
  • index.smartShoppingCached (cognitive 18) REDACTED:20220 — index.smartShoppingCached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index._productOnBring (cognitive 18) · ×1
  • index._productOnBring (cognitive 18) REDACTED:20298 — index._productOnBring has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.shoppingRecalibrateUrgency (cognitive 18) · ×1
  • index.shoppingRecalibrateUrgency (cognitive 18) REDACTED:20884 — index.shoppingRecalibrateUrgency has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · calendar_ics.evershelfIcsBuild (cognitive 18) · ×1
  • calendar_ics.evershelfIcsBuild (cognitive 18) REDACTED:172 — calendar_ics.evershelfIcsBuild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · notify.evershelfNotifySend (cognitive 18) · ×1
  • notify.evershelfNotifySend (cognitive 18) api/lib/notify.php:465 — notify.evershelfNotifySend has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · open_prices.evershelfOpenPricesLookup (cognitive 18) · ×1
  • open_prices.evershelfOpenPricesLookup (cognitive 18) api/lib/open_prices.php:37 — open_prices.evershelfOpenPricesLookup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindNameAlreadyHasKind (cognitive 18) · ×1
  • product_kind.productKindNameAlreadyHasKind (cognitive 18) api/lib/product_kind.php:1098 — product_kind.productKindNameAlreadyHasKind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 pts), boolean chains 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · seasonal.forgottenExpiringItems (cognitive 18) · ×1
  • seasonal.forgottenExpiringItems (cognitive 18) api/lib/seasonal.php:854 — seasonal.forgottenExpiringItems has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · telegram.telegramWebhookHandle (cognitive 18) · ×1
  • telegram.telegramWebhookHandle (cognitive 18) api/lib/telegram.php:27 — telegram.telegramWebhookHandle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, ternaries 2 (3 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 · scale_relay.wsRead (cognitive 18) · ×1
  • scale_relay.wsRead (cognitive 18) api/scale_relay.php:190 — scale_relay.wsRead has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _auditSearchMoveHere (cognitive 18) · ×1
  • _auditSearchMoveHere (cognitive 18) assets/js/audit.js:960 — _auditSearchMoveHere has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._scaleDensityForProduct (cognitive 17) · ×1
  • app._scaleDensityForProduct (cognitive 17) REDACTED:1330 — app._scaleDensityForProduct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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 · app._onImportFileSelected (cognitive 17) · ×1
  • app._onImportFileSelected (cognitive 17) REDACTED:2661 — app._onImportFileSelected has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._aiStorageFields (cognitive 17) · ×1
  • app._aiStorageFields (cognitive 17) REDACTED:5580 — app._aiStorageFields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._applySyncedSettings (cognitive 17) · ×1
  • app._applySyncedSettings (cognitive 17) REDACTED:6160 — app._applySyncedSettings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app._gdriveSubmitCode (cognitive 17) · ×1
  • app._gdriveSubmitCode (cognitive 17) REDACTED:6451 — app._gdriveSubmitCode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.itemDetailToggleOpened (cognitive 17) · ×1
  • app.itemDetailToggleOpened (cognitive 17) REDACTED:17804 — app.itemDetailToggleOpened has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app._itemDetailMedSummaryHtml (cognitive 17) · ×1
  • app._itemDetailMedSummaryHtml (cognitive 17) REDACTED:18368 — app._itemDetailMedSummaryHtml has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2 (4 pts) (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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 · app._medOpenSearch (cognitive 17) · ×1
  • app._medOpenSearch (cognitive 17) REDACTED:20382 — app._medOpenSearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._submitWasteRecord (cognitive 17) · ×1
  • app._submitWasteRecord (cognitive 17) REDACTED:20850 — app._submitWasteRecord has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: 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 · app._medFormStockPrefill (cognitive 17) · ×1
  • app._medFormStockPrefill (cognitive 17) REDACTED:25765 — app._medFormStockPrefill has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.scanBarcodeForForm (cognitive 17) · ×1
  • app.scanBarcodeForForm (cognitive 17) REDACTED:26187 — app.scanBarcodeForForm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (scanFrame, stopStream, a function literal at line 26235). 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 · app._showMovePrompt (cognitive 17) · ×1
  • app._showMovePrompt (cognitive 17) REDACTED:30112 — app._showMovePrompt has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8, if/else 6 (7 pts), boolean chains 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: 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 · app._saveVacuumAndStay (cognitive 17) · ×1
  • app._saveVacuumAndStay (cognitive 17) REDACTED:30265 — app._saveVacuumAndStay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.submitUseAll (cognitive 17) · ×1
  • app.submitUseAll (cognitive 17) REDACTED:30347 — app.submitUseAll has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 3 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · app._pfAiAnalyze (cognitive 17) · ×1
  • app._pfAiAnalyze (cognitive 17) REDACTED:31205 — app._pfAiAnalyze has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._capPricePayloadQty (cognitive 17) · ×1
  • app._capPricePayloadQty (cognitive 17) REDACTED:31589 — app._capPricePayloadQty has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 6, if/else 4 (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 · app._initSmartSuggestedChips (cognitive 17) · ×1
  • app._initSmartSuggestedChips (cognitive 17) REDACTED:33347 — app._initSmartSuggestedChips has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._shopRowBought (cognitive 17) · ×1
  • app._shopRowBought (cognitive 17) REDACTED:34229 — app._shopRowBought has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (4 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.applyShoppingTemplate (cognitive 17) · ×1
  • app.applyShoppingTemplate (cognitive 17) REDACTED:35127 — app.applyShoppingTemplate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._recipeArchiveMissingInfo (cognitive 17) · ×1
  • app._recipeArchiveMissingInfo (cognitive 17) REDACTED:36608 — app._recipeArchiveMissingInfo has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts) (nesting depth added 1). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 36613, 36635). 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 · app._normalizeRecipeIngQtyNumber (cognitive 17) · ×1
  • app._normalizeRecipeIngQtyNumber (cognitive 17) REDACTED:37401 — app._normalizeRecipeIngQtyNumber has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._cookingHighlightText (cognitive 17) · ×1
  • app._cookingHighlightText (cognitive 17) REDACTED:40150 — app._cookingHighlightText has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5, loops 1. Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 40171, a function literal at line 40161, collect, …). 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 · app._syncOfflineQueue (cognitive 17) · ×1
  • app._syncOfflineQueue (cognitive 17) REDACTED:43770 — app._syncOfflineQueue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 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 · app._spesaBannerStat (cognitive 17) · ×1
  • app._spesaBannerStat (cognitive 17) REDACTED:44951 — app._spesaBannerStat has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 7, if/else 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · audit._auditHitFactsHtml (cognitive 17) · ×1
  • audit._auditHitFactsHtml (cognitive 17) assets/js/audit.js:802 — audit._auditHitFactsHtml has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · audit._auditAssignMatches (cognitive 17) · ×1
  • audit._auditAssignMatches (cognitive 17) assets/js/audit.js:1590 — audit._auditAssignMatches has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit.document.addEventListener("keydown") (cognitive 17) · ×1
  • audit.document.addEventListener("keydown") (cognitive 17) assets/js/audit.js:2621 — audit.document.addEventListener("keydown") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · vocab.vocabCategoryOfName (cognitive 17) · ×1
  • vocab.vocabCategoryOfName (cognitive 17) assets/js/core/vocab.js:134 — vocab.vocabCategoryOfName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardFragment.refresh (cognitive 17) · ×1
  • DashboardFragment.refresh (cognitive 17) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/DashboardFragment.kt:90 — DashboardFragment.refresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 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 · index.consolidateDuplicateProducts (cognitive 17) · ×1
  • index.consolidateDuplicateProducts (cognitive 17) REDACTED:8360 — index.consolidateDuplicateProducts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.getServerSettings (cognitive 17) · ×1
  • index.getServerSettings (cognitive 17) REDACTED:10295 — index.getServerSettings has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 4, error handling 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 · index._shoppingNameCacheEntry (cognitive 17) · ×1
  • index._shoppingNameCacheEntry (cognitive 17) REDACTED:16490 — index._shoppingNameCacheEntry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.internalShoppingRetitleFamilies (cognitive 17) · ×1
  • index.internalShoppingRetitleFamilies (cognitive 17) REDACTED:22612 — index.internalShoppingRetitleFamilies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index._createOrCommentGithubIssue (cognitive 17) · ×1
  • index._createOrCommentGithubIssue (cognitive 17) REDACTED:24041 — index._createOrCommentGithubIssue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 6 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · health.healthGetDaily (cognitive 17) · ×1
  • health.healthGetDaily (cognitive 17) api/lib/health.php:299 — health.healthGetDaily has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · medical.medicalMatchSymptom (cognitive 17) · ×1
  • medical.medicalMatchSymptom (cognitive 17) api/lib/medical.php:102 — medical.medicalMatchSymptom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · medicines.medicineSearchWithTokens (cognitive 17) · ×1
  • medicines.medicineSearchWithTokens (cognitive 17) api/lib/medicines.php:563 — medicines.medicineSearchWithTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), ternaries 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monthly_report.evershelfMonthlyReportData (cognitive 17) · ×1
  • monthly_report.evershelfMonthlyReportData (cognitive 17) REDACTED:64 — monthly_report.evershelfMonthlyReportData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monthly_report.evershelfMonthlyReportHtml (cognitive 17) · ×1
  • monthly_report.evershelfMonthlyReportHtml (cognitive 17) REDACTED:149 — monthly_report.evershelfMonthlyReportHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4 (5 pts), loops 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · vocabulary.vocabIsPreparedSalad (cognitive 17) · ×1
  • vocabulary.vocabIsPreparedSalad (cognitive 17) api/lib/vocabulary.php:322 — vocabulary.vocabIsPreparedSalad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 17) · ×1
  • (anonymous) (cognitive 17) assets/js/audit.js:2621 — (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _ssAlertRows (cognitive 17) · ×1
  • _ssAlertRows (cognitive 17) assets/js/screensaver.js:344 — _ssAlertRows has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 3. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 357, push, a function literal at line 373, …). 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 · _medChoiceCandidates (cognitive 17) · ×1
  • _medChoiceCandidates (cognitive 17) REDACTED:212 — _medChoiceCandidates has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (6 pts), if/else 2 (3 pts), loops 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: 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 · _supportOptionCardsHtml (cognitive 17) · ×1
  • _supportOptionCardsHtml (cognitive 17) assets/js/core/support.js:204 — _supportOptionCardsHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.updateScaleReadButtons (cognitive 16) · ×1
  • app.updateScaleReadButtons (cognitive 16) REDACTED:2154 — app.updateScaleReadButtons has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 3, error handling 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 · app._gdrivePushNow (cognitive 16) · ×1
  • app._gdrivePushNow (cognitive 16) REDACTED:6396 — app._gdrivePushNow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._freeApiActive (cognitive 16) · ×1
  • app._freeApiActive (cognitive 16) REDACTED:6812 — app._freeApiActive has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), 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 · app._refreshKioskApkLinks (cognitive 16) · ×1
  • app._refreshKioskApkLinks (cognitive 16) REDACTED:7601 — app._refreshKioskApkLinks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.loadSeasonalReview (cognitive 16) · ×1
  • app.loadSeasonalReview (cognitive 16) REDACTED:14078 — app.loadSeasonalReview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, 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 · app._medMarkOpened (cognitive 16) · ×1
  • app._medMarkOpened (cognitive 16) REDACTED:20093 — app._medMarkOpened has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 5, boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.checkInventoryForProduct (cognitive 16) · ×1
  • app.checkInventoryForProduct (cognitive 16) REDACTED:26912 — app.checkInventoryForProduct has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 1 (2 pts), ternaries 2, error handling 1 (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app._localizeSmartReason (cognitive 16) · ×1
  • app._localizeSmartReason (cognitive 16) REDACTED:33663 — app._localizeSmartReason has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 3, match/switch 1. Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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 · app._doUndoTransaction (cognitive 16) · ×1
  • app._doUndoTransaction (cognitive 16) REDACTED:35812 — app._doUndoTransaction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.saveRecipeToArchive (cognitive 16) · ×1
  • app.saveRecipeToArchive (cognitive 16) REDACTED:36170 — app.saveRecipeToArchive has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 2, error handling 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 · app.createHealthBridgeToken (cognitive 16) · ×1
  • app.createHealthBridgeToken (cognitive 16) REDACTED:37301 — app.createHealthBridgeToken has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), error handling 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._recipeResolvePieceQty (cognitive 16) · ×1
  • app._recipeResolvePieceQty (cognitive 16) REDACTED:37448 — app._recipeResolvePieceQty has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 5, if/else 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._updateRecipeStockHintsAfterScale (cognitive 16) · ×1
  • app._updateRecipeStockHintsAfterScale (cognitive 16) REDACTED:37721 — app._updateRecipeStockHintsAfterScale has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 37723). 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 · app._buildTtsRequest (cognitive 16) · ×1
  • app._buildTtsRequest (cognitive 16) REDACTED:40372 — app._buildTtsRequest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 5, error handling 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 · app._applyHaSettingsUI (cognitive 16) · ×1
  • app._applyHaSettingsUI (cognitive 16) REDACTED:40506 — app._applyHaSettingsUI has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.testHaConnection (cognitive 16) · ×1
  • app.testHaConnection (cognitive 16) REDACTED:40607 — app.testHaConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 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 · app._initBrowserTtsVoices (cognitive 16) · ×1
  • app._initBrowserTtsVoices (cognitive 16) REDACTED:41298 — app._initBrowserTtsVoices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (populate, a function literal at line 41349, a function literal at line 41320, …). 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 · app._speakBrowser (cognitive 16) · ×1
  • app._speakBrowser (cognitive 16) REDACTED:41449 — app._speakBrowser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 2). Of this number, 11 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app._updateMealieSetupStatus (cognitive 16) · ×1
  • app._updateMealieSetupStatus (cognitive 16) REDACTED:42430 — app._updateMealieSetupStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (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 · app._applyShoppingOptimisticUpdate (cognitive 16) · ×1
  • app._applyShoppingOptimisticUpdate (cognitive 16) REDACTED:43689 — app._applyShoppingOptimisticUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit._auditStartPaint (cognitive 16) · ×1
  • audit._auditStartPaint (cognitive 16) assets/js/audit.js:588 — audit._auditStartPaint has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit._auditRevertEntry (cognitive 16) · ×1
  • audit._auditRevertEntry (cognitive 16) assets/js/audit.js:2313 — audit._auditRevertEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 4). 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 · med._medOcrDigitCandidates (cognitive 16) · ×1
  • med._medOcrDigitCandidates (cognitive 16) REDACTED:343 — med._medOcrDigitCandidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.inventoryImportAddStock (cognitive 16) · ×1
  • index.inventoryImportAddStock (cognitive 16) REDACTED:2596 — index.inventoryImportAddStock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.recordShelfLifeSample (cognitive 16) · ×1
  • index.recordShelfLifeSample (cognitive 16) REDACTED:6358 — index.recordShelfLifeSample has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index._spendLoadHistory (cognitive 16) · ×1
  • index._spendLoadHistory (cognitive 16) REDACTED:9695 — index._spendLoadHistory has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 1, 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 · index.recipeItemExpiryPriority (cognitive 16) · ×1
  • index.recipeItemExpiryPriority (cognitive 16) REDACTED:14787 — index.recipeItemExpiryPriority has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.bringRemoveByNames (cognitive 16) · ×1
  • index.bringRemoveByNames (cognitive 16) REDACTED:18482 — index.bringRemoveByNames has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.internalShoppingPruneCovered (cognitive 16) · ×1
  • index.internalShoppingPruneCovered (cognitive 16) REDACTED:22459 — index.internalShoppingPruneCovered has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 · product_family.familyAttachToRows (cognitive 16) · ×1
  • product_family.familyAttachToRows (cognitive 16) api/lib/product_family.php:29 — product_family.familyAttachToRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 5, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · product_kind.productKindShoppingGeneric (cognitive 16) · ×1
  • product_kind.productKindShoppingGeneric (cognitive 16) api/lib/product_kind.php:663 — product_kind.productKindShoppingGeneric has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _promptPairingCode (cognitive 16) · ×1
  • _promptPairingCode (cognitive 16) assets/js/core/auth.js:97 — _promptPairingCode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (6 pts), boolean chains 1, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (submit, a function literal at line 139). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (159 shared lines) · ×1
  • Near-duplicate member pair (159 shared lines) REDACTED:14845 — REDACTED:14845-15165 | REDACTED:15468-15786 — These two members are variants of one another: 159 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:432 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/ErrorReporter.kt:432-490 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1356-1370 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:19158 — REDACTED:19158-19239 | REDACTED:19244-19303 | REDACTED:19380-19441 | REDACTED:19449-19495 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (79 corresponding lines) · ×1
  • Edited copy of a member (79 corresponding lines) REDACTED:24229 — REDACTED:24229-24307 | REDACTED:24321-24401 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) REDACTED:19576 — REDACTED:19576-19632 | REDACTED:22460-22520 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) REDACTED:8896 — REDACTED:8896-8921 | REDACTED:8929-8948 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) REDACTED:20069 — REDACTED:20069-20103 | REDACTED:20187-20210 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:105 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:105-120 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:122-142 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthDb.kt:147-167 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) REDACTED:3172 — REDACTED:3172-3205 | REDACTED:3211-3262 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) api/lib/medical.php:391 — api/lib/medical.php:391-412 | api/lib/medical.php:418-433 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/DiaryFragment.kt:133 — evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/DiaryFragment.kt:133-154 | evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/WizardActivity.kt:512-530 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) REDACTED:11604 — REDACTED:11604-11621 | scripts/gen-free-apis-js.php:59-78 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) REDACTED:17549 — REDACTED:17549-17552 | REDACTED:17911-17917 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:18527 — REDACTED:18527-18541 | REDACTED:18597-18610 | REDACTED:18811-18819 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) api/lib/mealie.php:72 — api/lib/mealie.php:72-82 | api/lib/mealie.php:94-101 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) api/lib/pao_overrides.php:159 — api/lib/pao_overrides.php:159-187 | api/lib/pao_overrides.php:197-210 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) api/lib/mealie.php:23 — api/lib/mealie.php:23-24 | api/lib/open_prices.php:13-14 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1694 — evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1694-1703 | evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1759-1768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:1694` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (46–52 lines × 2) · ×1
  • Duplicated block (46–52 lines × 2) REDACTED:14926 — REDACTED:14926-14977 | REDACTED:15588-15633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:14926` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (29–33 lines × 2) · ×1
  • Duplicated block (29–33 lines × 2) REDACTED:14880 — REDACTED:14880-14912 | REDACTED:15529-15557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–26 lines × 2) · ×1
  • Duplicated block (22–26 lines × 2) REDACTED:19605 — REDACTED:19605-19630 | REDACTED:22488-22509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:19605` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) REDACTED:10196 — REDACTED:10196-10220 | REDACTED:10224-10248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:10196` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) REDACTED:17592 — REDACTED:17592-17611 | REDACTED:17616-17638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:17592` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) api/database.php:636 — api/database.php:636-657 | api/database.php:704-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:636` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) api/database.php:341 — api/database.php:341-363 | api/database.php:797-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) api/database.php:472 — api/database.php:472-491 | api/database.php:515-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) REDACTED:14987 — REDACTED:14987-15006 | REDACTED:15640-15657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:14987` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) REDACTED:8265 — REDACTED:8265-8280 | REDACTED:8284-8302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–19 lines × 2) · ×1
  • Duplicated block (12–19 lines × 2) REDACTED:15107 — REDACTED:15107-15125 | REDACTED:15699-15710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:15107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) REDACTED:8125 — REDACTED:8125-8142 | REDACTED:8167-8183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:8125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–15 lines × 3) · ×1
  • Duplicated block (13–15 lines × 3) REDACTED:19333 — REDACTED:19333-19346 | REDACTED:20073-20087 | REDACTED:20191-20203 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:19333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:20072` calls `info` and `REDACTED:19332` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) REDACTED:5174 — REDACTED:5174-5185 | REDACTED:7289-7302 | REDACTED:22858-22869 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:22856` calls `trim` and `REDACTED:7287` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) REDACTED:15017 — REDACTED:15017-15030 | REDACTED:15660-15671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–26 lines × 2) · ×1
  • Duplicated block (19–26 lines × 2) REDACTED:15073 — REDACTED:15073-15098 | REDACTED:15677-15695 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:15073` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–10 lines × 3) · ×1
  • Duplicated block (6–10 lines × 3) api/database.php:289 — api/database.php:289-294 | api/database.php:1148-1157 | api/database.php:1193-1200 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) api/database.php:1093 — api/database.php:1093-1101 | api/database.php:1142-1148 | api/database.php:1179-1185 | api/database.php:1186-1193 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:1093` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `api/database.php:1184` calls `array_column`, `query`, `fetchAll` and `api/database.php:1175` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) REDACTED:19315 — REDACTED:19315-19322 | REDACTED:19358-19364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:19315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) REDACTED:19162 — REDACTED:19162-19168 | REDACTED:19251-19257 | REDACTED:19388-19394 | REDACTED:19457-19463 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:19248` calls `_loadSmartShoppingItems`, `empty` and `REDACTED:19161` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) api/database.php:781 — api/database.php:781-793 | api/database.php:864-875 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `api/database.php:781` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `api/database.php:862` calls `execute` and `api/database.php:780` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×1
  • Duplicated block (6 lines × 2) REDACTED:11090 — REDACTED:11090-11095 | REDACTED:11108-11113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:11090` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–6 lines × 3) · ×1
  • Duplicated block (3–6 lines × 3) REDACTED:22265 — REDACTED:22265-22267 | REDACTED:24276-24282 | REDACTED:24373-24378 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:24276` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: api — api: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
P3 · Security & performance tooling · SAST runs, but gates no merge · ×1
  • SAST runs, but gates no merge — `REDACTED` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 15 plain JS — the untyped files are assets/js/audit.js, assets/js/core/auth.js, assets/js/core/dom.js, REDACTED, assets/js/core/support.js, assets/js/core/vocab.js (+9 more).
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) REDACTED:29899 — REDACTED:29899 · REDACTED:29962 — 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 (35 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (35 matched lines × 2 locations) REDACTED:1432 — REDACTED:1432 · REDACTED:1579 — the two spans are one implementation copied and then locally edited — 287 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 (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) REDACTED:7144 — REDACTED:7144 · REDACTED:7314 — 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 (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) REDACTED:20850 — REDACTED:20850 · REDACTED:20919 — 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 (13 lines × 2 locations) · ×1
  • Duplicated block (13 lines × 2 locations) REDACTED:6384 — REDACTED:6384 · REDACTED:6410 — 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.
R2 · Cyclomatic Complexity · Complex function loadSettingsUI (cyclomatic 205, cognitive 259) · ×1
  • Complex function loadSettingsUI (cyclomatic 205, cognitive 259) REDACTED:7128 — loadSettingsUI has cyclomatic complexity 205 and cognitive complexity 259; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _saveSettingsInner (cyclomatic 171, cognitive 175) · ×1
  • Complex function _saveSettingsInner (cyclomatic 171, cognitive 175) REDACTED:8270 — _saveSettingsInner has cyclomatic complexity 171 and cognitive complexity 175; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function submitEditInventory (cyclomatic 132, cognitive 141) · ×1
  • Complex function submitEditInventory (cyclomatic 132, cognitive 141) REDACTED:21642 — submitEditInventory has cyclomatic complexity 132 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function submitAdd (cyclomatic 109, cognitive 156) · ×1
  • Complex function submitAdd (cyclomatic 109, cognitive 156) REDACTED:28433 — submitAdd has cyclomatic complexity 109 and cognitive complexity 156; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 renderBannerItem (cyclomatic 100, cognitive 162) · ×1
  • Complex function renderBannerItem (cyclomatic 100, cognitive 162) REDACTED:14671 — renderBannerItem has cyclomatic complexity 100 and cognitive complexity 162; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderRecipe (cyclomatic 94, cognitive 113) · ×1
  • Complex function renderRecipe (cyclomatic 94, cognitive 113) REDACTED:38972 — renderRecipe has cyclomatic complexity 94 and cognitive complexity 113; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 estimateOpenedExpiryDays (cyclomatic 86, cognitive 97) · ×1
  • Complex function estimateOpenedExpiryDays (cyclomatic 86, cognitive 97) REDACTED:4411 — estimateOpenedExpiryDays has cyclomatic complexity 86 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 loop (cyclomatic 79, cognitive 153) · ×1
  • Complex function loop (cyclomatic 79, cognitive 153) REDACTED:24410 — loop has cyclomatic complexity 79 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 submitProduct (cyclomatic 78, cognitive 97) · ×1
  • Complex function submitProduct (cyclomatic 78, cognitive 97) REDACTED:26410 — submitProduct has cyclomatic complexity 78 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 estimateExpiryDays (cyclomatic 71, cognitive 76) · ×1
  • Complex function estimateExpiryDays (cyclomatic 71, cognitive 76) REDACTED:4301 — estimateExpiryDays has cyclomatic complexity 71 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _runStartupCheck (cyclomatic 64, cognitive 85) · ×1
  • Complex function _runStartupCheck (cyclomatic 64, cognitive 85) REDACTED:46193 — _runStartupCheck has cyclomatic complexity 64 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 _computeSuggestedQtyForPlanDays (cyclomatic 57, cognitive 63) · ×1
  • Complex function _computeSuggestedQtyForPlanDays (cyclomatic 57, cognitive 63) REDACTED:31624 — _computeSuggestedQtyForPlanDays has cyclomatic complexity 57 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function testTTS (cyclomatic 53, cognitive 75) · ×1
  • Complex function testTTS (cyclomatic 53, cognitive 75) REDACTED:41522 — testTTS has cyclomatic complexity 53 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _apiFetchJson (cyclomatic 53, cognitive 68) · ×1
  • Complex function _apiFetchJson (cyclomatic 53, cognitive 68) REDACTED:9429 — _apiFetchJson has cyclomatic complexity 53 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _medFormSetMode (cyclomatic 50, cognitive 72) · ×1
  • Complex function _medFormSetMode (cyclomatic 50, cognitive 72) REDACTED:25322 — _medFormSetMode has cyclomatic complexity 50 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 cleanupObsoleteBringItems (cyclomatic 50, cognitive 70) · ×1
  • Complex function cleanupObsoleteBringItems (cyclomatic 50, cognitive 70) REDACTED:32655 — cleanupObsoleteBringItems has cyclomatic complexity 50 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 showAddForm (cyclomatic 50, cognitive 55) · ×1
  • Complex function showAddForm (cyclomatic 50, cognitive 55) REDACTED:27619 — showAddForm has cyclomatic complexity 50 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _auditRender (cyclomatic 50, cognitive 46) · ×1
  • Complex function _auditRender (cyclomatic 50, cognitive 46) assets/js/audit.js:1864 — _auditRender has cyclomatic complexity 50 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderSmartItem (cyclomatic 49, cognitive 52) · ×1
  • Complex function renderSmartItem (cyclomatic 49, cognitive 52) REDACTED:33395 — renderSmartItem has cyclomatic complexity 49 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function syncSettingsFromDB (cyclomatic 47, cognitive 104) · ×1
  • Complex function syncSettingsFromDB (cyclomatic 47, cognitive 104) REDACTED:6076 — syncSettingsFromDB has cyclomatic complexity 47 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _startRecipeGeneration (cyclomatic 46, cognitive 68) · ×1
  • Complex function _startRecipeGeneration (cyclomatic 46, cognitive 68) REDACTED:42732 — _startRecipeGeneration has cyclomatic complexity 46 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _initApp (cyclomatic 46, cognitive 62) · ×1
  • Complex function _initApp (cyclomatic 46, cognitive 62) REDACTED:46604 — _initApp has cyclomatic complexity 46 and cognitive complexity 62; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _scaleAutoFillRecipeUse (cyclomatic 44, cognitive 61) · ×1
  • Complex function _scaleAutoFillRecipeUse (cyclomatic 44, cognitive 61) REDACTED:1575 — _scaleAutoFillRecipeUse has cyclomatic complexity 44 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _tryConfirmBarcode (cyclomatic 42, cognitive 54) · ×1
  • Complex function _tryConfirmBarcode (cyclomatic 42, cognitive 54) REDACTED:22308 — _tryConfirmBarcode has cyclomatic complexity 42 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _medDetectCode (cyclomatic 41, cognitive 47) · ×1
  • Complex function _medDetectCode (cyclomatic 41, cognitive 47) REDACTED:453 — _medDetectCode has cyclomatic complexity 41 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 showPage (cyclomatic 41, cognitive 36) · ×1
  • Complex function showPage (cyclomatic 41, cognitive 36) REDACTED:9809 — showPage has cyclomatic complexity 41 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fetchAllPrices (cyclomatic 40, cognitive 56) · ×1
  • Complex function fetchAllPrices (cyclomatic 40, cognitive 56) REDACTED:32526 — fetchAllPrices has cyclomatic complexity 40 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 showProductAction (cyclomatic 40, cognitive 39) · ×1
  • Complex function showProductAction (cyclomatic 40, cognitive 39) REDACTED:26596 — showProductAction has cyclomatic complexity 40 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _editMedicalInventoryItem (cyclomatic 40, cognitive 36) · ×1
  • Complex function _editMedicalInventoryItem (cyclomatic 40, cognitive 36) REDACTED:21407 — _editMedicalInventoryItem has cyclomatic complexity 40 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _scaleOnMessage (cyclomatic 39, cognitive 64) · ×1
  • Complex function _scaleOnMessage (cyclomatic 39, cognitive 64) REDACTED:1057 — _scaleOnMessage has cyclomatic complexity 39 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 showItemDetail (cyclomatic 39, cognitive 55) · ×1
  • Complex function showItemDetail (cyclomatic 39, cognitive 55) REDACTED:17843 — showItemDetail has cyclomatic complexity 39 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _medReadLabelOcrInner (cyclomatic 39, cognitive 55) · ×1
  • Complex function _medReadLabelOcrInner (cyclomatic 39, cognitive 55) REDACTED:22954 — _medReadLabelOcrInner has cyclomatic complexity 39 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 discoverMealie (cyclomatic 39, cognitive 54) · ×1
  • Complex function discoverMealie (cyclomatic 39, cognitive 54) REDACTED:42466 — discoverMealie has cyclomatic complexity 39 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function submitRecipeUse (cyclomatic 39, cognitive 45) · ×1
  • Complex function submitRecipeUse (cyclomatic 39, cognitive 45) REDACTED:38203 — submitRecipeUse has cyclomatic complexity 39 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function editInventoryItem (cyclomatic 39, cognitive 32) · ×1
  • Complex function editInventoryItem (cyclomatic 39, cognitive 32) REDACTED:21041 — editInventoryItem has cyclomatic complexity 39 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadUseInventoryInfo (cyclomatic 37, cognitive 48) · ×1
  • Complex function loadUseInventoryInfo (cyclomatic 37, cognitive 48) REDACTED:28952 — loadUseInventoryInfo has cyclomatic complexity 37 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 _setScanModeInner (cyclomatic 37, cognitive 41) · ×1
  • Complex function _setScanModeInner (cyclomatic 37, cognitive 41) REDACTED:19419 — _setScanModeInner has cyclomatic complexity 37 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderInventoryItem (cyclomatic 37, cognitive 39) · ×1
  • Complex function renderInventoryItem (cyclomatic 37, cognitive 39) REDACTED:16581 — renderInventoryItem has cyclomatic complexity 37 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 selectAIMatch (cyclomatic 37, cognitive 37) · ×1
  • Complex function selectAIMatch (cyclomatic 37, cognitive 37) REDACTED:30971 — selectAIMatch has cyclomatic complexity 37 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 loadShoppingList (cyclomatic 36, cognitive 55) · ×1
  • Complex function loadShoppingList (cyclomatic 36, cognitive 55) REDACTED:33889 — loadShoppingList has cyclomatic complexity 36 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 · assets/js/audit.js · ×1
  • assets/js/audit.js: 2541 lines of code assets/js/audit.js:1 — assets/js/audit.js has 2541 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 · assets/js/screensaver.js · ×1
  • assets/js/screensaver.js: 885 lines of code assets/js/screensaver.js:1 — assets/js/screensaver.js has 885 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 · assets/js/core/support.js · ×1
  • assets/js/core/support.js: 579 lines of code assets/js/core/support.js:1 — assets/js/core/support.js has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 529 lines of code REDACTED:1 — REDACTED 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 · assets/js/core/vocab.js · ×1
  • assets/js/core/vocab.js: 443 lines of code assets/js/core/vocab.js:1 — assets/js/core/vocab.js has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 15 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
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.
Minor — 55 finding(s)
X7 · Silent fallback defaults · Silent fallback default in catch · ×33
  • Silent fallback default in catch evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/HealthConnectReader.kt:93 — `grantedPermissions` swallows every exception into `emptySet()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Logs.kt:58 — `tail` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch evershelf-health-bridge/app/src/main/java/it/dadaloop/evershelf/health/Updater.kt:175 — `signerFingerprint` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:214 — `appVersionName` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:264 — `signerSha256` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/KioskActivity.kt:272 — `lockTaskState` swallows every exception into `-1` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch REDACTED:2244 — `deletedLocationsList` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch REDACTED:18704 — `shoppingDismissLoad` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch REDACTED:24624 — `_loadPriceCache` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/env.php:160 — `evershelfLoadEnvOverridesRaw` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/medicines.php:392 — `medicineFindNeighbours` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/medicines.php:440 — `medicineFindOneEdit` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/medicines.php:629 — `medicineSearchWithTokens` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/medicines.php:732 — `medicineSearchFuzzy` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/seasonal.php:360 — `seasonalLoadDismissed` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch api/lib/webpush.php:151 — `evershelfWebPushInboxLoad` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch scripts/check-upgrade-migration.php:86 — `checkColumns` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
  • Silent fallback default in catch REDACTED:5214 — `_productHasLiveStock` swallows every exception into `return true` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:5996 — `enumerateCameras` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:6832 — `_creditsSeenIds` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:7595 — `_kioskLocalApkUrl` swallows every exception into `return 'releases/evershelf-kiosk.apk'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:7776 — `_kioskAppVersion` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:9086 — `_essTokenValue` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:9393 — `_apiReadKey` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:13327 — `_captureInventoryRows` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • + 8 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×7
  • Duplicated predicate REDACTED:19221 — `!schema || !schema.status || schema.status === 'none'` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:16105 — `_allInventoryCache || currentInventory || []` appears character-identically in 2 files — REDACTED, assets/js/audit.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:17740 — `r.expiry_date && typeof formatDate === 'function'` appears character-identically in 2 files — REDACTED, assets/js/audit.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:14685 — `s.scale_enabled && s.scale_gateway_url && _scaleConnected` appears character-identically in 2 files — REDACTED, assets/js/audit.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 assets/js/core/auth.js:47 — `typeof _currentLang === 'string' && _currentLang` appears character-identically in 3 files — assets/js/core/auth.js, assets/js/core/vocab.js, assets/js/receipt.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:50 — `is_writable($envFile) || (!file_exists($envFile) && is_writable(dirname($envFile)))` appears character-identically in 2 files — REDACTED, api/lib/mealie_setup.php. 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 api/lib/mealie.php:444 — `mb_strlen($t) > 2 && !in_array($t, $stop, true)` appears character-identically in 2 files — api/lib/mealie.php, api/lib/shopping_sync.php. 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 · ×4
  • redundant comment REDACTED:7439 — "Dark mode setting" repeats the code it sits on: 3 of its 3 words (dark, mode, setting) are already in `const dmEl = document.getElementById('setting-dark-mode');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:26977 — "Conf size row" repeats the code it sits on: 3 of its 3 words (conf, size, row) are already in `const pfConfRow = document.getElementById('pf-conf-size-row');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:40336 — "Zero-waste tip for this step" repeats the code it sits on: 4 of its 4 words (zero, waste, tip, step) are already in `_renderZeroWasteTip(_cookingStep);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:42260 — "mealSlot = 'pranzo' or 'cena' (from getMealType/getSelectedMealType)" repeats the code it sits on: 6 of its 7 words (meal, slot, pranzo, cena, get, type) are already in `const typeId = (mealSlot === 'pranzo' || mealSlot === 'cena')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found evershelf-kiosk/app/build.gradle.kts:5 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `evershelf-kiosk/app/build.gradle.kts` makes this repository a deployable product (line 5).
D21 · Naming Consistency · `_tryGeminiNumberOCR` spells `OCR` where 12 names in the project spell it `Ocr` · ×1
  • `_tryGeminiNumberOCR` spells `OCR` where 12 names in the project spell it `Ocr` REDACTED:5277 — 12 of 13 names in project evershelf spell the token `Ocr` (12 of 13; unit: names in project evershelf containing `Ocr`). Peers: app._tryLocalEanDigitOcr (REDACTED:22627); app._medReadLabelOcr (REDACTED:22944); app._medReadLabelOcrInner (REDACTED:22954); app._medOcrSelfTest (REDACTED:23071); app._medOcrGeometryNote (REDACTED:23112). Rename to `_tryGeminiNumberOcr`. [rule N6]
D21 · Naming Consistency · `_buildPriceBadgeHTML` spells `HTML` where 66 names in the project spell it `Html` · ×1
  • `_buildPriceBadgeHTML` spells `HTML` where 66 names in the project spell it `Html` REDACTED:32448 — 66 of 67 names in project evershelf spell the token `Html` (66 of 67; unit: names in project evershelf containing `Html`). Peers: app._medCardSubtitleHtml (REDACTED:417); app._invImageHtml (REDACTED:509); app._productCatIconHtml (REDACTED:548); app._productThumbHtml (REDACTED:569); app._locMacroBarHtml (REDACTED:3184). Rename to `_buildPriceBadgeHtml`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `mcp-server`.
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 7/15 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · PHP static analysis does not check null everywhere · ×1
  • PHP static analysis does not check null everywhere — This repository commits no PHPStan or Psalm configuration (`phpstan.neon[.dist]`, `phpstan.dist.neon`, `psalm.xml[.dist]`, or one a composer.json script names with `--configuration`), so nothing checks null: a `?Customer` reaches `->name()` silently and throws `Error: Call to a member function name() on null` the first time it is null. If the build passes a level on a command line instead, put it in a committed configuration — this check reads configuration, and configuration is all it can read.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex evershelf-kiosk/app/src/main/kotlin/it/dadaloop/evershelf/kiosk/SetupActivity.kt:931 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
Minor — 56 finding(s)
D12 · Dependency Hygiene · Outdated (compile) · ×55
  • Outdated (compile): com.google.guava:guava — com.google.guava:guava 32.0.1-jre → 33.8.0-android available.
  • Outdated (compile): com.google.guava:failureaccess — com.google.guava:failureaccess 1.0.1 → 1.0.3 available.
  • Outdated (compile): org.checkerframework:checker-qual — org.checkerframework:checker-qual 3.33.0 → 4.4.0 available.
  • Outdated (compile): com.google.errorprone:error_prone_annotations — com.google.errorprone:error_prone_annotations 2.18.0 → 2.52.0 available.
  • Outdated (compile): com.google.j2objc:j2objc-annotations — com.google.j2objc:j2objc-annotations 2.8 → 3.1 available.
  • Outdated (compile): net.java.dev.jna:jna-platform — net.java.dev.jna:jna-platform 5.6.0 → 5.19.1 available.
  • Outdated (compile): net.java.dev.jna:jna — net.java.dev.jna:jna 5.6.0 → 5.19.1 available.
  • Outdated (compile): org.jetbrains.kotlin:kotlin-stdlib-jdk8 — org.jetbrains.kotlin:kotlin-stdlib-jdk8 1.9.20 → 2.4.21 available.
  • Outdated (compile): org.jetbrains.kotlin:kotlin-stdlib — org.jetbrains.kotlin:kotlin-stdlib 1.9.20 → 2.4.21 available.
  • Outdated (compile): org.jetbrains:annotations — org.jetbrains:annotations 23.0.0 → 26.1.0 available.
  • Outdated (compile): org.jetbrains.kotlin:kotlin-stdlib-jdk7 — org.jetbrains.kotlin:kotlin-stdlib-jdk7 1.9.20 → 2.4.21 available.
  • Outdated (compile): org.jetbrains.kotlin:kotlin-stdlib-common — org.jetbrains.kotlin:kotlin-stdlib-common 1.9.20 → 2.4.21 available.
  • Outdated (compile): com.google.protobuf:protobuf-java — com.google.protobuf:protobuf-java 3.22.3 → 4.36.2 available.
  • Outdated (compile): org.jetbrains.kotlinx:kotlinx-coroutines-core — org.jetbrains.kotlinx:kotlinx-coroutines-core 1.6.4 → 1.11.0 available.
  • Outdated (compile): org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm — org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm 1.6.4 → 1.11.0 available.
  • Outdated (compile): org.jetbrains.kotlinx:kotlinx-coroutines-bom — org.jetbrains.kotlinx:kotlinx-coroutines-bom 1.6.4 → 1.11.0 available.
  • Outdated (compile): commons-io:commons-io — commons-io:commons-io 2.13.0 → 2.22.0 available.
  • Outdated (compile): com.google.code.gson:gson — com.google.code.gson:gson 2.10.1 → 2.15.0 available.
  • Outdated (compile): io.grpc:grpc-core — io.grpc:grpc-core 1.57.0 → 1.85.1 available.
  • Outdated (compile): io.grpc:grpc-api — io.grpc:grpc-api 1.57.0 → 1.85.1 available.
  • Outdated (compile): org.codehaus.mojo:animal-sniffer-annotations — org.codehaus.mojo:animal-sniffer-annotations 1.23 → 1.29.1 available.
  • Outdated (compile): io.perfmark:perfmark-api — io.perfmark:perfmark-api 0.26.0 → 0.27.0 available.
  • Outdated (compile): io.grpc:grpc-context — io.grpc:grpc-context 1.57.0 → 1.85.1 available.
  • Outdated (compile): io.grpc:grpc-netty — io.grpc:grpc-netty 1.57.0 → 1.85.1 available.
  • Outdated (compile): io.netty:netty-codec-http2 — io.netty:netty-codec-http2 4.1.93.Final → 4.2.21.Final available.
  • + 30 more in this group — see findings.md.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names REDACTED:25 — 0 of 96 documented parameters and 1 of 1163 summaries in `evershelf` only repeat the member or parameter name (e.g. "Register one country module." for `_medRegisterCountryModule`). 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 --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-f7ec189eb8b04778ad1aef90fa752eba/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-f7ec189eb8b04778ad1aef90fa752eba/history-1.json --exit-code 0 --source .1artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=871" --report-format json --report-path /tmp/watchdog-gitleaks-f7ec189eb8b04778ad1aef90fa752eba/history-2.json --exit-code 0 --source .4artifacts/raw/gitleaks-history-2.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-f7ec189eb8b04778ad1aef90fa752eba/tree.json --exit-code 0 --source .1artifacts/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 --exclude assets/vendor/quagga --exclude assets/vendor/transformers .55artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .5artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/raw/trivy-config.json
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—
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 01a1e86f-83ab-7cd7-a70f-a9e5bbec5917 · 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