Public report of coding-parrot/pothole-reporter, 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, 17:45 UTC · Survey ID cd_e9b6675ef3cf4db3b669a1079d0218d1

coding-parrot/pothole-reporter

Measured 17 November 2026, 17:40 UTC, at code version 36cfbf3

First survey, so nothing to compare with yet
CAI score 38.1out of 100 At risk

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: 160,890 lines of product code in 11 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Code Health, 24.3

Findings by how serious they are

16 critical 2007 serious 123 minor

14 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, 17:40 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.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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 ▸

73of 73 dimensions measured by tools.
2136of 2146 findings point to an exact file and line, so you can open each one in the code. The other 10 concern the repository as a whole, such as missing documentation.
73dimensions across 7 lenses, read from 160,890 lines of product code in 11 projects.
Chapters

Executive summary

coding-parrot/pothole-reporter is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 38.1 out of 100, which the At risk rating leaves unchanged.

Code Health, at 24.3, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the three tests that passed on some runs and failed on others, worth about 3.0 points. Adding type checking would lift Code Health itself, worth about 4.2 points. Raising Code Health to 70 would lift the score to about 49.7.

Eight known security holes in the packages the code depends on can be used by attackers. Three settings leave the servers or containers unsafe. Updating the vulnerable packages and correcting the unsafe settings would close both risks. Correcting the flagged pipeline settings would fix the weakness in the build pipeline's configuration. The use of a package that isn't listed needs adding to the project's list of dependencies.

The product code is 160,890 lines, about €190,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 24.3 · counts for 46%Accessibility 41.3 · counts for 25%Production Readiness 45.4 · counts for 14%Performance 60.0 · counts for 8%Maturity 71.1 · counts for 4%Security and Compliance 74.4 · counts for 2%Architecture 89.3 · counts for 1%

If Code Health rose from 24.3 to 70, the lowest score rated Strong, the score would rise from 38.1 to about 49.7.

Code composition: what the lines of code are
Product code 71%Tests 29%
Rebuild cost: about €190,000 · Estimate
Cost to rebuild€64,000 to €320,000, for 1,074 to 3,406 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 38. 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: 160,890 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 3 Flaky test finding(s) in Test Reliability — start with local-address.test.mjs, speed.test.mjs, contract.test.mjs.
Raises the score by about 3.0 points · Low effort · Test Reliability
2
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 4.2 points · Medium effort · Type Safety
3
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.
Raises the score by about 4.2 points · Medium effort · Code Duplication

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 €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Code Health, at 24.3 (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 3 Flaky test finding(s) in Test Reliability. Of all the actions in this report, it raises the score most for the work it takes: about 3.0 points for low effort, because it clears the 3 Test Reliability 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 370,469 lines over the last 90 days, which is about 1,502,458 lines a year. At that pace, the extra work comes to an estimated 208.6 to 1251.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

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

135 modules, with 75 dependencies between them. 3 loops run through 9 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 com.gauravsen.potholereporter.bridge.VideoImportPlugin2 com.gauravsen.potholereporter.db.entities3 com.gauravsen.potholereporter.drivemode.CentralServiceClient4 com.gauravsen.potholereporter.drivemode.CentralServiceIdentity5 com.gauravsen.potholereporter.drivemode.DriveSession6 com.gauravsen.potholereporter.drivemode.FrameCompressor7 dev.aiengg.potholereporter.db8 dev.aiengg.potholereporter.drive.NativeFreeSpaceReservationLedger9 dev.aiengg.potholereporter.drive.NativeInferenceTransport10 dev.aiengg.potholereporter.drive.NativeRollingBurstWindow11 dev.aiengg.potholereporter.drive.NativeVideoSegmentStorage12 infra.aws-yolo.service13 tools14 com.gauravsen.potholereporter.bridge.VideoImportStore15 com.gauravsen.potholereporter.db.dao16 com.gauravsen.potholereporter.drivemode.DriveSession.CameraState17 com.gauravsen.potholereporter.drivemode.DriveSession.State18 com.gauravsen.potholereporter.drivemode.DuplicateDetector19 dev.aiengg.potholereporter.db.PotholeDatabase20 dev.aiengg.potholereporter.drive.DriveForegroundService21 dev.aiengg.potholereporter.drive.DriveStartRegistry22 dev.aiengg.potholereporter.drive.NativeMediaStorageQuota23 dev.aiengg.potholereporter.drive.NativeRtspFrameSource24 com.gauravsen.potholereporter.bridge25 com.gauravsen.potholereporter.db26 dev.aiengg.potholereporter.drive.NativeDriveCameraManager27 dev.aiengg.potholereporter.drive.NativeReportEvidenceStorage28 com.gauravsen.potholereporter.bridge.DriveModePollDecision29 com.gauravsen.potholereporter.bridge.PendingVideoImport30 com.gauravsen.potholereporter.bridge.VideoImportError31 com.gauravsen.potholereporter.bridge.VideoImportLimitFailure32 com.gauravsen.potholereporter.db.AppDatabase33 com.gauravsen.potholereporter.drivemode34 dev.aiengg.potholereporter.drive35 com.gauravsen.potholereporter.drivemode.DriveModeService36 dev.aiengg.potholereporter37 dev.aiengg.potholereporter.drive.DetectionRejectionReason38 dev.aiengg.potholereporter.drive.NativeCameraRecoveryAction39 dev.aiengg.potholereporter.plugin.DriveModePlugin40 dev.aiengg.potholereporter.plugin
1 com.gauravsen.potholereporter.bridge.VideoImportPlugin
2 com.gauravsen.potholereporter.db.entities
3 com.gauravsen.potholereporter.drivemode.CentralServiceClient
4 com.gauravsen.potholereporter.drivemode.CentralServiceIdentity
5 com.gauravsen.potholereporter.drivemode.DriveSession
6 com.gauravsen.potholereporter.drivemode.FrameCompressor
7 dev.aiengg.potholereporter.db
8 dev.aiengg.potholereporter.drive.NativeFreeSpaceReservationLedger
9 dev.aiengg.potholereporter.drive.NativeInferenceTransport
10 dev.aiengg.potholereporter.drive.NativeRollingBurstWindow
11 dev.aiengg.potholereporter.drive.NativeVideoSegmentStorage
12 infra.aws-yolo.service
13 tools
14 com.gauravsen.potholereporter.bridge.VideoImportStore1
15 com.gauravsen.potholereporter.db.dao3
16 com.gauravsen.potholereporter.drivemode.DriveSession.CameraState3
17 com.gauravsen.potholereporter.drivemode.DriveSession.State5
18 com.gauravsen.potholereporter.drivemode.DuplicateDetector1
19 dev.aiengg.potholereporter.db.PotholeDatabase1
20 dev.aiengg.potholereporter.drive.DriveForegroundService7
21 dev.aiengg.potholereporter.drive.DriveStartRegistry1
22 dev.aiengg.potholereporter.drive.NativeMediaStorageQuota2
23 dev.aiengg.potholereporter.drive.NativeRtspFrameSource1
24 com.gauravsen.potholereporter.bridge131
25 com.gauravsen.potholereporter.db3
26 dev.aiengg.potholereporter.drive.NativeDriveCameraManager12
27 dev.aiengg.potholereporter.drive.NativeReportEvidenceStorage1
28 com.gauravsen.potholereporter.bridge.DriveModePollDecision3
29 com.gauravsen.potholereporter.bridge.PendingVideoImport1
30 com.gauravsen.potholereporter.bridge.VideoImportError1
31 com.gauravsen.potholereporter.bridge.VideoImportLimitFailure3
32 com.gauravsen.potholereporter.db.AppDatabase1
33 com.gauravsen.potholereporter.drivemode23121211
34 dev.aiengg.potholereporter.drive181121419222
35 com.gauravsen.potholereporter.drivemode.DriveModeService1
36 dev.aiengg.potholereporter2
37 dev.aiengg.potholereporter.drive.DetectionRejectionReason11
38 dev.aiengg.potholereporter.drive.NativeCameraRecoveryAction4
39 dev.aiengg.potholereporter.plugin.DriveModePlugin123
40 dev.aiengg.potholereporter.plugin734
Uses a module listed above itPart of a loopThe module itself
1 com.gauravsen.potholereporter.bridge.VideoImportPlugin2 com.gauravsen.potholereporter.db.entities3 com.gauravsen.potholereporter.drivemode.CentralServiceClient4 com.gauravsen.potholereporter.drivemode.CentralServiceIdentity5 com.gauravsen.potholereporter.drivemode.DriveSession6 com.gauravsen.potholereporter.drivemode.FrameCompressor7 dev.aiengg.potholereporter.db8 dev.aiengg.potholereporter.drive.NativeFreeSpaceReservationLedger9 dev.aiengg.potholereporter.drive.NativeInferenceTransport10 dev.aiengg.potholereporter.drive.NativeRollingBurstWindow11 dev.aiengg.potholereporter.drive.NativeVideoSegmentStorage12 infra.aws-yolo.service13 tools14 com.gauravsen.potholereporter.bridge.VideoImportStore15 com.gauravsen.potholereporter.db.dao16 com.gauravsen.potholereporter.drivemode.DriveSession.CameraState17 com.gauravsen.potholereporter.drivemode.DriveSession.State18 com.gauravsen.potholereporter.drivemode.DuplicateDetector19 dev.aiengg.potholereporter.db.PotholeDatabase20 dev.aiengg.potholereporter.drive.DriveForegroundService21 dev.aiengg.potholereporter.drive.DriveStartRegistry22 dev.aiengg.potholereporter.drive.NativeMediaStorageQuota23 dev.aiengg.potholereporter.drive.NativeRtspFrameSource24 com.gauravsen.potholereporter.bridge25 com.gauravsen.potholereporter.db26 dev.aiengg.potholereporter.drive.NativeDriveCameraManager27 dev.aiengg.potholereporter.drive.NativeReportEvidenceStorage28 com.gauravsen.potholereporter.bridge.DriveModePollDecision29 com.gauravsen.potholereporter.bridge.PendingVideoImport30 com.gauravsen.potholereporter.bridge.VideoImportError31 com.gauravsen.potholereporter.bridge.VideoImportLimitFailure32 com.gauravsen.potholereporter.db.AppDatabase33 com.gauravsen.potholereporter.drivemode34 dev.aiengg.potholereporter.drive35 com.gauravsen.potholereporter.drivemode.DriveModeService36 dev.aiengg.potholereporter37 dev.aiengg.potholereporter.drive.DetectionRejectionReason38 dev.aiengg.potholereporter.drive.NativeCameraRecoveryAction39 dev.aiengg.potholereporter.plugin.DriveModePlugin40 dev.aiengg.potholereporter.plugincom.gauravsen.potholereporter.bridge.VideoImportPlugin1com.gauravsen.potholereporter.db.entities2com.gauravsen.potholereporter.drivemode.CentralServiceClient3com.gauravsen.potholereporter.drivemode.CentralServiceIdentity4com.gauravsen.potholereporter.drivemode.DriveSession5com.gauravsen.potholereporter.drivemode.FrameCompressor6dev.aiengg.potholereporter.db7dev.aiengg.potholereporter.drive.NativeFreeSpaceReservationLedger8dev.aiengg.potholereporter.drive.NativeInferenceTransport9dev.aiengg.potholereporter.drive.NativeRollingBurstWindow10dev.aiengg.potholereporter.drive.NativeVideoSegmentStorage11infra.aws-yolo.service12tools13com.gauravsen.potholereporter.bridge.VideoImportStore14com.gauravsen.potholereporter.db.dao15com.gauravsen.potholereporter.drivemode.DriveSession.CameraState16com.gauravsen.potholereporter.drivemode.DriveSession.State17com.gauravsen.potholereporter.drivemode.DuplicateDetector18dev.aiengg.potholereporter.db.PotholeDatabase19dev.aiengg.potholereporter.drive.DriveForegroundService20dev.aiengg.potholereporter.drive.DriveStartRegistry21dev.aiengg.potholereporter.drive.NativeMediaStorageQuota22dev.aiengg.potholereporter.drive.NativeRtspFrameSource23com.gauravsen.potholereporter.bridge24com.gauravsen.potholereporter.db25dev.aiengg.potholereporter.drive.NativeDriveCameraManager26dev.aiengg.potholereporter.drive.NativeReportEvidenceStorage27com.gauravsen.potholereporter.bridge.DriveModePollDecision28com.gauravsen.potholereporter.bridge.PendingVideoImport29com.gauravsen.potholereporter.bridge.VideoImportError30com.gauravsen.potholereporter.bridge.VideoImportLimitFailure31com.gauravsen.potholereporter.db.AppDatabase32com.gauravsen.potholereporter.drivemode33dev.aiengg.potholereporter.drive34com.gauravsen.potholereporter.drivemode.DriveModeService35dev.aiengg.potholereporter36dev.aiengg.potholereporter.drive.DetectionRejectionReason37dev.aiengg.potholereporter.drive.NativeCameraRecoveryAction38dev.aiengg.potholereporter.plugin.DriveModePlugin39dev.aiengg.potholereporter.plugin4013351171211313121311312312121118112141922212114123734+95 more modules (most-connected shown)

At a glance — Code Health · 24.3 · Critical · gated by D1, D2, R1, R10, R2, R3 ·

At a glance — Architecture · 89.3 · Strong ·

At a glance — Maturity · 71.1 · Adequate · gated by D15 ·

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

At a glance — Security · 74.4 · Checked 5 of 11 ·

At a glance — Accessibility · 41.3 · Weak · gated by AC4, AC6 ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A02:2025 — Security Misconfiguration40High / Critical
A03:2025 — Software Supply Chain Failures15High / Critical
A05:2025 — Injection13High / Critical

Roadmap

Top priorities: 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; 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; 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 3 Flaky test finding(s) in Test Reliability — start with local-address.test.mjs, speed.test.mjs, contract.test.mjs.+3.0 ptsLowTest Reliability
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+4.2 ptsMediumType Safety
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.+4.2 ptsMediumCode Duplication
Resolve the 40 finding(s) in Cyclomatic Complexity.+4.2 ptsMediumCyclomatic Complexity
Bring the 305 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with createReport (cyclomatic 304), createReport (cyclomatic 304), standalone.createReport (cyclomatic 297).+4.1 ptsHighCyclomatic Complexity
Bring the 301 bodies over 30 down to 30 or less in Cognitive Complexity — start with createReport (cognitive 348), createReport (cognitive 348), standalone.createReport (cognitive 319).+4.1 ptsHighCognitive Complexity
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.1 ptsMediumKeyboard semantics
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.9 ptsMediumVisual & motion safety

File quality

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

FileScoreBandWorst signal
REDACTED1.4SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED5.1MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.0MixedCyclomatic Complexity: rad_dataset.build_index (cyclomatic 25)
REDACTED6.3MixedCyclomatic Complexity: run_eval.main (cyclomatic 34)
infra/aws-central/test/speed.test.mjs6.5MixedTest Reliability: Flaky test: infra/aws-central/::outside Karnataka the ward file and the notices' bodies are worked out once, and a lookup stays cheap
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
static/standalone.js7.0MixedCyclomatic Complexity: createReport (cyclomatic 304)
android-app/www/standalone.js7.0MixedCyclomatic Complexity: createReport (cyclomatic 304)
android-app/android/app/src/main/assets/public/standalone.js7.0MixedCyclomatic Complexity: standalone.createReport (cyclomatic 297)
docs/standalone.js7.0MixedCyclomatic Complexity: standalone.createReport (cyclomatic 297)
android-app/android/app/src/main/assets/public/index.html7.0MixedCyclomatic Complexity: index.html.analyseFootage (cyclomatic 162)
android-app/www/index.html7.0MixedCyclomatic Complexity: index.html.analyseFootage (cyclomatic 162)
docs/index.html7.0MixedCyclomatic Complexity: index.html.analyseFootage (cyclomatic 162)
static/index.html7.0MixedCyclomatic Complexity: index.html.analyseFootage (cyclomatic 162)
infra/aws-central/tools/build-street-index.mjs7.0MixedCyclomatic Complexity: createAddressModel (cyclomatic 116)

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

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

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

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

Could not be resolved — 14

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 73 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 — 73 dimensions across the health lenses
D1D2D3D4D5D6D10D11D13D14D15D17D19D20D24D26D27D28D29D30D31D34D35D36D43D44AC2AC3AC4AC5AC6AX10AX3AX4AX6GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X16X17X18X19X2X21X25X28X29X3X30X5

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, 2136 of 2146 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 01a1ea98-3b35-70aa-8357-f5e27c3e9c46.

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.

  • D4 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. The 79 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .html (36,460 lines, 23% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication. Duplication in .js is measured by R10 Code Duplication and is not part of this gap.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .py, and our analyzer cannot run the .py test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 45.6% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 572 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 329 test source file(s) (.py, .kt) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D12 Dependency Hygiene — 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. Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 3 dependency(ies) and leaving 22 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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 (4 contributor(s) across 480 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 3 hold 0.3% 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.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — 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 (android-app/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 — 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. Tracing effort is measured over resolved call sites, and all 2045 sampled here came from .html/.js files. This repository's .py source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `android-app/android/app/src/main/assets/public/standalone.js`, `android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DetectionDispatcher.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeFrameSource.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt`, … (+4 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run dev` in server/) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68bea16 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68c2955 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68c2aee <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@6afe585 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68bb500 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68bb890 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@688b180 <repo>/server/node_modules/@cloudflare/workerd-linux-64/bin/workerd@68b33a0" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Boot via AndroidApp (android-app/android/app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: ption. * Where: Script 'android-app/android/app/capacitor.build.gradle' line: 10 * What went wrong: A problem occurred evaluating script. > Could…; runtime evidence skipped (launch chosen because android-app/android/app/build.gradle applies the Android application plugin and android-app/android/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.
  • 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. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
  • 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. 331 further occurrence(s) are not listed individually; the score already reflects all 371.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security 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 web-security controls.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X16 Unfloored truncation loop — 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.
  • X18 Disposal-pattern 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.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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. 136 further occurrence(s) are not listed individually; the score already reflects all 176.
  • 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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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 REDACTED, 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.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

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

951 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was createReport at 304. A further 74 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 standalone.validatePinnedStatewidePayload at 32 — they are counted neither in the figure above nor in this dimension's score.

standalone.handle (cyclomatic 188) · ×4android-app/android/app/src/main/assets/public/standalone.js:10636
index.html.analyseFootage (cyclomatic 162) · ×4android-app/android/app/src/main/assets/public/index.html:8197
standalone.validateRoutingPack (cyclomatic 132) · ×4android-app/android/app/src/main/assets/public/standalone.js:2556
standalone.currentOfficialRouteBinding (cyclomatic 128) · ×4android-app/android/app/src/main/assets/public/standalone.js:12534
standalone.routeOfficer (cyclomatic 127) · ×4android-app/android/app/src/main/assets/public/standalone.js:5689

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

What to do

  1. Bring the 305 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with createReport (cyclomatic 304), createReport (cyclomatic 304), standalone.createReport (cyclomatic 297). — 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 305 together lifts Cyclomatic Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

Detailed fixes: 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

979 method(s) exceeded the cognitive complexity threshold of 15; the worst was createReport at 348.

index.html.renderReports::footageRowHtml (cognitive 19) · ×8android-app/android/app/src/main/assets/public/index.html:2646
index.html.analyseFootage (cognitive 196) · ×4android-app/android/app/src/main/assets/public/index.html:8197
index.html.runNativeVideoAnalysis (cognitive 150) · ×4android-app/android/app/src/main/assets/public/index.html:7949
index.html.runImportedVideoAnalysis (cognitive 144) · ×4android-app/android/app/src/main/assets/public/index.html:7562
standalone.draftCivicComplaint (cognitive 126) · ×4android-app/android/app/src/main/assets/public/standalone.js:8106

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

What to do

  1. Bring the 301 bodies over 30 down to 30 or less in Cognitive Complexity — start with createReport (cognitive 348), createReport (cognitive 348), standalone.createReport (cognitive 319). — 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 301 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

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

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

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

115 god class(es) detected.

FunctionTooLong: core.createService · ×57infra/aws-central/service/core.mjs:307
FileTooLong: www/standalone.js · ×29android-app/www/standalone.js
MethodTooLong: DriveForegroundService.stopDriveSession · ×18android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2118
ClassTooLong: DriveForegroundService · ×7android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:75
TooManyMethods: DriveForegroundService · ×4android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:75

What to do

  1. Resolve the 57 FunctionTooLong finding(s) in God Classes — start with standalone.js (39), geolocation.mjs (4), index.js (2). — One of this dimension's main actionable groups (57 warning-level).
  2. Resolve the 29 FileTooLong finding(s) in God Classes — start with standalone.js (3), index.html (3), DriveModePlugin.kt (2). — One of this dimension's main actionable groups (29 warning-level).
  3. Resolve the 18 MethodTooLong finding(s) in God Classes — start with PotholeDatabase.kt (7), DriveForegroundService.kt (4), AppDatabase.kt (3). — One of this dimension's main actionable groups (18 warning-level).

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

D4 · Code Duplication9.1 / 10Stronggated by 142 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

79 duplicated block group(s) detected. 2.2 % of the production lines (3,555 of 160,890) are in a reported copy. A further 63 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 90 of the 142 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .html (23% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count. Measured on part of this repository only: .js (35% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Edited copy of a member (5 corresponding lines) · ×7ml/classifier/datasets.py:44
Duplicated block (8 lines × 2) · ×7android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1394
Duplicated block (9 lines × 2) · ×6android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:786
Duplicated block (6 lines × 2) · ×6REDACTED:187
Members sharing a duplicated core (5 members, 50+ identical tokens) · ×6tools/build-andhra-pradesh-coverage.py:148

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

What to do

  1. Resolve the 7 Edited copy of a member (5 corresponding lines) finding(s) in Code Duplication — start with datasets.py, detector.py, NativeReportEvidenceStorage.kt. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 7 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with DriveModePlugin.kt, NativeDriveCameraManager.kt, exhaustive_video_eval.py. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with build-maharashtra-coverage.py (2), DriveModePlugin.kt, DriveModeService.kt. — 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 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

8 production modules (Gradle+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 3 of the 8 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)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 6 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

0 skipped, 0 zero-assertion, 2 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 572 tests. Measured on the JavaScript/TypeScript suite only — at least 329 test source file(s) (.py, .kt) went unread, so its test quality is unmeasured and is not in these counts.

Fixed-sleep synchronisation: after the breaker closes the next lookup asks KGIS again · ×2infra/aws-central/test/geolocation.test.mjs:270

What to do

  1. Resolve the 2 Fixed-sleep synchronisation finding(s) in Test Quality — start with geolocation.test.mjs, speed.test.mjs. — One of this dimension's main actionable groups (2 warning-level).

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

D11 · Test Reliability4.0 / 10Weak✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

3 flaky across 2 measured tier(s). JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in infra/aws-central/ (826 tests); node:test via `npm ci --ignore-scripts` in ml/classifier/lambda/ (28 tests); node:test via `npm ci --ignore-scripts` in ml/detector/lambda/ (6 tests); node:test via `npm install --ignore-scripts` (no lockfile) in server/ (46 tests)): measured (3 flaky); Python (repository root, 256 test files): measured (0 flaky).

Flaky test: infra/aws-central/::a packaged lookup is under half a millisecond warm and a tile loads in under 150 ms · ×3infra/aws-central/test/local-address.test.mjs:446

What to do

  1. Resolve the 3 Flaky test finding(s) in Test Reliability — start with local-address.test.mjs, speed.test.mjs, contract.test.mjs. — One of this dimension's main actionable groups (3 issue-level).

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 1 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 2 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. 22 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 2 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 a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs 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 Hotspots1.7 / 10Critical✓ Tool-verified

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

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

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

Top hotspots: android-app/www/standalone.js (120×297=35640); static/standalone.js (120×297=35640); docs/standalone.js (78×297=23166)

Hotspot: android-app/www/standalone.js · ×38android-app/www/standalone.js:9590

What to do

  1. Resolve the 38 Hotspot finding(s) in Churn × Complexity Hotspots — start with standalone.js (4), index.html (4), core.mjs. — One of this dimension's main actionable groups (38 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 51625 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

2 of 2 documentation facets pass in full. 15 document(s) read across 9 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 foundandroid-app/android/app/build.gradle:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle. — 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.

D24 · Comment Value10.0 9.9 / 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.9 / 10 · rule-coverage 100% · ceiling Documented

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

redundant commentinfra/aws-central/test/india-ward-tenders.test.mjs:90

✓ On the Gold path — maintain.

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

D26 · Project Cohesion6.4 / 10Adequate✓ 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 6.4 / 10 · rule-coverage 100% · ceiling Documented

2 of 11 build units (Gradle, Python, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2REDACTED:1

What to do

  1. Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED, build.gradle. — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

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

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated. Measured over the .html/.js source only — this repository's .py was not sampled for call sites, so this score covers part of the tree, not all of it.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Documented

13 finding(s): 0 critical, 1 high, 6 medium, 6 low. semgrep hit a parse error in 20 file(s) — `android-app/android/app/src/main/assets/public/standalone.js`, `android-app/android/gradlew` (line 74, line 180), `android-app/www/standalone.js`, `data/streets/ahmedabad/t_1010_452.bin`, `data/streets/karnataka/t_1019_412.bin`, … (+15 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities4.3 / 10Weak✓ 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 4.3 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — 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 Security6.5 / 10Adequate✓ 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 6.5 / 10 · rule-coverage 100% · ceiling Documented

40 finding(s): 0 critical, 3 high, 20 medium, 17 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 20 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (11), REDACTED (9). — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 17 Low IaC finding(s) in IaC & Container Security — start with REDACTED (14), REDACTED (3). — One of this dimension's main actionable groups (17 recommendation-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 211 of the 272 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 Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

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

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 recommendation-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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 15 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.

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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.

AC3 · Page structure5.4 / 10Adequate✓ 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.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — android-app/www/index.html:2, static/index.html:2

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 semantics1.0 / 10Critical✓ 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".

  • 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. (×2) — android-app/www/index.html:391, static/index.html:391

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety1.6 / 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.

  • `details.more summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — android-app/www/index.html:58, static/index.html:58
  • `.group-head .caret` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — android-app/www/index.html:92, static/index.html:92
  • `.ward-tenders summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — android-app/www/index.html:116, static/index.html:116
  • `.spin` moves (`animation: s 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — android-app/www/index.html:161, static/index.html:161

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 composition8.6 / 10Strong✓ 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 segregation9.2 / 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.

  • `ReportDao` declares 18 abstract methods: `insert`, `update`, `getAll`, `getAllIds`, `listForHome`, `getById`, `getThumbnail`, `getFullPhoto`, `exists`, `getByServerPotholeId`, `centralWorkIds`, `deleteById`, `getByDriveId`, `findInLatBand`, `findAcceptedByDriveId`, `findBySightingDriveId`, `count`, `deleteAll`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — android-app/android/app/src/main/java/com/gauravsen/potholereporter/db/dao/ReportDao.kt:128
  • `ReportDao` declares 17 abstract methods: `insertReport`, `updateReport`, `getAllReports`, `getReportById`, `getAllReportMediaRefs`, `getReportMediaRefs`, `getNewestReportMediaId`, `getReportMediaRefPage`, `getUnsyncedReportCandidatesAfter`, `getUnsyncedReportPhotoDataUrl`, `countUnsyncedReports`, `markReportsSynced`, `acknowledgeAndReleasePhotos`, `getCandidateReportsInLatitudeBand`, `getReportsForDrive`, `clearAll`, `deleteReport`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/Daos.kt:97
  • `DriveKeyframeDao` declares 17 abstract methods: `insertKeyframe`, `getKeyframe`, `getBySessionAndCaptureSeq`, `getForSession`, `getPendingForSession`, `countPendingForSession`, `getSummaries`, `getNewestOwnershipId`, `getOwnershipPage`, `getOwnershipPageForSession`, `getPendingSessionPage`, `getMissingSessionPage`, `markAnalyzed`, `markPending`, `deleteKeyframe`, `deleteForSession`, `clearAll`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/Daos.kt:312

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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

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

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

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

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

  • `warn` has an empty body — confirm it's an intentional no-op and not an unfinished method. — infra/aws-central/tools/check-package.mjs:27
  • `log` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — infra/aws-central/tools/check-package.mjs:27, infra/aws-central/tools/verify-local-address.mjs:49
  • `info` has an empty body — confirm it's an intentional no-op and not an unfinished method. — infra/aws-central/tools/check-package.mjs:27
  • `error` has an empty body — confirm it's an intentional no-op and not an unfinished method. — infra/aws-central/tools/verify-local-address.mjs:49

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)8.8 / 10Strong✓ 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 documentation5.0 / 10Adequate✓ 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 structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P1 · CI/CD 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: `.`.
  • `infra/aws-central/service/health/handler.mjs` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — infra/aws-central/service/health/handler.mjs:33

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `android-app/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — android-app/package.json:14

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

  • `fs.mkdtempSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — infra/aws-central/tools/india-ward-runtime.mjs:184
  • `fs.writeFileSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — infra/aws-central/tools/india-ward-runtime.mjs:185
  • `fs.rmSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — infra/aws-central/tools/india-ward-runtime.mjs:191
  • `readFileSync` in `createScorer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — ml/classifier/lambda/scorer.mjs:34, ml/classifier/lambda/scorer.mjs:35
  • `readFileSync` in `createLocator` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — ml/detector/lambda/locator.mjs:93, ml/detector/lambda/locator.mjs:94
  • `mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/cloud/eval/prompt_eval.mjs:258
  • `readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — tools/cloud/eval/prompt_eval.mjs:260, tools/cloud/eval/prompt_eval.mjs:266
  • `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — tools/cloud/eval/prompt_eval.mjs:275, tools/cloud/eval/prompt_eval.mjs:359, tools/cloud/eval/prompt_eval.mjs:360, …
  • `appendFileSync` in `judge` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/cloud/eval/prompt_eval.mjs:308
  • `readFileSync` in `callback to Array.from` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/cloud/eval/prompt_eval.mjs:331
  • `mkdirSync` in `once` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/harness/run.mjs:295
  • `writeFileSync` in `once` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — tools/harness/run.mjs:297

What to do

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

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

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

  • 0 typed · 141 plain JS — the untyped files are android-app/www/standalone.js, eval/audit_tender_coverage.mjs, eval/tender_coverage_gate.mjs, infra/aws-central/service/auth.mjs, infra/aws-central/service/canary-install.mjs, infra/aws-central/service/core.mjs (+135 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 Duplication0.0 / 10Critical✓ 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.

  • android-app/www/ and docs/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 17 and 467 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — android-app/www/standalone.js:1
  • android-app/www/ and static/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 17 and 17 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — android-app/www/standalone.js:1
  • docs/ and static/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 467 and 17 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docs/standalone.js:1
  • 81 duplicated blocks under the repository root have copies in at least two of the sibling directories android-app, infra, ml, server, static, tools — 75 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 81 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 81 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 81 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — android-app/www/standalone.js:8399
  • android-app/www/standalone.js:8399 · static/standalone.js:8399 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:8399
  • android-app/www/standalone.js:569 · static/standalone.js:569 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:569
  • android-app/www/standalone.js:4870 · static/standalone.js:4870 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:4870
  • android-app/www/standalone.js:7197 · static/standalone.js:7197 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:7197
  • android-app/www/standalone.js:9964 · static/standalone.js:9964 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:9964
  • android-app/www/standalone.js:6696 · static/standalone.js:6696 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:6696
  • android-app/www/standalone.js:10908 · static/standalone.js:10908 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:10908
  • android-app/www/standalone.js:7987 · static/standalone.js:7987 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:7987
  • android-app/www/standalone.js:5946 · static/standalone.js:5946 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:5946
  • android-app/www/standalone.js:11555 · static/standalone.js:11555 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:11555
  • android-app/www/standalone.js:13182 · static/standalone.js:13182 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:13182
  • android-app/www/standalone.js:11930 · static/standalone.js:11930 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:11930
  • android-app/www/standalone.js:279 · static/standalone.js:279 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:279
  • android-app/www/standalone.js:10647 · static/standalone.js:10647 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:10647
  • android-app/www/standalone.js:12644 · static/standalone.js:12644 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:12644
  • android-app/www/standalone.js:4143 · static/standalone.js:4143 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:4143
  • android-app/www/standalone.js:70 · static/standalone.js:70 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:70
  • android-app/www/standalone.js:11346 · static/standalone.js:11346 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:11346
  • android-app/www/standalone.js:2709 · static/standalone.js:2709 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:2709
  • android-app/www/standalone.js:3809 · static/standalone.js:3809 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:3809
  • android-app/www/standalone.js:1713 · static/standalone.js:1713 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:1713
  • android-app/www/standalone.js:7800 · static/standalone.js:7800 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:7800
  • android-app/www/standalone.js:12982 · static/standalone.js:12982 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:12982
  • android-app/www/standalone.js:12222 · static/standalone.js:12222 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:12222
  • android-app/www/standalone.js:5623 · static/standalone.js:5623 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:5623
  • android-app/www/standalone.js:1907 · static/standalone.js:1907 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:1907
  • android-app/www/standalone.js:3585 · static/standalone.js:3585 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:3585
  • android-app/www/standalone.js:6445 · static/standalone.js:6445 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:6445
  • android-app/www/standalone.js:10509 · static/standalone.js:10509 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:10509
  • android-app/www/standalone.js:2415 · static/standalone.js:2415 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:2415
  • android-app/www/standalone.js:2539 · static/standalone.js:2539 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:2539
  • android-app/www/standalone.js:4426 · static/standalone.js:4426 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:4426
  • android-app/www/standalone.js:2110 · static/standalone.js:2110 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:2110
  • android-app/www/standalone.js:12469 · static/standalone.js:12469 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — android-app/www/standalone.js:12469
  • android-app/www/standalone.js:4027 · static/standalone.js:4027 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:4027
  • android-app/www/standalone.js:1629 · static/standalone.js:1629 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — android-app/www/standalone.js:1629

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.
R11 · Import Boundaries8.3 / 10Strong✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • infra/aws-central/test/tender-scope.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../../tools/harness/release-verdict.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — infra/aws-central/test/tender-scope.test.mjs:6
  • ml/detector/lambda/handler.mjs:11 reaches into another package with a relative path (./service.mjs) — import the package by name instead. — ml/detector/lambda/handler.mjs:11

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.

  • createReport has cyclomatic complexity 298 and cognitive complexity 337; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:9590, static/standalone.js:9590
  • importNativeReport has cyclomatic complexity 221 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:11171, static/standalone.js:11171
  • handle has cyclomatic complexity 164 and cognitive complexity 207; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:10636, static/standalone.js:10636
  • prepareComplaint has cyclomatic complexity 137 and cognitive complexity 142; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:10132, static/standalone.js:10132
  • validateRoutingPack has cyclomatic complexity 129 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:2556, static/standalone.js:2556
  • currentOfficialRouteBinding has cyclomatic complexity 126 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. (×2) — android-app/www/standalone.js:12534, static/standalone.js:12534
  • savedOfficialRouteBinding has cyclomatic complexity 122 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:12333, static/standalone.js:12333
  • routeOfficer has cyclomatic complexity 116 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:5689, static/standalone.js:5689
  • createAddressModel has cyclomatic complexity 107 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — infra/aws-central/tools/build-street-index.mjs:776
  • savedNonMunicipalLocationMatches has cyclomatic complexity 85 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 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. (×2) — android-app/www/standalone.js:12856, static/standalone.js:12856
  • validateRoadAgreementPack has cyclomatic complexity 81 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:3599, static/standalone.js:3599
  • createCivicReport has cyclomatic complexity 80 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:11463, static/standalone.js:11463
  • openEmailDraft has cyclomatic complexity 75 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. (×2) — android-app/www/standalone.js:10289, static/standalone.js:10289
  • installRoutingAuthorities has cyclomatic complexity 74 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:1442, static/standalone.js:1442
  • resolve has cyclomatic complexity 71 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — infra/aws-central/service/geolocation.mjs:410
  • validateHighwayManifest has cyclomatic complexity 70 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:3865, static/standalone.js:3865
  • buildRegion has cyclomatic complexity 67 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — infra/aws-central/tools/build-street-index.mjs:1155
  • validateMunicipalCityPayload has cyclomatic complexity 67 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:2157, static/standalone.js:2157
  • migrateLegacyComplaintRecord has cyclomatic complexity 66 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — android-app/www/standalone.js:7224, static/standalone.js:7224
  • validateRoadNoticePack has cyclomatic complexity 64 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:3333, static/standalone.js:3333
  • wardMarkersIn has cyclomatic complexity 63 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — infra/aws-central/service/india-ward-tenders.mjs:95
  • validateRoadAgreementManifest has cyclomatic complexity 63 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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. (×2) — android-app/www/standalone.js:3520, static/standalone.js:3520
R3 · Large Files2.7 / 10Weak✓ Tool-verified

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

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

  • android-app/www/standalone.js has 12980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — android-app/www/standalone.js:1
  • static/standalone.js has 12980 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — static/standalone.js:1
  • server/src/index.js has 3802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/index.js:1
  • infra/aws-central/tools/build-street-index.mjs has 1531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/tools/build-street-index.mjs:1
  • infra/aws-central/service/core.mjs has 1325 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/core.mjs:1
  • infra/aws-central/tools/snapshot-india-wards.mjs has 1159 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/tools/snapshot-india-wards.mjs:1
  • infra/aws-central/service/detectors.mjs has 725 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/detectors.mjs:1
  • infra/aws-central/service/dynamo-repository.mjs has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/dynamo-repository.mjs:1
  • infra/aws-central/service/ward-tenders.mjs has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/ward-tenders.mjs:1
  • infra/aws-central/service/geolocation.mjs has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/geolocation.mjs:1
  • infra/aws-central/tools/india-ward-coverage-report.mjs has 571 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/tools/india-ward-coverage-report.mjs:1
  • infra/aws-central/service/local-address.mjs has 491 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/local-address.mjs:1
  • infra/aws-central/service/health/rules.mjs has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/service/health/rules.mjs:1
  • infra/aws-central/tools/build-karnataka-geometry.mjs has 444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/tools/build-karnataka-geometry.mjs:1
  • infra/aws-central/tools/verify-local-ownership.mjs has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — infra/aws-central/tools/verify-local-ownership.mjs:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×16) — infra/aws-central/tools/verify-local-ownership.mjs:1, infra/aws-central/tools/verify-local-address.mjs:1, tools/harness/run.mjs:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness8.9 / 10Strong✓ 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 · Tooling3.4 / 10Weak✓ Tool-verified

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

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

  • 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 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 Code9.8 / 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.

  • Unreachable from the 65 application, 32 tooling and 60 test entry point(s) detected in this repo. Nothing this repository declares compiles or type-checks these files, so a wrong deletion here would raise no compile error — gate removals on `npm test`, which loads the modules, and note that it only covers what it exercises. An undetected custom entry would make these reachable.
  • no import path from any entry point (65 application, 32 tooling, 60 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×3) — tools/cloud/eval/prompt_eval.mjs, ml/detector/lambda/handler.mjs, ml/classifier/lambda/handler.mjs
  • Nothing imports this binding — it is safe to review for removal. — infra/aws-central/tools/kgis-layers.mjs:36

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.0 / 10Strong✓ 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.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. — tools/harness/restore-defs.mjs:11

What to do

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

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

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

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document2.7 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `reject_private_locator_strings` is public and takes `value: Any` from its caller, and it calls itself at line 106 (`reject_private_locator_strings`) with a piece of `value` (and at line 110) — and nowhere in `reject_private_locator_strings` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reject_private_locator_strings` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — eval/exhaustive_video_eval.py:106
  • `reject_absolute_paths` is public and takes `value: Any` from its caller, and it calls itself at line 88 (`reject_absolute_paths`) with a piece of `value` (and at line 91) — and nowhere in `reject_absolute_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reject_absolute_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — eval/private_drive_corpus.py:88

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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 propagation8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on an AbortSignal or the coroutine's cancellation (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 44/66 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `prewarm` 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 })`. (×4) — static/standalone.js:1218, docs/standalone.js:1218, android-app/www/standalone.js:1218, …
  • `getStatePackManifest` 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 })`. (×4) — static/standalone.js:2007, docs/standalone.js:2007, android-app/www/standalone.js:2007, …
  • `getHighwayPackManifest` 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 })`. (×4) — static/standalone.js:3954, docs/standalone.js:3954, android-app/www/standalone.js:3954, …
  • `dataUrlToBlob` 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 })`. (×4) — static/standalone.js:8946, docs/standalone.js:8946, android-app/www/standalone.js:8946, …
  • `decodeRepairEvidence` 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 })`. (×4) — static/standalone.js:11907, docs/standalone.js:11907, android-app/www/standalone.js:11907, …
  • `doWork` suspends, but makes its request with `URL(…).openConnection()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — android-app/android/app/src/main/java/com/gauravsen/potholereporter/messages/MessageWorker.kt:41
  • `detect` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DetectionDispatcher.kt:165

What to do

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

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

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

X25 · Inert configuration 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.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling4.9 / 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.

  • `except 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. — tools/harness/webview-drive-analyse.py:118
  • 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. (×35) — tools/harness/webview-drive-analyse.py:231, tools/harness/webview-drive-analyse.py:267, static/standalone.js:445, …
  • `.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. (×3) — static/standalone.js:628, static/standalone.js:1185, static/standalone.js:1243
  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — static/standalone.js:972

What to do

  • Swallowed exception (caught, then discarded)
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 types9.8 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.

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

WCAG coverage — what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 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
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 43 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 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 Health24.3Critical — gated by D1, D2, R1, R10, R2, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture89.3StrongStrongest area.
Maturity71.1Adequate — gated by D15Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness45.4Weak — gated by R6, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security74.4Checked 5 of 11Solid.
Accessibility41.3Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 4 check(s) recorded observations but carry no score

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

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 26 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's Java 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 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 Python 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 Java code is a Spring, JSR-330 or CDI singleton bean. 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. 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: ption. * Where: Script 'android-app/android/app/capacitor.build.gradle' line: 10 * What went wrong: A problem occurred evaluating script. > Could…; runtime evidence skipped (launch chosen because android-app/android/app/build.gradle applies the Android application plugin and android-app/android/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.
  • D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 3 dependency(ies) and leaving 22 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • 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.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • 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
  • D32 Data Compliance (PII/GDPR) — 9 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 114 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 279 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, 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.
  • S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
  • 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
  • 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
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — X27 reached only 32% of this repository's production lines — javascript (109,265 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 16 finding(s)
D30 · Dependency Vulnerabilities · Critical CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D11 · Test Reliability · Flaky test · ×3
  • Flaky test: infra/aws-central/::a packaged lookup is under half a millisecond warm and a tile loads in under 150 ms infra/aws-central/test/local-address.test.mjs:446 — Passed 1×, failed 2× across repeated runs.
  • Flaky test: infra/aws-central/::outside Karnataka the ward file and the notices' bodies are worked out once, and a lookup stays cheap infra/aws-central/test/speed.test.mjs:335 — Passed 1×, failed 2× across repeated runs.
  • Flaky test: ml/classifier/lambda/::yolo_then_openai: a frame the screen clears is answered by the screen alone ml/classifier/lambda/test/contract.test.mjs:69 — Passed 2×, failed 1× across repeated runs.
D31 · IaC & Container Security · High IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'espree' · ×1
  • Unlisted import 'espree' tools/harness/restore-defs.mjs:11 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 2007 finding(s)
D3 · God Classes · FunctionTooLong · ×57
  • FunctionTooLong: core.createService infra/aws-central/service/core.mjs:307 — FunctionTooLong — createService runs 788 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 688 over it, 7.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dynamo-repository.createDynamoRepository infra/aws-central/service/dynamo-repository.mjs:45 — FunctionTooLong — createDynamoRepository runs 461 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 361 over it, 4.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.createReport android-app/www/standalone.js:9590 — FunctionTooLong — createReport runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.createReport docs/standalone.js:9590 — FunctionTooLong — createReport runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.createReport static/standalone.js:9590 — FunctionTooLong — createReport runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: detectors.createDetector infra/aws-central/service/detectors.mjs:233 — FunctionTooLong — createDetector runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: india-ward-coverage-report.render infra/aws-central/tools/india-ward-coverage-report.mjs:162 — FunctionTooLong — render runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.handle android-app/www/standalone.js:10636 — FunctionTooLong — handle runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.handle docs/standalone.js:10636 — FunctionTooLong — handle runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.handle static/standalone.js:10636 — FunctionTooLong — handle runs 284 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.commitReportObservation server/src/index.js:2057 — FunctionTooLong — commitReportObservation runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.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.
  • FunctionTooLong: standalone.routeOfficer android-app/www/standalone.js:5689 — FunctionTooLong — routeOfficer runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.routeOfficer docs/standalone.js:5689 — FunctionTooLong — routeOfficer runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.routeOfficer static/standalone.js:5689 — FunctionTooLong — routeOfficer runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ownership-bundle-writer.createOwnershipWriter infra/aws-central/tools/ownership-bundle-writer.mjs:88 — FunctionTooLong — createOwnershipWriter runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.migrateLegacyComplaintRecord android-app/www/standalone.js:7224 — FunctionTooLong — migrateLegacyComplaintRecord runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.migrateLegacyComplaintRecord docs/standalone.js:7224 — FunctionTooLong — migrateLegacyComplaintRecord runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.migrateLegacyComplaintRecord static/standalone.js:7224 — FunctionTooLong — migrateLegacyComplaintRecord runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.buildComplaintOutputs android-app/www/standalone.js:7694 — FunctionTooLong — buildComplaintOutputs runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.buildComplaintOutputs docs/standalone.js:7694 — FunctionTooLong — buildComplaintOutputs runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.buildComplaintOutputs static/standalone.js:7694 — FunctionTooLong — buildComplaintOutputs runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: build-street-index.createAddressModel infra/aws-central/tools/build-street-index.mjs:776 — FunctionTooLong — createAddressModel runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.importNativeReport android-app/www/standalone.js:11171 — FunctionTooLong — importNativeReport runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.importNativeReport docs/standalone.js:11171 — FunctionTooLong — importNativeReport runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: standalone.importNativeReport static/standalone.js:11171 — FunctionTooLong — importNativeReport runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.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.
  • + 32 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×38
  • Hotspot: android-app/www/standalone.js android-app/www/standalone.js:9590 — android-app/www/standalone.js changed 120 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 297 in standalone.createReport at line 9590. 8 of those changes were fix/bug commits, and the other 112 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/www/standalone.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: static/standalone.js static/standalone.js:9590 — static/standalone.js changed 120 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 297 in standalone.createReport at line 9590. 8 of those changes were fix/bug commits, and the other 112 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- static/standalone.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: docs/standalone.js docs/standalone.js:9590 — docs/standalone.js changed 78 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 297 in standalone.createReport at line 9590. 5 of those changes were fix/bug commits, and the other 73 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- docs/standalone.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: android-app/www/index.html android-app/www/index.html:8197 — android-app/www/index.html changed 130 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in index.html.analyseFootage at line 8197. 14 of those changes were fix/bug commits, and the other 116 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/www/index.html`: 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: static/index.html static/index.html:8197 — static/index.html changed 130 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in index.html.analyseFootage at line 8197. 14 of those changes were fix/bug commits, and the other 116 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- static/index.html`: 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: docs/index.html docs/index.html:8197 — docs/index.html changed 88 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in index.html.analyseFootage at line 8197. 10 of those changes were fix/bug commits, and the other 78 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- docs/index.html`: 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: android-app/android/app/src/main/assets/public/standalone.js android-app/android/app/src/main/assets/public/standalone.js:9590 — android-app/android/app/src/main/assets/public/standalone.js changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 297 in standalone.createReport at line 9590. 3 of those changes were fix/bug commits, and the other 37 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/assets/public/standalone.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: android-app/android/app/src/main/assets/public/index.html android-app/android/app/src/main/assets/public/index.html:8197 — android-app/android/app/src/main/assets/public/index.html changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in index.html.analyseFootage at line 8197. 7 of those changes were fix/bug commits, and the other 44 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/assets/public/index.html`: 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: infra/aws-central/service/core.mjs infra/aws-central/service/core.mjs:307 — infra/aws-central/service/core.mjs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 293 in core.createService at line 307. 3 of those changes were fix/bug commits, and the other 19 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/core.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1641 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in DriveModePlugin.reconcileNativeState at line 1641. 1 of those changes was a fix/bug commit, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.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: android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2118 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in DriveForegroundService.stopDriveSession at line 2118. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.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: infra/aws-central/service/geolocation.mjs infra/aws-central/service/geolocation.mjs:410 — infra/aws-central/service/geolocation.mjs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in geolocation.createGeolocator.resolve at line 410. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/geolocation.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tools/state_pack_tools.py tools/state_pack_tools.py:2169 — tools/state_pack_tools.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in state_pack_tools._validate_municipal_city_payload at line 2169. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- tools/state_pack_tools.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tools/harness/run.mjs tools/harness/run.mjs:130 — tools/harness/run.mjs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in run.tasks at line 130. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- tools/harness/run.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: eval/run_prepared_eval.py eval/run_prepared_eval.py:45 — eval/run_prepared_eval.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in run_prepared_eval.load_event at line 45. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- eval/run_prepared_eval.py`: 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: infra/aws-central/service/health/window.mjs infra/aws-central/service/health/window.mjs:42 — infra/aws-central/service/health/window.mjs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in window.judgeWindow at line 42. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/health/window.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:927 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in NativeDriveCameraManager.finalizeVideoSegment at line 927. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.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: infra/aws-central/service/detectors.mjs infra/aws-central/service/detectors.mjs:391 — infra/aws-central/service/detectors.mjs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in detectors.createDetector.yolo at line 391. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/detectors.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt:66 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in NotificationHelper.buildNotification at line 66. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.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: infra/aws-central/tools/india-ward-coverage-report.mjs infra/aws-central/tools/india-ward-coverage-report.mjs:162 — infra/aws-central/tools/india-ward-coverage-report.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in india-ward-coverage-report.render at line 162. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/tools/india-ward-coverage-report.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: infra/aws-central/service/ward-tenders.mjs infra/aws-central/service/ward-tenders.mjs:579 — infra/aws-central/service/ward-tenders.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ward-tenders.matchWardTenders at line 579. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/ward-tenders.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tools/tender_scope.py tools/tender_scope.py:184 — tools/tender_scope.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in tender_scope.is_road_surface_contract at line 184. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- tools/tender_scope.py`: 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: infra/aws-central/service/india-ward-tenders.mjs infra/aws-central/service/india-ward-tenders.mjs:95 — infra/aws-central/service/india-ward-tenders.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in india-ward-tenders.wardMarkersIn at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/service/india-ward-tenders.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: infra/aws-central/tools/ward-tender-experiment.mjs infra/aws-central/tools/ward-tender-experiment.mjs:42 — infra/aws-central/tools/ward-tender-experiment.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ward-tender-experiment.main at line 42. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --full-history --no-merges -- infra/aws-central/tools/ward-tender-experiment.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:45 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in tenders.matchTender at line 45. 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-07-16..2026-10-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-16 18:18:09 +05:30' --until='2026-10-14 18:18:09 +05:30' --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.
  • + 13 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×38
  • Swallowed exception (empty catch) tools/harness/webview-drive-analyse.py:231 — 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) tools/harness/webview-drive-analyse.py: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) static/standalone.js:445 — 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) static/standalone.js:628 — `.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) static/standalone.js:978 — 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) static/standalone.js:1007 — 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) static/standalone.js:1048 — 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) static/standalone.js:1049 — 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) static/standalone.js:1078 — 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) static/standalone.js:1089 — 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) static/standalone.js:1185 — `.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) static/standalone.js:1223 — 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) static/standalone.js:1243 — `.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) static/standalone.js:2017 — 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) static/standalone.js:2793 — 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) static/standalone.js:2886 — 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) static/standalone.js:2930 — 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) static/standalone.js:2940 — 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) static/standalone.js:2958 — 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) static/standalone.js:3189 — 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) static/standalone.js:3198 — 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) static/standalone.js:3213 — 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) static/standalone.js:3444 — 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) static/standalone.js:3453 — 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) static/standalone.js:3468 — 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.
  • + 13 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×29
  • FileTooLong: www/standalone.js android-app/www/standalone.js — FileTooLong — 10303 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 8803 over it, 6.87× 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: static/standalone.js static/standalone.js — FileTooLong — 10303 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 8803 over it, 6.87× 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: docs/standalone.js docs/standalone.js — FileTooLong — 10303 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9803 over it, 20.61× 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: www/index.html android-app/www/index.html — FileTooLong — 7255 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6755 over it, 14.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: docs/index.html docs/index.html — FileTooLong — 7255 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6755 over it, 14.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: static/index.html static/index.html — FileTooLong — 7255 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6755 over it, 14.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/index.js server/src/index.js — FileTooLong — 3116 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 2616 over it, 6.23× 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: drive/DriveForegroundService.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt — FileTooLong — 2287 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DriveForegroundService (75-3093). The bar is 500 significant lines; this is 1787 over it, 4.57× 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: plugin/DriveModePlugin.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt — FileTooLong — 2008 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DriveModePlugin (165-2689). The bar is 500 significant lines; this is 1508 over it, 4.02× 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: eval/exhaustive_video_eval.py eval/exhaustive_video_eval.py — FileTooLong — 1983 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1483 over it, 3.97× 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: eval/run_rad_eval.py eval/run_rad_eval.py — FileTooLong — 1153 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 653 over it, 2.31× 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: tools/build-street-index.mjs infra/aws-central/tools/build-street-index.mjs — FileTooLong — 1130 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 630 over it, 2.26× 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: service/core.mjs infra/aws-central/service/core.mjs — FileTooLong — 1016 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 78% of them inside a single declaration: createService (307-1367). The bar is 500 significant lines; this is 516 over it, 2.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: drive/NativeDriveCameraManager.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt — FileTooLong — 911 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: NativeDriveCameraManager (63-1271). The bar is 500 significant lines; this is 411 over it, 1.82× 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: tools/snapshot-india-wards.mjs infra/aws-central/tools/snapshot-india-wards.mjs — FileTooLong — 895 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 395 over it, 1.79× 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: yolo/prepare_dataset.py ml/yolo/prepare_dataset.py — FileTooLong — 844 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 344 over it, 1.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 308 over it, 1.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: eval/materialize_private_eval.py eval/materialize_private_eval.py — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: bridge/VideoImportStore.kt android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt — FileTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: VideoImportStore (187-893). The bar is 500 significant lines; this is 219 over it, 1.44× 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: eval/private_drive_corpus.py eval/private_drive_corpus.py — FileTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 200 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: yolo/evaluate.py ml/yolo/evaluate.py — FileTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 176 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: drive/NativeRtspFrameSource.kt android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt — FileTooLong — 669 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: NativeRtspFrameSource (40-785). The bar is 500 significant lines; this is 169 over it, 1.34× 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: service/detector.py infra/aws-yolo/service/detector.py — FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: bridge/DriveModePlugin.kt android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt — FileTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: DriveModePlugin (122-831). The bar is 500 significant lines; this is 88 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: drivemode/DriveModeService.kt android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt — FileTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DriveModeService (46-921). The bar is 500 significant lines; this is 66 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 4 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X2 · Cancellation propagation · Async function without AbortSignal · ×20
  • Async function without AbortSignal: prewarm static/standalone.js:1218 — `prewarm` 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: getStatePackManifest static/standalone.js:2007 — `getStatePackManifest` 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: getHighwayPackManifest static/standalone.js:3954 — `getHighwayPackManifest` 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: dataUrlToBlob static/standalone.js:8946 — `dataUrlToBlob` 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: decodeRepairEvidence static/standalone.js:11907 — `decodeRepairEvidence` 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: prewarm docs/standalone.js:1218 — `prewarm` 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: getStatePackManifest docs/standalone.js:2007 — `getStatePackManifest` 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: getHighwayPackManifest docs/standalone.js:3954 — `getHighwayPackManifest` 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: dataUrlToBlob docs/standalone.js:8946 — `dataUrlToBlob` 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: decodeRepairEvidence docs/standalone.js:11907 — `decodeRepairEvidence` 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: prewarm android-app/www/standalone.js:1218 — `prewarm` 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: getStatePackManifest android-app/www/standalone.js:2007 — `getStatePackManifest` 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: getHighwayPackManifest android-app/www/standalone.js:3954 — `getHighwayPackManifest` 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: dataUrlToBlob android-app/www/standalone.js:8946 — `dataUrlToBlob` 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: decodeRepairEvidence android-app/www/standalone.js:11907 — `decodeRepairEvidence` 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: prewarm android-app/android/app/src/main/assets/public/standalone.js:1218 — `prewarm` 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: getStatePackManifest android-app/android/app/src/main/assets/public/standalone.js:2007 — `getStatePackManifest` 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: getHighwayPackManifest android-app/android/app/src/main/assets/public/standalone.js:3954 — `getHighwayPackManifest` 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: dataUrlToBlob android-app/android/app/src/main/assets/public/standalone.js:8946 — `dataUrlToBlob` 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: decodeRepairEvidence android-app/android/app/src/main/assets/public/standalone.js:11907 — `decodeRepairEvidence` 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 })`.
D3 · God Classes · MethodTooLong · ×18
  • MethodTooLong: DriveForegroundService.stopDriveSession android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2118 — MethodTooLong — stopDriveSession runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.34× 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: AppDatabase.reportDao android-app/android/app/src/main/java/com/gauravsen/potholereporter/db/AppDatabase.kt:18 — MethodTooLong — reportDao runs 301 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 201 over it, 3.01× 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: AppDatabase.driveSessionDao android-app/android/app/src/main/java/com/gauravsen/potholereporter/db/AppDatabase.kt:19 — MethodTooLong — driveSessionDao runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.centralObservationDao android-app/android/app/src/main/java/com/gauravsen/potholereporter/db/AppDatabase.kt:20 — MethodTooLong — centralObservationDao runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DriveModePlugin.reconcileNativeState android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1641 — MethodTooLong — reconcileNativeState runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UploadWorker.doWork android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:150 — MethodTooLong — doWork runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× 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: DriveForegroundService.startDriveSession android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:480 — MethodTooLong — startDriveSession runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PotholeDatabase.reportDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:24 — MethodTooLong — reportDao runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PotholeDatabase.eventSightingDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:25 — MethodTooLong — eventSightingDao runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PotholeDatabase.repairTargetDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:26 — MethodTooLong — repairTargetDao runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: PotholeDatabase.repairObservationDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:27 — MethodTooLong — repairObservationDao runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: PotholeDatabase.sessionDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:28 — MethodTooLong — sessionDao 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: PotholeDatabase.footageDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:29 — MethodTooLong — footageDao runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PotholeDatabase.driveKeyframeDao android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/PotholeDatabase.kt:30 — MethodTooLong — driveKeyframeDao runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DriveForegroundService.consumeInferenceJobs android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1672 — MethodTooLong — consumeInferenceJobs 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: VideoImportStore.import android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:197 — MethodTooLong — import runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.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: DriveModeService.processDetection android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:714 — MethodTooLong — processDetection runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: DriveForegroundService.startScanLoop android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:863 — MethodTooLong — startScanLoop runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×18
  • Sync-over-async blocking infra/aws-central/tools/india-ward-runtime.mjs:184 — `fs.mkdtempSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking infra/aws-central/tools/india-ward-runtime.mjs:185 — `fs.writeFileSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking infra/aws-central/tools/india-ward-runtime.mjs:191 — `fs.rmSync` in `wardsFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking ml/classifier/lambda/scorer.mjs:34 — `readFileSync` in `createScorer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking ml/classifier/lambda/scorer.mjs:35 — `readFileSync` in `createScorer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking ml/detector/lambda/locator.mjs:93 — `readFileSync` in `createLocator` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking ml/detector/lambda/locator.mjs:94 — `readFileSync` in `createLocator` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:258 — `mkdirSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:260 — `readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:266 — `readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:275 — `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:308 — `appendFileSync` in `judge` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:331 — `readFileSync` in `callback to Array.from` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:359 — `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:360 — `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/cloud/eval/prompt_eval.mjs:364 — `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/harness/run.mjs:295 — `mkdirSync` in `once` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking tools/harness/run.mjs:297 — `writeFileSync` in `once` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
R4 · Test Coverage · No test reaches this file · ×16
  • No test reaches this file infra/aws-central/tools/verify-local-ownership.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file infra/aws-central/tools/verify-local-address.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tools/harness/run.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tools/harness/check-i18n.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file infra/aws-central/tools/ward-tender-experiment.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file infra/aws-central/tools/tester-report.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ml/classifier/lambda/measure.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tools/harness/restore-defs.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tools/harness/sync-pure-exports.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file server/tools/import-tenders.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file eval/audit_tender_coverage.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ml/detector/lambda/parity.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file tools/harness/serve-docs.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ml/detector/lambda/handler.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ml/classifier/lambda/handler.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file ml/classifier/lambda/score-frames.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×8
  • Animation without a prefers-reduced-motion guard android-app/www/index.html:58 — `details.more summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard android-app/www/index.html:92 — `.group-head .caret` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard android-app/www/index.html:116 — `.ward-tenders summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard android-app/www/index.html:161 — `.spin` moves (`animation: s 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard static/index.html:58 — `details.more summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard static/index.html:92 — `.group-head .caret` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard static/index.html:116 — `.ward-tenders summary::before` moves (`transition: transform .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard static/index.html:161 — `.spin` moves (`animation: s 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D2 · Cognitive Complexity · index.html.renderReports · ×8
  • index.html.renderReports::footageRowHtml (cognitive 19) android-app/android/app/src/main/assets/public/index.html:2646 — index.html.renderReports::footageRowHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::cardHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::footageRowHtml (cognitive 19) android-app/www/index.html:2646 — index.html.renderReports::footageRowHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::cardHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::footageRowHtml (cognitive 19) docs/index.html:2646 — index.html.renderReports::footageRowHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::cardHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::footageRowHtml (cognitive 19) static/index.html:2646 — index.html.renderReports::footageRowHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::cardHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cognitive 17) android-app/android/app/src/main/assets/public/index.html:2563 — index.html.renderReports::cardHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (11 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cognitive 17) android-app/www/index.html:2563 — index.html.renderReports::cardHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (11 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cognitive 17) docs/index.html:2563 — index.html.renderReports::cardHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (11 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cognitive 17) static/index.html:2563 — index.html.renderReports::cardHtml has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (11 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D3 · God Classes · ClassTooLong · ×7
  • ClassTooLong: DriveForegroundService android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:75 — ClassTooLong — 2221 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 1821 over it, 5.55× 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: DriveModePlugin android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:165 — ClassTooLong — 1878 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 1478 over it, 4.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NativeDriveCameraManager android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:63 — ClassTooLong — 860 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 460 over it, 2.15× 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: NativeRtspFrameSource android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:40 — ClassTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 156 over it, 1.39× 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: DriveModeService android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:46 — ClassTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 141 over it, 1.35× 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: VideoImportStore android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:187 — ClassTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 134 over it, 1.34× 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: DriveModePlugin android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:122 — ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×7
  • Edited copy of a member (5 corresponding lines) ml/classifier/datasets.py:44 — ml/classifier/datasets.py:44-49 | REDACTED:71-75 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) infra/aws-yolo/service/detector.py:246 — infra/aws-yolo/service/detector.py:246-250 | tools/cloud/device-farm/run.py:43-47 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeReportEvidenceStorage.kt:276 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeReportEvidenceStorage.kt:276-280 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/NativePrivateMediaFiles.kt:8-14 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) REDACTED:642 — REDACTED:642-646 | ml/yolo/prepare_dataset.py:493-497 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) tools/cloud/cb.py:20 — tools/cloud/cb.py:20-27 | tools/cloud/device-farm/run.py:35-39 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) tools/pull-kppp.py:347 — tools/pull-kppp.py:347-351 | tools/pull-telangana-road-tenders.py:515-519 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) tools/pull-bihar-road-tenders.py:86 — tools/pull-bihar-road-tenders.py:86-90 | tools/pull-telangana-road-tenders.py:72-78 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1394 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1394-1401 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1473-1480 — 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) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:1214 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:1214-1221 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:603-610 — 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 (8 lines × 2) eval/exhaustive_video_eval.py:708 — eval/exhaustive_video_eval.py:708-716 | eval/private_release_gate.py:390-397 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `eval/exhaustive_video_eval.py:708` 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 × 2) infra/aws-yolo/service/detector.py:381 — infra/aws-yolo/service/detector.py:381-388 | ml/yolo/common.py:237-244 — 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.
  • Duplicated block (8 lines × 2) REDACTED:269 — REDACTED:269-276 | REDACTED:322-329 — 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) tools/build-gepnic-road-notice-packs.py:298 — tools/build-gepnic-road-notice-packs.py:298-305 | tools/build-pmgsy-road-agreement-packs.py:356-363 — 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 (8 lines × 2) tools/prune-catalog-packs.py:178 — tools/prune-catalog-packs.py:178-185 | tools/prune-catalog-packs.py:354-361 — 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 (9 lines × 2) · ×6
  • Duplicated block (9 lines × 2) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:786 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:786-794 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1100-1108 — 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 `android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:786` 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) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:912 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:912-920 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DuplicateDetector.kt:219-227 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) eval/private_release_gate.py:458 — eval/private_release_gate.py:458-466 | eval/run_rad_eval.py:1103-1111 — 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 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) tools/build-maharashtra-coverage.py:38 — tools/build-maharashtra-coverage.py:38-46 | tools/build-west-bengal-coverage.py:41-49 — before extracting anything, compare `tools/build-maharashtra-coverage.py` and `tools/build-west-bengal-coverage.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) tools/build-maharashtra-coverage.py:51 — tools/build-maharashtra-coverage.py:51-59 | tools/build-west-bengal-coverage.py:62-70 — before extracting anything, compare `tools/build-maharashtra-coverage.py` and `tools/build-west-bengal-coverage.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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) tools/pull-bihar-road-tenders.py:527 — tools/pull-bihar-road-tenders.py:527-535 | tools/pull-telangana-road-tenders.py:533-541 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-bihar-road-tenders.py:527` 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 (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) REDACTED:187 — REDACTED:187-192 | REDACTED:298-303 — 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 (6 lines × 2) ml/yolo/common.py:412 — ml/yolo/common.py:412-417 | ml/yolo/prepare_dataset.py:819-824 — 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 (6 lines × 2) ml/classifier/evaluate.py:214 — ml/classifier/evaluate.py:214-219 | ml/classifier/evaluate.py:222-227 — 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 `ml/classifier/evaluate.py:214` 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 (6 lines × 2) tools/pull-kppp.py:372 — tools/pull-kppp.py:372-377 | tools/pull-telangana-road-tenders.py:536-541 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-kppp.py:372` 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 (6 lines × 2) tools/pull-bihar-road-tenders.py:454 — tools/pull-bihar-road-tenders.py:454-459 | tools/pull-telangana-road-tenders.py:477-482 — 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 (6 lines × 2) tools/build-gepnic-road-notice-packs.py:172 — tools/build-gepnic-road-notice-packs.py:172-177 | tools/build-pmgsy-road-agreement-packs.py:195-200 — 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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:148 — tools/build-andhra-pradesh-coverage.py:148-159 | tools/build-punjab-coverage.py:143-154 | tools/build-tamil-nadu-coverage.py:156-167 | tools/build-telangana-coverage.py:149-160 | tools/statewide_boundary_builder.py:131-142 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:163 — tools/build-andhra-pradesh-coverage.py:163-169 | tools/build-punjab-coverage.py:158-164 | tools/build-tamil-nadu-coverage.py:171-177 | tools/build-telangana-coverage.py:164-170 | tools/statewide_boundary_builder.py:146-152 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:259 — tools/build-andhra-pradesh-coverage.py:259-286 | tools/build-punjab-coverage.py:256-284 | tools/build-tamil-nadu-coverage.py:268-295 | tools/build-telangana-coverage.py:262-289 | tools/build-top50-coverage.py:510-537 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/build-gepnic-road-notice-packs.py:152 — tools/build-gepnic-road-notice-packs.py:152-168 | tools/build-highway-contract-packs.py:148-164 | tools/build-pmgsy-road-agreement-packs.py:175-191 | tools/pull-pmgsy-road-agreements.py:454-475 | tools/state_pack_tools.py:857-876 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/pull-bihar-road-tenders.py:511 — tools/pull-bihar-road-tenders.py:511-515 | tools/pull-chhattisgarh-chips-road-tenders.py:333-337 | tools/pull-gujarat-nprocure-road-tenders.py:124-128 | tools/pull-lakshadweep-road-tenders.py:136-140 | tools/pull-pmgsy-road-agreements.py:503-507 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) tools/state_pack_tools.py:1357 — tools/state_pack_tools.py:1357-1443 | tools/state_pack_tools.py:1452-1539 | tools/state_pack_tools.py:1548-1636 | tools/state_pack_tools.py:1646-1880 | tools/state_pack_tools.py:1890-1963 — These 5 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 5 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 5 times.
D1 · Cyclomatic Complexity · standalone.handle (cyclomatic 188) · ×4
  • standalone.handle (cyclomatic 188) android-app/android/app/src/main/assets/public/standalone.js:10636 — standalone.handle has cyclomatic complexity 188 (threshold 15). Of this number, 165 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.handle (cyclomatic 188) android-app/www/standalone.js:10636 — standalone.handle has cyclomatic complexity 188 (threshold 15). Of this number, 165 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.handle (cyclomatic 188) docs/standalone.js:10636 — standalone.handle has cyclomatic complexity 188 (threshold 15). Of this number, 165 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.handle (cyclomatic 188) static/standalone.js:10636 — standalone.handle has cyclomatic complexity 188 (threshold 15). Of this number, 165 points are the body's own statements and 23 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.analyseFootage (cyclomatic 162) · ×4
  • index.html.analyseFootage (cyclomatic 162) android-app/android/app/src/main/assets/public/index.html:8197 — index.html.analyseFootage has cyclomatic complexity 162 (threshold 15). Of this number, 74 points are the body's own statements and 88 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.analyseFootage (cyclomatic 162) android-app/www/index.html:8197 — index.html.analyseFootage has cyclomatic complexity 162 (threshold 15). Of this number, 74 points are the body's own statements and 88 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.analyseFootage (cyclomatic 162) docs/index.html:8197 — index.html.analyseFootage has cyclomatic complexity 162 (threshold 15). Of this number, 74 points are the body's own statements and 88 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.analyseFootage (cyclomatic 162) static/index.html:8197 — index.html.analyseFootage has cyclomatic complexity 162 (threshold 15). Of this number, 74 points are the body's own statements and 88 belong to 18 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.validateRoutingPack (cyclomatic 132) · ×4
  • standalone.validateRoutingPack (cyclomatic 132) android-app/android/app/src/main/assets/public/standalone.js:2556 — standalone.validateRoutingPack has cyclomatic complexity 132 (threshold 15). Of this number, 129 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateRoutingPack (cyclomatic 132) android-app/www/standalone.js:2556 — standalone.validateRoutingPack has cyclomatic complexity 132 (threshold 15). Of this number, 129 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateRoutingPack (cyclomatic 132) docs/standalone.js:2556 — standalone.validateRoutingPack has cyclomatic complexity 132 (threshold 15). Of this number, 129 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateRoutingPack (cyclomatic 132) static/standalone.js:2556 — standalone.validateRoutingPack has cyclomatic complexity 132 (threshold 15). Of this number, 129 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.currentOfficialRouteBinding (cyclomatic 128) · ×4
  • standalone.currentOfficialRouteBinding (cyclomatic 128) android-app/android/app/src/main/assets/public/standalone.js:12534 — standalone.currentOfficialRouteBinding has cyclomatic complexity 128 (threshold 15). Of this number, 126 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.currentOfficialRouteBinding (cyclomatic 128) android-app/www/standalone.js:12534 — standalone.currentOfficialRouteBinding has cyclomatic complexity 128 (threshold 15). Of this number, 126 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.currentOfficialRouteBinding (cyclomatic 128) docs/standalone.js:12534 — standalone.currentOfficialRouteBinding has cyclomatic complexity 128 (threshold 15). Of this number, 126 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.currentOfficialRouteBinding (cyclomatic 128) static/standalone.js:12534 — standalone.currentOfficialRouteBinding has cyclomatic complexity 128 (threshold 15). Of this number, 126 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · standalone.routeOfficer (cyclomatic 127) · ×4
  • standalone.routeOfficer (cyclomatic 127) android-app/android/app/src/main/assets/public/standalone.js:5689 — standalone.routeOfficer has cyclomatic complexity 127 (threshold 15). Of this number, 116 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.routeOfficer (cyclomatic 127) android-app/www/standalone.js:5689 — standalone.routeOfficer has cyclomatic complexity 127 (threshold 15). Of this number, 116 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.routeOfficer (cyclomatic 127) docs/standalone.js:5689 — standalone.routeOfficer has cyclomatic complexity 127 (threshold 15). Of this number, 116 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.routeOfficer (cyclomatic 127) static/standalone.js:5689 — standalone.routeOfficer has cyclomatic complexity 127 (threshold 15). Of this number, 116 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.savedOfficialRouteBinding (cyclomatic 124) · ×4
  • standalone.savedOfficialRouteBinding (cyclomatic 124) android-app/android/app/src/main/assets/public/standalone.js:12333 — standalone.savedOfficialRouteBinding has cyclomatic complexity 124 (threshold 15). Of this number, 122 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.
  • standalone.savedOfficialRouteBinding (cyclomatic 124) android-app/www/standalone.js:12333 — standalone.savedOfficialRouteBinding has cyclomatic complexity 124 (threshold 15). Of this number, 122 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.
  • standalone.savedOfficialRouteBinding (cyclomatic 124) docs/standalone.js:12333 — standalone.savedOfficialRouteBinding has cyclomatic complexity 124 (threshold 15). Of this number, 122 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.
  • standalone.savedOfficialRouteBinding (cyclomatic 124) static/standalone.js:12333 — standalone.savedOfficialRouteBinding has cyclomatic complexity 124 (threshold 15). Of this number, 122 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 · index.html.sendReport (cyclomatic 98) · ×4
  • index.html.sendReport (cyclomatic 98) android-app/android/app/src/main/assets/public/index.html:3851 — index.html.sendReport has cyclomatic complexity 98 (threshold 15). Of this number, 95 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cyclomatic 98) android-app/www/index.html:3851 — index.html.sendReport has cyclomatic complexity 98 (threshold 15). Of this number, 95 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cyclomatic 98) docs/index.html:3851 — index.html.sendReport has cyclomatic complexity 98 (threshold 15). Of this number, 95 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cyclomatic 98) static/index.html:3851 — index.html.sendReport has cyclomatic complexity 98 (threshold 15). Of this number, 95 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.runNativeVideoAnalysis (cyclomatic 94) · ×4
  • index.html.runNativeVideoAnalysis (cyclomatic 94) android-app/android/app/src/main/assets/public/index.html:7949 — index.html.runNativeVideoAnalysis has cyclomatic complexity 94 (threshold 15). Of this number, 85 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runNativeVideoAnalysis (cyclomatic 94) android-app/www/index.html:7949 — index.html.runNativeVideoAnalysis has cyclomatic complexity 94 (threshold 15). Of this number, 85 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runNativeVideoAnalysis (cyclomatic 94) docs/index.html:7949 — index.html.runNativeVideoAnalysis has cyclomatic complexity 94 (threshold 15). Of this number, 85 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runNativeVideoAnalysis (cyclomatic 94) static/index.html:7949 — index.html.runNativeVideoAnalysis has cyclomatic complexity 94 (threshold 15). Of this number, 85 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.runImportedVideoAnalysis (cyclomatic 89) · ×4
  • index.html.runImportedVideoAnalysis (cyclomatic 89) android-app/android/app/src/main/assets/public/index.html:7562 — index.html.runImportedVideoAnalysis has cyclomatic complexity 89 (threshold 15). Of this number, 83 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runImportedVideoAnalysis (cyclomatic 89) android-app/www/index.html:7562 — index.html.runImportedVideoAnalysis has cyclomatic complexity 89 (threshold 15). Of this number, 83 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runImportedVideoAnalysis (cyclomatic 89) docs/index.html:7562 — index.html.runImportedVideoAnalysis has cyclomatic complexity 89 (threshold 15). Of this number, 83 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.runImportedVideoAnalysis (cyclomatic 89) static/index.html:7562 — index.html.runImportedVideoAnalysis has cyclomatic complexity 89 (threshold 15). Of this number, 83 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.openDetail (cyclomatic 88) · ×4
  • index.html.openDetail (cyclomatic 88) android-app/android/app/src/main/assets/public/index.html:3636 — index.html.openDetail has cyclomatic complexity 88 (threshold 15). Of this number, 68 points are the body's own statements and 20 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.
  • index.html.openDetail (cyclomatic 88) android-app/www/index.html:3636 — index.html.openDetail has cyclomatic complexity 88 (threshold 15). Of this number, 68 points are the body's own statements and 20 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.
  • index.html.openDetail (cyclomatic 88) docs/index.html:3636 — index.html.openDetail has cyclomatic complexity 88 (threshold 15). Of this number, 68 points are the body's own statements and 20 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.
  • index.html.openDetail (cyclomatic 88) static/index.html:3636 — index.html.openDetail has cyclomatic complexity 88 (threshold 15). Of this number, 68 points are the body's own statements and 20 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 · standalone.savedNonMunicipalLocationMatches (cyclomatic 85) · ×4
  • standalone.savedNonMunicipalLocationMatches (cyclomatic 85) android-app/android/app/src/main/assets/public/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cyclomatic complexity 85 (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.
  • standalone.savedNonMunicipalLocationMatches (cyclomatic 85) android-app/www/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cyclomatic complexity 85 (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.
  • standalone.savedNonMunicipalLocationMatches (cyclomatic 85) docs/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cyclomatic complexity 85 (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.
  • standalone.savedNonMunicipalLocationMatches (cyclomatic 85) static/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cyclomatic complexity 85 (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 · index.html.restoreNativeDrive (cyclomatic 82) · ×4
  • index.html.restoreNativeDrive (cyclomatic 82) android-app/android/app/src/main/assets/public/index.html:6225 — index.html.restoreNativeDrive has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.restoreNativeDrive (cyclomatic 82) android-app/www/index.html:6225 — index.html.restoreNativeDrive has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.restoreNativeDrive (cyclomatic 82) docs/index.html:6225 — index.html.restoreNativeDrive has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.restoreNativeDrive (cyclomatic 82) static/index.html:6225 — index.html.restoreNativeDrive has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.validateRoadAgreementPack (cyclomatic 81) · ×4
  • standalone.validateRoadAgreementPack (cyclomatic 81) android-app/android/app/src/main/assets/public/standalone.js:3599 — standalone.validateRoadAgreementPack has cyclomatic complexity 81 (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.
  • standalone.validateRoadAgreementPack (cyclomatic 81) android-app/www/standalone.js:3599 — standalone.validateRoadAgreementPack has cyclomatic complexity 81 (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.
  • standalone.validateRoadAgreementPack (cyclomatic 81) docs/standalone.js:3599 — standalone.validateRoadAgreementPack has cyclomatic complexity 81 (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.
  • standalone.validateRoadAgreementPack (cyclomatic 81) static/standalone.js:3599 — standalone.validateRoadAgreementPack has cyclomatic complexity 81 (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 · standalone.validateMunicipalCityPayload (cyclomatic 78) · ×4
  • standalone.validateMunicipalCityPayload (cyclomatic 78) android-app/android/app/src/main/assets/public/standalone.js:2157 — standalone.validateMunicipalCityPayload has cyclomatic complexity 78 (threshold 15). Of this number, 72 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMunicipalCityPayload (cyclomatic 78) android-app/www/standalone.js:2157 — standalone.validateMunicipalCityPayload has cyclomatic complexity 78 (threshold 15). Of this number, 72 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMunicipalCityPayload (cyclomatic 78) docs/standalone.js:2157 — standalone.validateMunicipalCityPayload has cyclomatic complexity 78 (threshold 15). Of this number, 72 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMunicipalCityPayload (cyclomatic 78) static/standalone.js:2157 — standalone.validateMunicipalCityPayload has cyclomatic complexity 78 (threshold 15). Of this number, 72 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.installRoutingAuthorities (cyclomatic 77) · ×4
  • standalone.installRoutingAuthorities (cyclomatic 77) android-app/android/app/src/main/assets/public/standalone.js:1442 — standalone.installRoutingAuthorities has cyclomatic complexity 77 (threshold 15). Of this number, 74 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.
  • standalone.installRoutingAuthorities (cyclomatic 77) android-app/www/standalone.js:1442 — standalone.installRoutingAuthorities has cyclomatic complexity 77 (threshold 15). Of this number, 74 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.
  • standalone.installRoutingAuthorities (cyclomatic 77) docs/standalone.js:1442 — standalone.installRoutingAuthorities has cyclomatic complexity 77 (threshold 15). Of this number, 74 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.
  • standalone.installRoutingAuthorities (cyclomatic 77) static/standalone.js:1442 — standalone.installRoutingAuthorities has cyclomatic complexity 77 (threshold 15). Of this number, 74 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 · index.html.updateNativeDriveHud (cyclomatic 72) · ×4
  • index.html.updateNativeDriveHud (cyclomatic 72) android-app/android/app/src/main/assets/public/index.html:4533 — index.html.updateNativeDriveHud has cyclomatic complexity 72 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.updateNativeDriveHud (cyclomatic 72) android-app/www/index.html:4533 — index.html.updateNativeDriveHud has cyclomatic complexity 72 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.updateNativeDriveHud (cyclomatic 72) docs/index.html:4533 — index.html.updateNativeDriveHud has cyclomatic complexity 72 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.updateNativeDriveHud (cyclomatic 72) static/index.html:4533 — index.html.updateNativeDriveHud has cyclomatic complexity 72 (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 · standalone.buildComplaintOutputs (cyclomatic 72) · ×4
  • standalone.buildComplaintOutputs (cyclomatic 72) android-app/android/app/src/main/assets/public/standalone.js:7694 — standalone.buildComplaintOutputs has cyclomatic complexity 72 (threshold 15). Of this number, 62 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.buildComplaintOutputs (cyclomatic 72) android-app/www/standalone.js:7694 — standalone.buildComplaintOutputs has cyclomatic complexity 72 (threshold 15). Of this number, 62 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.buildComplaintOutputs (cyclomatic 72) docs/standalone.js:7694 — standalone.buildComplaintOutputs has cyclomatic complexity 72 (threshold 15). Of this number, 62 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.buildComplaintOutputs (cyclomatic 72) static/standalone.js:7694 — standalone.buildComplaintOutputs has cyclomatic complexity 72 (threshold 15). Of this number, 62 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.startDriveAdmitted (cyclomatic 71) · ×4
  • index.html.startDriveAdmitted (cyclomatic 71) android-app/android/app/src/main/assets/public/index.html:5247 — index.html.startDriveAdmitted has cyclomatic complexity 71 (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 (index.html.startDriveAdmitted::onPosition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted (cyclomatic 71) android-app/www/index.html:5247 — index.html.startDriveAdmitted has cyclomatic complexity 71 (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 (index.html.startDriveAdmitted::onPosition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted (cyclomatic 71) docs/index.html:5247 — index.html.startDriveAdmitted has cyclomatic complexity 71 (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 (index.html.startDriveAdmitted::onPosition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted (cyclomatic 71) static/index.html:5247 — index.html.startDriveAdmitted has cyclomatic complexity 71 (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 (index.html.startDriveAdmitted::onPosition) 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 · standalone.migrateLegacyComplaintRecord (cyclomatic 71) · ×4
  • standalone.migrateLegacyComplaintRecord (cyclomatic 71) android-app/android/app/src/main/assets/public/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cyclomatic complexity 71 (threshold 15). Of this number, 67 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.migrateLegacyComplaintRecord (cyclomatic 71) android-app/www/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cyclomatic complexity 71 (threshold 15). Of this number, 67 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.migrateLegacyComplaintRecord (cyclomatic 71) docs/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cyclomatic complexity 71 (threshold 15). Of this number, 67 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.migrateLegacyComplaintRecord (cyclomatic 71) static/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cyclomatic complexity 71 (threshold 15). Of this number, 67 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.validateHighwayManifest (cyclomatic 70) · ×4
  • standalone.validateHighwayManifest (cyclomatic 70) android-app/android/app/src/main/assets/public/standalone.js:3865 — standalone.validateHighwayManifest has cyclomatic complexity 70 (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.
  • standalone.validateHighwayManifest (cyclomatic 70) android-app/www/standalone.js:3865 — standalone.validateHighwayManifest has cyclomatic complexity 70 (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.
  • standalone.validateHighwayManifest (cyclomatic 70) docs/standalone.js:3865 — standalone.validateHighwayManifest has cyclomatic complexity 70 (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.
  • standalone.validateHighwayManifest (cyclomatic 70) static/standalone.js:3865 — standalone.validateHighwayManifest has cyclomatic complexity 70 (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 · index.html.finishNativeDrive (cyclomatic 67) · ×4
  • index.html.finishNativeDrive (cyclomatic 67) android-app/android/app/src/main/assets/public/index.html:4883 — index.html.finishNativeDrive has cyclomatic complexity 67 (threshold 15). Of this number, 56 points are the body's own statements and 11 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.
  • index.html.finishNativeDrive (cyclomatic 67) android-app/www/index.html:4883 — index.html.finishNativeDrive has cyclomatic complexity 67 (threshold 15). Of this number, 56 points are the body's own statements and 11 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.
  • index.html.finishNativeDrive (cyclomatic 67) docs/index.html:4883 — index.html.finishNativeDrive has cyclomatic complexity 67 (threshold 15). Of this number, 56 points are the body's own statements and 11 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.
  • index.html.finishNativeDrive (cyclomatic 67) static/index.html:4883 — index.html.finishNativeDrive has cyclomatic complexity 67 (threshold 15). Of this number, 56 points are the body's own statements and 11 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 · standalone.validateRoadNoticePack (cyclomatic 66) · ×4
  • standalone.validateRoadNoticePack (cyclomatic 66) android-app/android/app/src/main/assets/public/standalone.js:3333 — standalone.validateRoadNoticePack has cyclomatic complexity 66 (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.
  • standalone.validateRoadNoticePack (cyclomatic 66) android-app/www/standalone.js:3333 — standalone.validateRoadNoticePack has cyclomatic complexity 66 (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.
  • standalone.validateRoadNoticePack (cyclomatic 66) docs/standalone.js:3333 — standalone.validateRoadNoticePack has cyclomatic complexity 66 (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.
  • standalone.validateRoadNoticePack (cyclomatic 66) static/standalone.js:3333 — standalone.validateRoadNoticePack has cyclomatic complexity 66 (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 · standalone.validateHighwayContractPack (cyclomatic 64) · ×4
  • standalone.validateHighwayContractPack (cyclomatic 64) android-app/android/app/src/main/assets/public/standalone.js:3095 — standalone.validateHighwayContractPack has cyclomatic complexity 64 (threshold 15). Of this number, 60 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.
  • standalone.validateHighwayContractPack (cyclomatic 64) android-app/www/standalone.js:3095 — standalone.validateHighwayContractPack has cyclomatic complexity 64 (threshold 15). Of this number, 60 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.
  • standalone.validateHighwayContractPack (cyclomatic 64) docs/standalone.js:3095 — standalone.validateHighwayContractPack has cyclomatic complexity 64 (threshold 15). Of this number, 60 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.
  • standalone.validateHighwayContractPack (cyclomatic 64) static/standalone.js:3095 — standalone.validateHighwayContractPack has cyclomatic complexity 64 (threshold 15). Of this number, 60 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.
D1 · Cyclomatic Complexity · standalone.validateRoadAgreementManifest (cyclomatic 64) · ×4
  • standalone.validateRoadAgreementManifest (cyclomatic 64) android-app/android/app/src/main/assets/public/standalone.js:3520 — standalone.validateRoadAgreementManifest has cyclomatic complexity 64 (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.
  • standalone.validateRoadAgreementManifest (cyclomatic 64) android-app/www/standalone.js:3520 — standalone.validateRoadAgreementManifest has cyclomatic complexity 64 (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.
  • standalone.validateRoadAgreementManifest (cyclomatic 64) docs/standalone.js:3520 — standalone.validateRoadAgreementManifest has cyclomatic complexity 64 (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.
  • standalone.validateRoadAgreementManifest (cyclomatic 64) static/standalone.js:3520 — standalone.validateRoadAgreementManifest has cyclomatic complexity 64 (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 · index.html.handleFile (cyclomatic 62) · ×4
  • index.html.handleFile (cyclomatic 62) android-app/android/app/src/main/assets/public/index.html:3229 — index.html.handleFile has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.handleFile (cyclomatic 62) android-app/www/index.html:3229 — index.html.handleFile has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.handleFile (cyclomatic 62) docs/index.html:3229 — index.html.handleFile has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.handleFile (cyclomatic 62) static/index.html:3229 — index.html.handleFile has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.validateRoadNoticeManifest (cyclomatic 60) · ×4
  • standalone.validateRoadNoticeManifest (cyclomatic 60) android-app/android/app/src/main/assets/public/standalone.js:3260 — standalone.validateRoadNoticeManifest has cyclomatic complexity 60 (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.
  • standalone.validateRoadNoticeManifest (cyclomatic 60) android-app/www/standalone.js:3260 — standalone.validateRoadNoticeManifest has cyclomatic complexity 60 (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.
  • standalone.validateRoadNoticeManifest (cyclomatic 60) docs/standalone.js:3260 — standalone.validateRoadNoticeManifest has cyclomatic complexity 60 (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.
  • standalone.validateRoadNoticeManifest (cyclomatic 60) static/standalone.js:3260 — standalone.validateRoadNoticeManifest has cyclomatic complexity 60 (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 · standalone.normaliseTenderMatch (cyclomatic 57) · ×4
  • standalone.normaliseTenderMatch (cyclomatic 57) android-app/android/app/src/main/assets/public/standalone.js:7510 — standalone.normaliseTenderMatch has cyclomatic complexity 57 (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.
  • standalone.normaliseTenderMatch (cyclomatic 57) android-app/www/standalone.js:7510 — standalone.normaliseTenderMatch has cyclomatic complexity 57 (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.
  • standalone.normaliseTenderMatch (cyclomatic 57) docs/standalone.js:7510 — standalone.normaliseTenderMatch has cyclomatic complexity 57 (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.
  • standalone.normaliseTenderMatch (cyclomatic 57) static/standalone.js:7510 — standalone.normaliseTenderMatch has cyclomatic complexity 57 (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 · standalone.draftCivicComplaint (cyclomatic 57) · ×4
  • standalone.draftCivicComplaint (cyclomatic 57) android-app/android/app/src/main/assets/public/standalone.js:8106 — standalone.draftCivicComplaint 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.
  • standalone.draftCivicComplaint (cyclomatic 57) android-app/www/standalone.js:8106 — standalone.draftCivicComplaint 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.
  • standalone.draftCivicComplaint (cyclomatic 57) docs/standalone.js:8106 — standalone.draftCivicComplaint 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.
  • standalone.draftCivicComplaint (cyclomatic 57) static/standalone.js:8106 — standalone.draftCivicComplaint 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.html.renderReports (cyclomatic 55) · ×4
  • index.html.renderReports (cyclomatic 55) android-app/android/app/src/main/assets/public/index.html:2508 — index.html.renderReports has cyclomatic complexity 55 (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 (index.html.renderReports::cardHtml) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cyclomatic 55) android-app/www/index.html:2508 — index.html.renderReports has cyclomatic complexity 55 (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 (index.html.renderReports::cardHtml) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cyclomatic 55) docs/index.html:2508 — index.html.renderReports has cyclomatic complexity 55 (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 (index.html.renderReports::cardHtml) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cyclomatic 55) static/index.html:2508 — index.html.renderReports has cyclomatic complexity 55 (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 (index.html.renderReports::cardHtml) 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 · standalone.validateStatePackManifest (cyclomatic 55) · ×4
  • standalone.validateStatePackManifest (cyclomatic 55) android-app/android/app/src/main/assets/public/standalone.js:1949 — standalone.validateStatePackManifest has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
  • standalone.validateStatePackManifest (cyclomatic 55) android-app/www/standalone.js:1949 — standalone.validateStatePackManifest has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
  • standalone.validateStatePackManifest (cyclomatic 55) docs/standalone.js:1949 — standalone.validateStatePackManifest has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
  • standalone.validateStatePackManifest (cyclomatic 55) static/standalone.js:1949 — standalone.validateStatePackManifest has cyclomatic complexity 55 (threshold 15). Of this number, 54 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 · index.html.driveTick (cyclomatic 53) · ×4
  • index.html.driveTick (cyclomatic 53) android-app/android/app/src/main/assets/public/index.html:5881 — index.html.driveTick 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.
  • index.html.driveTick (cyclomatic 53) android-app/www/index.html:5881 — index.html.driveTick 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.
  • index.html.driveTick (cyclomatic 53) docs/index.html:5881 — index.html.driveTick 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.
  • index.html.driveTick (cyclomatic 53) static/index.html:5881 — index.html.driveTick 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 · standalone.pruneStatePacks (cyclomatic 51) · ×4
  • standalone.pruneStatePacks (cyclomatic 51) android-app/android/app/src/main/assets/public/standalone.js:2805 — standalone.pruneStatePacks has cyclomatic complexity 51 (threshold 15). Of this number, 45 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.
  • standalone.pruneStatePacks (cyclomatic 51) android-app/www/standalone.js:2805 — standalone.pruneStatePacks has cyclomatic complexity 51 (threshold 15). Of this number, 45 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.
  • standalone.pruneStatePacks (cyclomatic 51) docs/standalone.js:2805 — standalone.pruneStatePacks has cyclomatic complexity 51 (threshold 15). Of this number, 45 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.
  • standalone.pruneStatePacks (cyclomatic 51) static/standalone.js:2805 — standalone.pruneStatePacks has cyclomatic complexity 51 (threshold 15). Of this number, 45 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 · standalone.addReportUnlessDuplicate (cyclomatic 51) · ×4
  • standalone.addReportUnlessDuplicate (cyclomatic 51) android-app/android/app/src/main/assets/public/standalone.js:8760 — standalone.addReportUnlessDuplicate has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 8786, 8785, 8761, …). 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.
  • standalone.addReportUnlessDuplicate (cyclomatic 51) android-app/www/standalone.js:8760 — standalone.addReportUnlessDuplicate has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 8786, 8785, 8761, …). 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.
  • standalone.addReportUnlessDuplicate (cyclomatic 51) docs/standalone.js:8760 — standalone.addReportUnlessDuplicate has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 8786, 8785, 8761, …). 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.
  • standalone.addReportUnlessDuplicate (cyclomatic 51) static/standalone.js:8760 — standalone.addReportUnlessDuplicate has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 8786, 8785, 8761, …). 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.html.openDash (cyclomatic 49) · ×4
  • index.html.openDash (cyclomatic 49) android-app/android/app/src/main/assets/public/index.html:8855 — index.html.openDash has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.openDash (cyclomatic 49) android-app/www/index.html:8855 — index.html.openDash has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.openDash (cyclomatic 49) docs/index.html:8855 — index.html.openDash has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.openDash (cyclomatic 49) static/index.html:8855 — index.html.openDash has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 belong to 6 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 · index.html.replayNativeKeyframeBatch (cyclomatic 48) · ×4
  • index.html.replayNativeKeyframeBatch (cyclomatic 48) android-app/android/app/src/main/assets/public/index.html:6847 — index.html.replayNativeKeyframeBatch has cyclomatic complexity 48 (threshold 15). Of this number, 42 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.replayNativeKeyframeBatch (cyclomatic 48) android-app/www/index.html:6847 — index.html.replayNativeKeyframeBatch has cyclomatic complexity 48 (threshold 15). Of this number, 42 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.replayNativeKeyframeBatch (cyclomatic 48) docs/index.html:6847 — index.html.replayNativeKeyframeBatch has cyclomatic complexity 48 (threshold 15). Of this number, 42 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.replayNativeKeyframeBatch (cyclomatic 48) static/index.html:6847 — index.html.replayNativeKeyframeBatch has cyclomatic complexity 48 (threshold 15). Of this number, 42 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.validateContractPackManifest (cyclomatic 48) · ×4
  • standalone.validateContractPackManifest (cyclomatic 48) android-app/android/app/src/main/assets/public/standalone.js:3031 — standalone.validateContractPackManifest has cyclomatic complexity 48 (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.
  • standalone.validateContractPackManifest (cyclomatic 48) android-app/www/standalone.js:3031 — standalone.validateContractPackManifest has cyclomatic complexity 48 (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.
  • standalone.validateContractPackManifest (cyclomatic 48) docs/standalone.js:3031 — standalone.validateContractPackManifest has cyclomatic complexity 48 (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.
  • standalone.validateContractPackManifest (cyclomatic 48) static/standalone.js:3031 — standalone.validateContractPackManifest has cyclomatic complexity 48 (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 · standalone.decodeRepairEvidence (cyclomatic 48) · ×4
  • standalone.decodeRepairEvidence (cyclomatic 48) android-app/android/app/src/main/assets/public/standalone.js:11907 — standalone.decodeRepairEvidence has cyclomatic complexity 48 (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.
  • standalone.decodeRepairEvidence (cyclomatic 48) android-app/www/standalone.js:11907 — standalone.decodeRepairEvidence has cyclomatic complexity 48 (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.
  • standalone.decodeRepairEvidence (cyclomatic 48) docs/standalone.js:11907 — standalone.decodeRepairEvidence has cyclomatic complexity 48 (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.
  • standalone.decodeRepairEvidence (cyclomatic 48) static/standalone.js:11907 — standalone.decodeRepairEvidence has cyclomatic complexity 48 (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 · index.html.drainDriveQueue (cyclomatic 46) · ×4
  • index.html.drainDriveQueue (cyclomatic 46) android-app/android/app/src/main/assets/public/index.html:5693 — index.html.drainDriveQueue has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5740, 5720). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.drainDriveQueue (cyclomatic 46) android-app/www/index.html:5693 — index.html.drainDriveQueue has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5740, 5720). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.drainDriveQueue (cyclomatic 46) docs/index.html:5693 — index.html.drainDriveQueue has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5740, 5720). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.drainDriveQueue (cyclomatic 46) static/index.html:5693 — index.html.drainDriveQueue has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5740, 5720). 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 · standalone.validateMajorCityPayload (cyclomatic 46) · ×4
  • standalone.validateMajorCityPayload (cyclomatic 46) android-app/android/app/src/main/assets/public/standalone.js:2494 — standalone.validateMajorCityPayload has cyclomatic complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMajorCityPayload (cyclomatic 46) android-app/www/standalone.js:2494 — standalone.validateMajorCityPayload has cyclomatic complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMajorCityPayload (cyclomatic 46) docs/standalone.js:2494 — standalone.validateMajorCityPayload has cyclomatic complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.validateMajorCityPayload (cyclomatic 46) static/standalone.js:2494 — standalone.validateMajorCityPayload has cyclomatic complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.scheduleNativeKeyframeReplay (cyclomatic 45) · ×4
  • index.html.scheduleNativeKeyframeReplay (cyclomatic 45) android-app/android/app/src/main/assets/public/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cyclomatic 45) android-app/www/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cyclomatic 45) docs/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cyclomatic 45) static/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). 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 · standalone.roadEventMatch (cyclomatic 44) · ×4
  • standalone.roadEventMatch (cyclomatic 44) android-app/android/app/src/main/assets/public/standalone.js:6243 — standalone.roadEventMatch has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.roadEventMatch (cyclomatic 44) android-app/www/standalone.js:6243 — standalone.roadEventMatch has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.roadEventMatch (cyclomatic 44) docs/standalone.js:6243 — standalone.roadEventMatch has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.roadEventMatch (cyclomatic 44) static/standalone.js:6243 — standalone.roadEventMatch has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a 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.html.ensureNativeDriveListeners (cyclomatic 41) · ×4
  • index.html.ensureNativeDriveListeners (cyclomatic 41) android-app/android/app/src/main/assets/public/index.html:5043 — index.html.ensureNativeDriveListeners has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 3 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cyclomatic 41) android-app/www/index.html:5043 — index.html.ensureNativeDriveListeners has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 3 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cyclomatic 41) docs/index.html:5043 — index.html.ensureNativeDriveListeners has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 3 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cyclomatic 41) static/index.html:5043 — index.html.ensureNativeDriveListeners has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 3 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). 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 · standalone.tenderCoversCarriageway (cyclomatic 39) · ×4
  • standalone.tenderCoversCarriageway (cyclomatic 39) android-app/android/app/src/main/assets/public/standalone.js:6421 — standalone.tenderCoversCarriageway has cyclomatic complexity 39 (threshold 15). Of this number, 36 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.
  • standalone.tenderCoversCarriageway (cyclomatic 39) android-app/www/standalone.js:6421 — standalone.tenderCoversCarriageway has cyclomatic complexity 39 (threshold 15). Of this number, 36 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.
  • standalone.tenderCoversCarriageway (cyclomatic 39) docs/standalone.js:6421 — standalone.tenderCoversCarriageway has cyclomatic complexity 39 (threshold 15). Of this number, 36 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.
  • standalone.tenderCoversCarriageway (cyclomatic 39) static/standalone.js:6421 — standalone.tenderCoversCarriageway has cyclomatic complexity 39 (threshold 15). Of this number, 36 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 · standalone.verifiedContractForComplaint (cyclomatic 39) · ×4
  • standalone.verifiedContractForComplaint (cyclomatic 39) android-app/android/app/src/main/assets/public/standalone.js:7582 — standalone.verifiedContractForComplaint has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.verifiedContractForComplaint (cyclomatic 39) android-app/www/standalone.js:7582 — standalone.verifiedContractForComplaint has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.verifiedContractForComplaint (cyclomatic 39) docs/standalone.js:7582 — standalone.verifiedContractForComplaint has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.verifiedContractForComplaint (cyclomatic 39) static/standalone.js:7582 — standalone.verifiedContractForComplaint has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.binaryAssessment (cyclomatic 38) · ×4
  • standalone.binaryAssessment (cyclomatic 38) android-app/android/app/src/main/assets/public/standalone.js:872 — standalone.binaryAssessment has cyclomatic complexity 38 (threshold 15). Of this number, 36 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.
  • standalone.binaryAssessment (cyclomatic 38) android-app/www/standalone.js:872 — standalone.binaryAssessment has cyclomatic complexity 38 (threshold 15). Of this number, 36 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.
  • standalone.binaryAssessment (cyclomatic 38) docs/standalone.js:872 — standalone.binaryAssessment has cyclomatic complexity 38 (threshold 15). Of this number, 36 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.
  • standalone.binaryAssessment (cyclomatic 38) static/standalone.js:872 — standalone.binaryAssessment has cyclomatic complexity 38 (threshold 15). Of this number, 36 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 · standalone.separateRoadResponsibility (cyclomatic 37) · ×4
  • standalone.separateRoadResponsibility (cyclomatic 37) android-app/android/app/src/main/assets/public/standalone.js:308 — standalone.separateRoadResponsibility 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.
  • standalone.separateRoadResponsibility (cyclomatic 37) android-app/www/standalone.js:308 — standalone.separateRoadResponsibility 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.
  • standalone.separateRoadResponsibility (cyclomatic 37) docs/standalone.js:308 — standalone.separateRoadResponsibility 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.
  • standalone.separateRoadResponsibility (cyclomatic 37) static/standalone.js:308 — standalone.separateRoadResponsibility 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 · standalone.generatedComplaintOutputs (cyclomatic 36) · ×4
  • standalone.generatedComplaintOutputs (cyclomatic 36) android-app/android/app/src/main/assets/public/standalone.js:7968 — standalone.generatedComplaintOutputs has cyclomatic complexity 36 (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.
  • standalone.generatedComplaintOutputs (cyclomatic 36) android-app/www/standalone.js:7968 — standalone.generatedComplaintOutputs has cyclomatic complexity 36 (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.
  • standalone.generatedComplaintOutputs (cyclomatic 36) docs/standalone.js:7968 — standalone.generatedComplaintOutputs has cyclomatic complexity 36 (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.
  • standalone.generatedComplaintOutputs (cyclomatic 36) static/standalone.js:7968 — standalone.generatedComplaintOutputs has cyclomatic complexity 36 (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 · standalone.validateOfficialHandoffRegistry (cyclomatic 34) · ×4
  • standalone.validateOfficialHandoffRegistry (cyclomatic 34) android-app/android/app/src/main/assets/public/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.validateOfficialHandoffRegistry (cyclomatic 34) android-app/www/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.validateOfficialHandoffRegistry (cyclomatic 34) docs/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • standalone.validateOfficialHandoffRegistry (cyclomatic 34) static/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · standalone.roadAgreementCandidates (cyclomatic 34) · ×4
  • standalone.roadAgreementCandidates (cyclomatic 34) android-app/android/app/src/main/assets/public/standalone.js:12972 — standalone.roadAgreementCandidates has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 9 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.
  • standalone.roadAgreementCandidates (cyclomatic 34) android-app/www/standalone.js:12972 — standalone.roadAgreementCandidates has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 9 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.
  • standalone.roadAgreementCandidates (cyclomatic 34) docs/standalone.js:12972 — standalone.roadAgreementCandidates has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 9 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.
  • standalone.roadAgreementCandidates (cyclomatic 34) static/standalone.js:12972 — standalone.roadAgreementCandidates has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 9 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 · standalone.repairTargetMatch (cyclomatic 33) · ×4
  • standalone.repairTargetMatch (cyclomatic 33) android-app/android/app/src/main/assets/public/standalone.js:6297 — standalone.repairTargetMatch has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.repairTargetMatch (cyclomatic 33) android-app/www/standalone.js:6297 — standalone.repairTargetMatch has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.repairTargetMatch (cyclomatic 33) docs/standalone.js:6297 — standalone.repairTargetMatch has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.repairTargetMatch (cyclomatic 33) static/standalone.js:6297 — standalone.repairTargetMatch has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.validateHighwayTile (cyclomatic 32) · ×4
  • standalone.validateHighwayTile (cyclomatic 32) android-app/android/app/src/main/assets/public/standalone.js:3972 — standalone.validateHighwayTile has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 3976). 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.
  • standalone.validateHighwayTile (cyclomatic 32) android-app/www/standalone.js:3972 — standalone.validateHighwayTile has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 3976). 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.
  • standalone.validateHighwayTile (cyclomatic 32) docs/standalone.js:3972 — standalone.validateHighwayTile has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 3976). 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.
  • standalone.validateHighwayTile (cyclomatic 32) static/standalone.js:3972 — standalone.validateHighwayTile has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 3976). 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 · standalone.municipalCityRouteFromGeocode (cyclomatic 32) · ×4
  • standalone.municipalCityRouteFromGeocode (cyclomatic 32) android-app/android/app/src/main/assets/public/standalone.js:5167 — standalone.municipalCityRouteFromGeocode 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.
  • standalone.municipalCityRouteFromGeocode (cyclomatic 32) android-app/www/standalone.js:5167 — standalone.municipalCityRouteFromGeocode 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.
  • standalone.municipalCityRouteFromGeocode (cyclomatic 32) docs/standalone.js:5167 — standalone.municipalCityRouteFromGeocode 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.
  • standalone.municipalCityRouteFromGeocode (cyclomatic 32) static/standalone.js:5167 — standalone.municipalCityRouteFromGeocode 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 · standalone.roadNoticeCandidates (cyclomatic 32) · ×4
  • standalone.roadNoticeCandidates (cyclomatic 32) android-app/android/app/src/main/assets/public/standalone.js:13036 — standalone.roadNoticeCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 7 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.
  • standalone.roadNoticeCandidates (cyclomatic 32) android-app/www/standalone.js:13036 — standalone.roadNoticeCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 7 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.
  • standalone.roadNoticeCandidates (cyclomatic 32) docs/standalone.js:13036 — standalone.roadNoticeCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 7 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.
  • standalone.roadNoticeCandidates (cyclomatic 32) static/standalone.js:13036 — standalone.roadNoticeCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 7 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 · standalone.maharashtraRouteFromGeocode (cyclomatic 31) · ×4
  • standalone.maharashtraRouteFromGeocode (cyclomatic 31) android-app/android/app/src/main/assets/public/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.maharashtraRouteFromGeocode (cyclomatic 31) android-app/www/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.maharashtraRouteFromGeocode (cyclomatic 31) docs/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.maharashtraRouteFromGeocode (cyclomatic 31) static/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.shortlistFor (cyclomatic 31) · ×4
  • standalone.shortlistFor (cyclomatic 31) android-app/android/app/src/main/assets/public/standalone.js:6546 — standalone.shortlistFor has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.shortlistFor (cyclomatic 31) android-app/www/standalone.js:6546 — standalone.shortlistFor has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.shortlistFor (cyclomatic 31) docs/standalone.js:6546 — standalone.shortlistFor has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.shortlistFor (cyclomatic 31) static/standalone.js:6546 — standalone.shortlistFor has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.startNativePreview (cyclomatic 30) · ×4
  • index.html.startNativePreview (cyclomatic 30) android-app/android/app/src/main/assets/public/index.html:4472 — index.html.startNativePreview has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cyclomatic 30) android-app/www/index.html:4472 — index.html.startNativePreview has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cyclomatic 30) docs/index.html:4472 — index.html.startNativePreview has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cyclomatic 30) static/index.html:4472 — index.html.startNativePreview has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). 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 · standalone.analyzeViaService (cyclomatic 30) · ×4
  • standalone.analyzeViaService (cyclomatic 30) android-app/android/app/src/main/assets/public/standalone.js:1092 — standalone.analyzeViaService has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.analyzeViaService (cyclomatic 30) android-app/www/standalone.js:1092 — standalone.analyzeViaService has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.analyzeViaService (cyclomatic 30) docs/standalone.js:1092 — standalone.analyzeViaService has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.analyzeViaService (cyclomatic 30) static/standalone.js:1092 — standalone.analyzeViaService has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.matchHighwayTile (cyclomatic 30) · ×4
  • standalone.matchHighwayTile (cyclomatic 30) android-app/android/app/src/main/assets/public/standalone.js:4124 — standalone.matchHighwayTile 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchHighwayTile (cyclomatic 30) android-app/www/standalone.js:4124 — standalone.matchHighwayTile 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchHighwayTile (cyclomatic 30) docs/standalone.js:4124 — standalone.matchHighwayTile 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchHighwayTile (cyclomatic 30) static/standalone.js:4124 — standalone.matchHighwayTile 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.stopDrive · ×4
  • index.html.stopDrive::finish (cyclomatic 28) android-app/android/app/src/main/assets/public/index.html:6054 — index.html.stopDrive::finish has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cyclomatic 28) android-app/www/index.html:6054 — index.html.stopDrive::finish has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cyclomatic 28) docs/index.html:6054 — index.html.stopDrive::finish has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cyclomatic 28) static/index.html:6054 — index.html.stopDrive::finish has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index.html.stopDrive) 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 · standalone.applyRepairObservation (cyclomatic 28) · ×4
  • standalone.applyRepairObservation (cyclomatic 28) android-app/android/app/src/main/assets/public/standalone.js:11068 — standalone.applyRepairObservation has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 11101, 11092, 11165). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyRepairObservation (cyclomatic 28) android-app/www/standalone.js:11068 — standalone.applyRepairObservation has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 11101, 11092, 11165). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyRepairObservation (cyclomatic 28) docs/standalone.js:11068 — standalone.applyRepairObservation has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 11101, 11092, 11165). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyRepairObservation (cyclomatic 28) static/standalone.js:11068 — standalone.applyRepairObservation has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 11101, 11092, 11165). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.highwayContractCandidates (cyclomatic 28) · ×4
  • standalone.highwayContractCandidates (cyclomatic 28) android-app/android/app/src/main/assets/public/standalone.js:12657 — standalone.highwayContractCandidates has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.highwayContractCandidates (cyclomatic 28) android-app/www/standalone.js:12657 — standalone.highwayContractCandidates has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.highwayContractCandidates (cyclomatic 28) docs/standalone.js:12657 — standalone.highwayContractCandidates has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.highwayContractCandidates (cyclomatic 28) static/standalone.js:12657 — standalone.highwayContractCandidates has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · core.createService · ×4
  • core.createService::dispatch (cyclomatic 28) infra/aws-central/service/core.mjs:1152 — core.createService::dispatch has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (core.createService::authenticate, core.createService::feedback, core.createService::beyondKarnataka) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • core.createService::authenticate (cyclomatic 17) infra/aws-central/service/core.mjs:368 — core.createService::authenticate 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: 3 other methods here (core.createService::feedback, core.createService::beyondKarnataka, core.createService::dispatch) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • core.createService::feedback (cyclomatic 16) infra/aws-central/service/core.mjs:629 — core.createService::feedback 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 shape REPEATS in the file: 3 other methods here (core.createService::authenticate, core.createService::beyondKarnataka, core.createService::dispatch) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • core.createService::beyondKarnataka (cyclomatic 16) infra/aws-central/service/core.mjs:784 — core.createService::beyondKarnataka 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 shape REPEATS in the file: 3 other methods here (core.createService::authenticate, core.createService::feedback, core.createService::dispatch) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.html.updateNativeSourcePresentation (cyclomatic 27) · ×4
  • index.html.updateNativeSourcePresentation (cyclomatic 27) android-app/android/app/src/main/assets/public/index.html:4306 — index.html.updateNativeSourcePresentation 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.
  • index.html.updateNativeSourcePresentation (cyclomatic 27) android-app/www/index.html:4306 — index.html.updateNativeSourcePresentation 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.
  • index.html.updateNativeSourcePresentation (cyclomatic 27) docs/index.html:4306 — index.html.updateNativeSourcePresentation 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.
  • index.html.updateNativeSourcePresentation (cyclomatic 27) static/index.html:4306 — index.html.updateNativeSourcePresentation 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 · index.html.renderNativeVideoImports (cyclomatic 27) · ×4
  • index.html.renderNativeVideoImports (cyclomatic 27) android-app/android/app/src/main/assets/public/index.html:7840 — index.html.renderNativeVideoImports has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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.
  • index.html.renderNativeVideoImports (cyclomatic 27) android-app/www/index.html:7840 — index.html.renderNativeVideoImports has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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.
  • index.html.renderNativeVideoImports (cyclomatic 27) docs/index.html:7840 — index.html.renderNativeVideoImports has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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.
  • index.html.renderNativeVideoImports (cyclomatic 27) static/index.html:7840 — index.html.renderNativeVideoImports has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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 · standalone.reverseGeocodeUncached (cyclomatic 27) · ×4
  • standalone.reverseGeocodeUncached (cyclomatic 27) android-app/android/app/src/main/assets/public/standalone.js:1247 — standalone.reverseGeocodeUncached 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, name the conditions: bind each compound test to a 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.reverseGeocodeUncached (cyclomatic 27) android-app/www/standalone.js:1247 — standalone.reverseGeocodeUncached 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, name the conditions: bind each compound test to a 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.reverseGeocodeUncached (cyclomatic 27) docs/standalone.js:1247 — standalone.reverseGeocodeUncached 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, name the conditions: bind each compound test to a 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.reverseGeocodeUncached (cyclomatic 27) static/standalone.js:1247 — standalone.reverseGeocodeUncached 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, name the conditions: bind each compound test to a 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.deleteAllAppData (cyclomatic 26) · ×4
  • index.html.deleteAllAppData (cyclomatic 26) android-app/android/app/src/main/assets/public/index.html:9676 — index.html.deleteAllAppData has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.deleteAllAppData (cyclomatic 26) android-app/www/index.html:9676 — index.html.deleteAllAppData has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.deleteAllAppData (cyclomatic 26) docs/index.html:9676 — index.html.deleteAllAppData has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.deleteAllAppData (cyclomatic 26) static/index.html:9676 — index.html.deleteAllAppData 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 · standalone.matchRoadAgreement (cyclomatic 26) · ×4
  • standalone.matchRoadAgreement (cyclomatic 26) android-app/android/app/src/main/assets/public/standalone.js:12709 — standalone.matchRoadAgreement 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadAgreement (cyclomatic 26) android-app/www/standalone.js:12709 — standalone.matchRoadAgreement 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadAgreement (cyclomatic 26) docs/standalone.js:12709 — standalone.matchRoadAgreement 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadAgreement (cyclomatic 26) static/standalone.js:12709 — standalone.matchRoadAgreement 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.publicMapPin (cyclomatic 25) · ×4
  • index.html.publicMapPin (cyclomatic 25) android-app/android/app/src/main/assets/public/index.html:8805 — index.html.publicMapPin 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.
  • index.html.publicMapPin (cyclomatic 25) android-app/www/index.html:8805 — index.html.publicMapPin 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.
  • index.html.publicMapPin (cyclomatic 25) docs/index.html:8805 — index.html.publicMapPin 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.
  • index.html.publicMapPin (cyclomatic 25) static/index.html:8805 — index.html.publicMapPin 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 · index.html.$("setSave").onclick (cyclomatic 25) · ×4
  • index.html.$("setSave").onclick (cyclomatic 25) android-app/android/app/src/main/assets/public/index.html:9567 — index.html.$("setSave").onclick 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.
  • index.html.$("setSave").onclick (cyclomatic 25) android-app/www/index.html:9567 — index.html.$("setSave").onclick 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.
  • index.html.$("setSave").onclick (cyclomatic 25) docs/index.html:9567 — index.html.$("setSave").onclick 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.
  • index.html.$("setSave").onclick (cyclomatic 25) static/index.html:9567 — index.html.$("setSave").onclick 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 · standalone.westBengalCoverage (cyclomatic 25) · ×4
  • standalone.westBengalCoverage (cyclomatic 25) android-app/android/app/src/main/assets/public/standalone.js:4448 — standalone.westBengalCoverage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 4451). 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.westBengalCoverage (cyclomatic 25) android-app/www/standalone.js:4448 — standalone.westBengalCoverage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 4451). 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.westBengalCoverage (cyclomatic 25) docs/standalone.js:4448 — standalone.westBengalCoverage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 4451). 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.westBengalCoverage (cyclomatic 25) static/standalone.js:4448 — standalone.westBengalCoverage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 4451). 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.evidenceForReport (cyclomatic 25) · ×4
  • standalone.evidenceForReport (cyclomatic 25) android-app/android/app/src/main/assets/public/standalone.js:11401 — standalone.evidenceForReport 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.evidenceForReport (cyclomatic 25) android-app/www/standalone.js:11401 — standalone.evidenceForReport 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.evidenceForReport (cyclomatic 25) docs/standalone.js:11401 — standalone.evidenceForReport 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.evidenceForReport (cyclomatic 25) static/standalone.js:11401 — standalone.evidenceForReport 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.refreshNativeRepairTargetCache (cyclomatic 24) · ×4
  • index.html.refreshNativeRepairTargetCache (cyclomatic 24) android-app/android/app/src/main/assets/public/index.html:4826 — index.html.refreshNativeRepairTargetCache 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.
  • index.html.refreshNativeRepairTargetCache (cyclomatic 24) android-app/www/index.html:4826 — index.html.refreshNativeRepairTargetCache 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.
  • index.html.refreshNativeRepairTargetCache (cyclomatic 24) docs/index.html:4826 — index.html.refreshNativeRepairTargetCache 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.
  • index.html.refreshNativeRepairTargetCache (cyclomatic 24) static/index.html:4826 — index.html.refreshNativeRepairTargetCache 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 · index.html.updateHud (cyclomatic 24) · ×4
  • index.html.updateHud (cyclomatic 24) android-app/android/app/src/main/assets/public/index.html:5523 — index.html.updateHud 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.
  • index.html.updateHud (cyclomatic 24) android-app/www/index.html:5523 — index.html.updateHud 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.
  • index.html.updateHud (cyclomatic 24) docs/index.html:5523 — index.html.updateHud 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.
  • index.html.updateHud (cyclomatic 24) static/index.html:5523 — index.html.updateHud 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 · index.html.end (cyclomatic 24) · ×4
  • index.html.end (cyclomatic 24) android-app/android/app/src/main/assets/public/index.html:6704 — index.html.end 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.
  • index.html.end (cyclomatic 24) android-app/www/index.html:6704 — index.html.end 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.
  • index.html.end (cyclomatic 24) docs/index.html:6704 — index.html.end 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.
  • index.html.end (cyclomatic 24) static/index.html:6704 — index.html.end 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 · standalone.serviceError (cyclomatic 24) · ×4
  • standalone.serviceError (cyclomatic 24) android-app/android/app/src/main/assets/public/standalone.js:639 — standalone.serviceError has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.serviceError (cyclomatic 24) android-app/www/standalone.js:639 — standalone.serviceError has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.serviceError (cyclomatic 24) docs/standalone.js:639 — standalone.serviceError has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.serviceError (cyclomatic 24) static/standalone.js:639 — standalone.serviceError has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.presentNativeStoppingStatus (cyclomatic 23) · ×4
  • index.html.presentNativeStoppingStatus (cyclomatic 23) android-app/android/app/src/main/assets/public/index.html:5005 — index.html.presentNativeStoppingStatus 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.
  • index.html.presentNativeStoppingStatus (cyclomatic 23) android-app/www/index.html:5005 — index.html.presentNativeStoppingStatus 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.
  • index.html.presentNativeStoppingStatus (cyclomatic 23) docs/index.html:5005 — index.html.presentNativeStoppingStatus 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.
  • index.html.presentNativeStoppingStatus (cyclomatic 23) static/index.html:5005 — index.html.presentNativeStoppingStatus 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 · index.html.stopDrive (cyclomatic 23) · ×4
  • index.html.stopDrive (cyclomatic 23) android-app/android/app/src/main/assets/public/index.html:5976 — index.html.stopDrive has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cyclomatic 23) android-app/www/index.html:5976 — index.html.stopDrive has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cyclomatic 23) docs/index.html:5976 — index.html.stopDrive has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cyclomatic 23) static/index.html:5976 — index.html.stopDrive has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.html.handleAppBack (cyclomatic 23) · ×4
  • index.html.handleAppBack (cyclomatic 23) android-app/android/app/src/main/assets/public/index.html:9279 — index.html.handleAppBack 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.
  • index.html.handleAppBack (cyclomatic 23) android-app/www/index.html:9279 — index.html.handleAppBack 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.
  • index.html.handleAppBack (cyclomatic 23) docs/index.html:9279 — index.html.handleAppBack 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.
  • index.html.handleAppBack (cyclomatic 23) static/index.html:9279 — index.html.handleAppBack 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 · standalone.hasCoverageGeometry (cyclomatic 23) · ×4
  • standalone.hasCoverageGeometry (cyclomatic 23) android-app/android/app/src/main/assets/public/standalone.js:1655 — standalone.hasCoverageGeometry has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (validPosition, validRing, validPolygon). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.hasCoverageGeometry (cyclomatic 23) android-app/www/standalone.js:1655 — standalone.hasCoverageGeometry has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (validPosition, validRing, validPolygon). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.hasCoverageGeometry (cyclomatic 23) docs/standalone.js:1655 — standalone.hasCoverageGeometry has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (validPosition, validRing, validPolygon). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.hasCoverageGeometry (cyclomatic 23) static/standalone.js:1655 — standalone.hasCoverageGeometry has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (validPosition, validRing, validPolygon). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.savedMunicipalLocationMatches (cyclomatic 23) · ×4
  • standalone.savedMunicipalLocationMatches (cyclomatic 23) android-app/android/app/src/main/assets/public/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.savedMunicipalLocationMatches (cyclomatic 23) android-app/www/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.savedMunicipalLocationMatches (cyclomatic 23) docs/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.savedMunicipalLocationMatches (cyclomatic 23) static/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.performNativeDataSync (cyclomatic 22) · ×4
  • index.html.performNativeDataSync (cyclomatic 22) android-app/android/app/src/main/assets/public/index.html:4702 — index.html.performNativeDataSync has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.performNativeDataSync (cyclomatic 22) android-app/www/index.html:4702 — index.html.performNativeDataSync has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.performNativeDataSync (cyclomatic 22) docs/index.html:4702 — index.html.performNativeDataSync has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.performNativeDataSync (cyclomatic 22) static/index.html:4702 — index.html.performNativeDataSync has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.recoverDriveCamera (cyclomatic 22) · ×4
  • index.html.recoverDriveCamera (cyclomatic 22) android-app/android/app/src/main/assets/public/index.html:5838 — index.html.recoverDriveCamera has cyclomatic complexity 22 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cyclomatic 22) android-app/www/index.html:5838 — index.html.recoverDriveCamera has cyclomatic complexity 22 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cyclomatic 22) docs/index.html:5838 — index.html.recoverDriveCamera has cyclomatic complexity 22 (threshold 15). 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cyclomatic 22) static/index.html:5838 — index.html.recoverDriveCamera has cyclomatic complexity 22 (threshold 15). 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, name the conditions: bind each compound test to a 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.html.drawMap (cyclomatic 22) · ×4
  • index.html.drawMap (cyclomatic 22) android-app/android/app/src/main/assets/public/index.html:9090 — index.html.drawMap has cyclomatic complexity 22 (threshold 15). Of this number, 16 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.
  • index.html.drawMap (cyclomatic 22) android-app/www/index.html:9090 — index.html.drawMap has cyclomatic complexity 22 (threshold 15). Of this number, 16 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.
  • index.html.drawMap (cyclomatic 22) docs/index.html:9090 — index.html.drawMap has cyclomatic complexity 22 (threshold 15). Of this number, 16 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.
  • index.html.drawMap (cyclomatic 22) static/index.html:9090 — index.html.drawMap has cyclomatic complexity 22 (threshold 15). Of this number, 16 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 · standalone.authorityRoute (cyclomatic 22) · ×4
  • standalone.authorityRoute (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:5288 — standalone.authorityRoute 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.authorityRoute (cyclomatic 22) android-app/www/standalone.js:5288 — standalone.authorityRoute 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.authorityRoute (cyclomatic 22) docs/standalone.js:5288 — standalone.authorityRoute 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.authorityRoute (cyclomatic 22) static/standalone.js:5288 — standalone.authorityRoute 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.kgisJurisdiction (cyclomatic 22) · ×4
  • standalone.kgisJurisdiction (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:5491 — standalone.kgisJurisdiction 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kgisJurisdiction (cyclomatic 22) android-app/www/standalone.js:5491 — standalone.kgisJurisdiction 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kgisJurisdiction (cyclomatic 22) docs/standalone.js:5491 — standalone.kgisJurisdiction 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kgisJurisdiction (cyclomatic 22) static/standalone.js:5491 — standalone.kgisJurisdiction 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.centralPotholeRequest (cyclomatic 22) · ×4
  • standalone.centralPotholeRequest (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:9021 — standalone.centralPotholeRequest 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.centralPotholeRequest (cyclomatic 22) android-app/www/standalone.js:9021 — standalone.centralPotholeRequest 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.centralPotholeRequest (cyclomatic 22) docs/standalone.js:9021 — standalone.centralPotholeRequest 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.centralPotholeRequest (cyclomatic 22) static/standalone.js:9021 — standalone.centralPotholeRequest 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.openBengaluruHandoff (cyclomatic 22) · ×4
  • standalone.openBengaluruHandoff (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:12228 — standalone.openBengaluruHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openBengaluruHandoff (cyclomatic 22) android-app/www/standalone.js:12228 — standalone.openBengaluruHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openBengaluruHandoff (cyclomatic 22) docs/standalone.js:12228 — standalone.openBengaluruHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openBengaluruHandoff (cyclomatic 22) static/standalone.js:12228 — standalone.openBengaluruHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.openNationalHighwayHandoff (cyclomatic 22) · ×4
  • standalone.openNationalHighwayHandoff (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:12277 — standalone.openNationalHighwayHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openNationalHighwayHandoff (cyclomatic 22) android-app/www/standalone.js:12277 — standalone.openNationalHighwayHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openNationalHighwayHandoff (cyclomatic 22) docs/standalone.js:12277 — standalone.openNationalHighwayHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.openNationalHighwayHandoff (cyclomatic 22) static/standalone.js:12277 — standalone.openNationalHighwayHandoff 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.renderReports · ×4
  • index.html.renderReports::cardHtml (cyclomatic 21) android-app/android/app/src/main/assets/public/index.html:2563 — index.html.renderReports::cardHtml 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. This shape REPEATS in the file: one other method here (index.html.renderReports) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cyclomatic 21) android-app/www/index.html:2563 — index.html.renderReports::cardHtml 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. This shape REPEATS in the file: one other method here (index.html.renderReports) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cyclomatic 21) docs/index.html:2563 — index.html.renderReports::cardHtml 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. This shape REPEATS in the file: one other method here (index.html.renderReports) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports::cardHtml (cyclomatic 21) static/index.html:2563 — index.html.renderReports::cardHtml 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. This shape REPEATS in the file: one other method here (index.html.renderReports) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.html.unroutedHelp (cyclomatic 20) · ×4
  • index.html.unroutedHelp (cyclomatic 20) android-app/android/app/src/main/assets/public/index.html:3507 — index.html.unroutedHelp 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.
  • index.html.unroutedHelp (cyclomatic 20) android-app/www/index.html:3507 — index.html.unroutedHelp 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.
  • index.html.unroutedHelp (cyclomatic 20) docs/index.html:3507 — index.html.unroutedHelp 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.
  • index.html.unroutedHelp (cyclomatic 20) static/index.html:3507 — index.html.unroutedHelp 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 · index.html.renderNativeDriveStatus (cyclomatic 20) · ×4
  • index.html.renderNativeDriveStatus (cyclomatic 20) android-app/android/app/src/main/assets/public/index.html:5208 — index.html.renderNativeDriveStatus 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.
  • index.html.renderNativeDriveStatus (cyclomatic 20) android-app/www/index.html:5208 — index.html.renderNativeDriveStatus 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.
  • index.html.renderNativeDriveStatus (cyclomatic 20) docs/index.html:5208 — index.html.renderNativeDriveStatus 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.
  • index.html.renderNativeDriveStatus (cyclomatic 20) static/index.html:5208 — index.html.renderNativeDriveStatus 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.html.cycleClip (cyclomatic 20) · ×4
  • index.html.cycleClip (cyclomatic 20) android-app/android/app/src/main/assets/public/index.html:6477 — index.html.cycleClip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cyclomatic 20) android-app/www/index.html:6477 — index.html.cycleClip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cyclomatic 20) docs/index.html:6477 — index.html.cycleClip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cyclomatic 20) static/index.html:6477 — index.html.cycleClip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). 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 · standalone.applyCentralPothole (cyclomatic 20) · ×4
  • standalone.applyCentralPothole (cyclomatic 20) android-app/android/app/src/main/assets/public/standalone.js:8999 — standalone.applyCentralPothole 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyCentralPothole (cyclomatic 20) android-app/www/standalone.js:8999 — standalone.applyCentralPothole 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyCentralPothole (cyclomatic 20) docs/standalone.js:8999 — standalone.applyCentralPothole 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.applyCentralPothole (cyclomatic 20) static/standalone.js:8999 — standalone.applyCentralPothole 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.validateDashcamRtspUrl (cyclomatic 19) · ×4
  • index.html.validateDashcamRtspUrl (cyclomatic 19) android-app/android/app/src/main/assets/public/index.html:438 — index.html.validateDashcamRtspUrl 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.
  • index.html.validateDashcamRtspUrl (cyclomatic 19) android-app/www/index.html:438 — index.html.validateDashcamRtspUrl 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.
  • index.html.validateDashcamRtspUrl (cyclomatic 19) docs/index.html:438 — index.html.validateDashcamRtspUrl 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.
  • index.html.validateDashcamRtspUrl (cyclomatic 19) static/index.html:438 — index.html.validateDashcamRtspUrl 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 · standalone.fetchWithTimeout (cyclomatic 19) · ×4
  • standalone.fetchWithTimeout (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:509 — standalone.fetchWithTimeout has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.fetchWithTimeout (cyclomatic 19) android-app/www/standalone.js:509 — standalone.fetchWithTimeout has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.fetchWithTimeout (cyclomatic 19) docs/standalone.js:509 — standalone.fetchWithTimeout has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.fetchWithTimeout (cyclomatic 19) static/standalone.js:509 — standalone.fetchWithTimeout has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.validMmrAuthorityBoundaries (cyclomatic 19) · ×4
  • standalone.validMmrAuthorityBoundaries (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:1679 — standalone.validMmrAuthorityBoundaries 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 items inside it that branch (a function literal at line 1692, sameIds, a function literal at line 1698). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.validMmrAuthorityBoundaries (cyclomatic 19) android-app/www/standalone.js:1679 — standalone.validMmrAuthorityBoundaries 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 items inside it that branch (a function literal at line 1692, sameIds, a function literal at line 1698). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.validMmrAuthorityBoundaries (cyclomatic 19) docs/standalone.js:1679 — standalone.validMmrAuthorityBoundaries 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 items inside it that branch (a function literal at line 1692, sameIds, a function literal at line 1698). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.validMmrAuthorityBoundaries (cyclomatic 19) static/standalone.js:1679 — standalone.validMmrAuthorityBoundaries 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 items inside it that branch (a function literal at line 1692, sameIds, a function literal at line 1698). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.routeForIssue (cyclomatic 19) · ×4
  • standalone.routeForIssue (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:5322 — standalone.routeForIssue has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.routeForIssue (cyclomatic 19) android-app/www/standalone.js:5322 — standalone.routeForIssue has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.routeForIssue (cyclomatic 19) docs/standalone.js:5322 — standalone.routeForIssue has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.routeForIssue (cyclomatic 19) static/standalone.js:5322 — standalone.routeForIssue has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.matchesEverySameDriveSighting (cyclomatic 19) · ×4
  • standalone.matchesEverySameDriveSighting (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:6169 — standalone.matchesEverySameDriveSighting 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 2 function literals inside it that branch (lines 6173, 6174). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchesEverySameDriveSighting (cyclomatic 19) android-app/www/standalone.js:6169 — standalone.matchesEverySameDriveSighting 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 2 function literals inside it that branch (lines 6173, 6174). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchesEverySameDriveSighting (cyclomatic 19) docs/standalone.js:6169 — standalone.matchesEverySameDriveSighting 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 2 function literals inside it that branch (lines 6173, 6174). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchesEverySameDriveSighting (cyclomatic 19) static/standalone.js:6169 — standalone.matchesEverySameDriveSighting 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 2 function literals inside it that branch (lines 6173, 6174). 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.matchTender (cyclomatic 19) · ×4
  • standalone.matchTender (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:6985 — standalone.matchTender 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchTender (cyclomatic 19) android-app/www/standalone.js:6985 — standalone.matchTender 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchTender (cyclomatic 19) docs/standalone.js:6985 — standalone.matchTender 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchTender (cyclomatic 19) static/standalone.js:6985 — standalone.matchTender 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.syncNativeRepairData (cyclomatic 18) · ×4
  • index.html.syncNativeRepairData (cyclomatic 18) android-app/android/app/src/main/assets/public/index.html:4783 — index.html.syncNativeRepairData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.syncNativeRepairData (cyclomatic 18) android-app/www/index.html:4783 — index.html.syncNativeRepairData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.syncNativeRepairData (cyclomatic 18) docs/index.html:4783 — index.html.syncNativeRepairData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • index.html.syncNativeRepairData (cyclomatic 18) static/index.html:4783 — index.html.syncNativeRepairData 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.html.startDriveLocation (cyclomatic 18) · ×4
  • index.html.startDriveLocation (cyclomatic 18) android-app/android/app/src/main/assets/public/index.html:5799 — index.html.startDriveLocation 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 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cyclomatic 18) android-app/www/index.html:5799 — index.html.startDriveLocation 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 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cyclomatic 18) docs/index.html:5799 — index.html.startDriveLocation 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 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cyclomatic 18) static/index.html:5799 — index.html.startDriveLocation 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 6 function items inside it that branch (probe, clear, accept, …). 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 · standalone.planUnreportedReminder (cyclomatic 18) · ×4
  • standalone.planUnreportedReminder (cyclomatic 18) android-app/android/app/src/main/assets/public/standalone.js:6639 — standalone.planUnreportedReminder has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.planUnreportedReminder (cyclomatic 18) android-app/www/standalone.js:6639 — standalone.planUnreportedReminder has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.planUnreportedReminder (cyclomatic 18) docs/standalone.js:6639 — standalone.planUnreportedReminder has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.planUnreportedReminder (cyclomatic 18) static/standalone.js:6639 — standalone.planUnreportedReminder has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.detectionEnhancementPlan (cyclomatic 18) · ×4
  • standalone.detectionEnhancementPlan (cyclomatic 18) android-app/android/app/src/main/assets/public/standalone.js:9282 — standalone.detectionEnhancementPlan 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.detectionEnhancementPlan (cyclomatic 18) android-app/www/standalone.js:9282 — standalone.detectionEnhancementPlan 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.detectionEnhancementPlan (cyclomatic 18) docs/standalone.js:9282 — standalone.detectionEnhancementPlan 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.detectionEnhancementPlan (cyclomatic 18) static/standalone.js:9282 — standalone.detectionEnhancementPlan 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.matchRoadNotice (cyclomatic 18) · ×4
  • standalone.matchRoadNotice (cyclomatic 18) android-app/android/app/src/main/assets/public/standalone.js:12769 — standalone.matchRoadNotice has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadNotice (cyclomatic 18) android-app/www/standalone.js:12769 — standalone.matchRoadNotice has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadNotice (cyclomatic 18) docs/standalone.js:12769 — standalone.matchRoadNotice has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.matchRoadNotice (cyclomatic 18) static/standalone.js:12769 — standalone.matchRoadNotice has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.unroutedTitle (cyclomatic 17) · ×4
  • index.html.unroutedTitle (cyclomatic 17) android-app/android/app/src/main/assets/public/index.html:3481 — index.html.unroutedTitle 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.
  • index.html.unroutedTitle (cyclomatic 17) android-app/www/index.html:3481 — index.html.unroutedTitle 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.
  • index.html.unroutedTitle (cyclomatic 17) docs/index.html:3481 — index.html.unroutedTitle 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.
  • index.html.unroutedTitle (cyclomatic 17) static/index.html:3481 — index.html.unroutedTitle 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 · index.html.startDriveAdmitted · ×4
  • index.html.startDriveAdmitted::onPosition (cyclomatic 17) android-app/android/app/src/main/assets/public/index.html:5448 — index.html.startDriveAdmitted::onPosition 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 shape REPEATS in the file: one other method here (index.html.startDriveAdmitted) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted::onPosition (cyclomatic 17) android-app/www/index.html:5448 — index.html.startDriveAdmitted::onPosition 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 shape REPEATS in the file: one other method here (index.html.startDriveAdmitted) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted::onPosition (cyclomatic 17) docs/index.html:5448 — index.html.startDriveAdmitted::onPosition 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 shape REPEATS in the file: one other method here (index.html.startDriveAdmitted) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.startDriveAdmitted::onPosition (cyclomatic 17) static/index.html:5448 — index.html.startDriveAdmitted::onPosition 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 shape REPEATS in the file: one other method here (index.html.startDriveAdmitted) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.html.$("feedbackSend").onclick (cyclomatic 17) · ×4
  • index.html.$("feedbackSend").onclick (cyclomatic 17) android-app/android/app/src/main/assets/public/index.html:9507 — index.html.$("feedbackSend").onclick 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.
  • index.html.$("feedbackSend").onclick (cyclomatic 17) android-app/www/index.html:9507 — index.html.$("feedbackSend").onclick 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.
  • index.html.$("feedbackSend").onclick (cyclomatic 17) docs/index.html:9507 — index.html.$("feedbackSend").onclick 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.
  • index.html.$("feedbackSend").onclick (cyclomatic 17) static/index.html:9507 — index.html.$("feedbackSend").onclick 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 · standalone.compatibleDraftRoute (cyclomatic 17) · ×4
  • standalone.compatibleDraftRoute (cyclomatic 17) android-app/android/app/src/main/assets/public/standalone.js:7938 — standalone.compatibleDraftRoute 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.compatibleDraftRoute (cyclomatic 17) android-app/www/standalone.js:7938 — standalone.compatibleDraftRoute 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.compatibleDraftRoute (cyclomatic 17) docs/standalone.js:7938 — standalone.compatibleDraftRoute 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.compatibleDraftRoute (cyclomatic 17) static/standalone.js:7938 — standalone.compatibleDraftRoute 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · index.html.watchForFix (cyclomatic 16) · ×4
  • index.html.watchForFix (cyclomatic 16) android-app/android/app/src/main/assets/public/index.html:2891 — index.html.watchForFix has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.watchForFix (cyclomatic 16) android-app/www/index.html:2891 — index.html.watchForFix has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.watchForFix (cyclomatic 16) docs/index.html:2891 — index.html.watchForFix has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.watchForFix (cyclomatic 16) static/index.html:2891 — index.html.watchForFix has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.cameraShotFile (cyclomatic 16) · ×4
  • index.html.cameraShotFile (cyclomatic 16) android-app/android/app/src/main/assets/public/index.html:3135 — index.html.cameraShotFile 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.
  • index.html.cameraShotFile (cyclomatic 16) android-app/www/index.html:3135 — index.html.cameraShotFile 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.
  • index.html.cameraShotFile (cyclomatic 16) docs/index.html:3135 — index.html.cameraShotFile 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.
  • index.html.cameraShotFile (cyclomatic 16) static/index.html:3135 — index.html.cameraShotFile 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 · index.html.listenForRestoredCameraPhoto (cyclomatic 16) · ×4
  • index.html.listenForRestoredCameraPhoto (cyclomatic 16) android-app/android/app/src/main/assets/public/index.html:3164 — index.html.listenForRestoredCameraPhoto has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3167). 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.
  • index.html.listenForRestoredCameraPhoto (cyclomatic 16) android-app/www/index.html:3164 — index.html.listenForRestoredCameraPhoto has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3167). 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.
  • index.html.listenForRestoredCameraPhoto (cyclomatic 16) docs/index.html:3164 — index.html.listenForRestoredCameraPhoto has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3167). 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.
  • index.html.listenForRestoredCameraPhoto (cyclomatic 16) static/index.html:3164 — index.html.listenForRestoredCameraPhoto has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3167). 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 · index.html.$("wipeBtn").onclick (cyclomatic 16) · ×4
  • index.html.$("wipeBtn").onclick (cyclomatic 16) android-app/android/app/src/main/assets/public/index.html:9738 — index.html.$("wipeBtn").onclick 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.
  • index.html.$("wipeBtn").onclick (cyclomatic 16) android-app/www/index.html:9738 — index.html.$("wipeBtn").onclick 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.
  • index.html.$("wipeBtn").onclick (cyclomatic 16) docs/index.html:9738 — index.html.$("wipeBtn").onclick 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.
  • index.html.$("wipeBtn").onclick (cyclomatic 16) static/index.html:9738 — index.html.$("wipeBtn").onclick 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 · standalone.drainSSE (cyclomatic 16) · ×4
  • standalone.drainSSE (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:958 — standalone.drainSSE 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.drainSSE (cyclomatic 16) android-app/www/standalone.js:958 — standalone.drainSSE 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.drainSSE (cyclomatic 16) docs/standalone.js:958 — standalone.drainSSE 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.drainSSE (cyclomatic 16) static/standalone.js:958 — standalone.drainSSE 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.loadHighwayContractPack (cyclomatic 16) · ×4
  • standalone.loadHighwayContractPack (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:3177 — standalone.loadHighwayContractPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadHighwayContractPack (cyclomatic 16) android-app/www/standalone.js:3177 — standalone.loadHighwayContractPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadHighwayContractPack (cyclomatic 16) docs/standalone.js:3177 — standalone.loadHighwayContractPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadHighwayContractPack (cyclomatic 16) static/standalone.js:3177 — standalone.loadHighwayContractPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.loadRoadNoticePack (cyclomatic 16) · ×4
  • standalone.loadRoadNoticePack (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:3432 — standalone.loadRoadNoticePack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadNoticePack (cyclomatic 16) android-app/www/standalone.js:3432 — standalone.loadRoadNoticePack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadNoticePack (cyclomatic 16) docs/standalone.js:3432 — standalone.loadRoadNoticePack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadNoticePack (cyclomatic 16) static/standalone.js:3432 — standalone.loadRoadNoticePack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.loadRoadAgreementPack (cyclomatic 16) · ×4
  • standalone.loadRoadAgreementPack (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:3756 — standalone.loadRoadAgreementPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadAgreementPack (cyclomatic 16) android-app/www/standalone.js:3756 — standalone.loadRoadAgreementPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadAgreementPack (cyclomatic 16) docs/standalone.js:3756 — standalone.loadRoadAgreementPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadRoadAgreementPack (cyclomatic 16) static/standalone.js:3756 — standalone.loadRoadAgreementPack has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.kolkataRouteFromGeocode (cyclomatic 16) · ×4
  • standalone.kolkataRouteFromGeocode (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:4485 — standalone.kolkataRouteFromGeocode 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kolkataRouteFromGeocode (cyclomatic 16) android-app/www/standalone.js:4485 — standalone.kolkataRouteFromGeocode 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kolkataRouteFromGeocode (cyclomatic 16) docs/standalone.js:4485 — standalone.kolkataRouteFromGeocode 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.kolkataRouteFromGeocode (cyclomatic 16) static/standalone.js:4485 — standalone.kolkataRouteFromGeocode 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.getRepairTargetBatch (cyclomatic 16) · ×4
  • standalone.getRepairTargetBatch (cyclomatic 16) android-app/android/app/src/main/assets/public/standalone.js:11775 — standalone.getRepairTargetBatch 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.getRepairTargetBatch (cyclomatic 16) android-app/www/standalone.js:11775 — standalone.getRepairTargetBatch 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.getRepairTargetBatch (cyclomatic 16) docs/standalone.js:11775 — standalone.getRepairTargetBatch 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.getRepairTargetBatch (cyclomatic 16) static/standalone.js:11775 — standalone.getRepairTargetBatch 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · index.html.analyseFootage (cognitive 196) · ×4
  • index.html.analyseFootage (cognitive 196) android-app/android/app/src/main/assets/public/index.html:8197 — index.html.analyseFootage has cognitive complexity 196 (threshold 15). Drivers by points: if/else 45 (81 pts), boolean chains 57, ternaries 14 (26 pts), loops 11 (17 pts), error handling 9 (15 pts) (nesting depth added 60). Of this number, 98 points are the body's own statements and 98 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.analyseFootage (cognitive 196) android-app/www/index.html:8197 — index.html.analyseFootage has cognitive complexity 196 (threshold 15). Drivers by points: if/else 45 (81 pts), boolean chains 57, ternaries 14 (26 pts), loops 11 (17 pts), error handling 9 (15 pts) (nesting depth added 60). Of this number, 98 points are the body's own statements and 98 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.analyseFootage (cognitive 196) docs/index.html:8197 — index.html.analyseFootage has cognitive complexity 196 (threshold 15). Drivers by points: if/else 45 (81 pts), boolean chains 57, ternaries 14 (26 pts), loops 11 (17 pts), error handling 9 (15 pts) (nesting depth added 60). Of this number, 98 points are the body's own statements and 98 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.analyseFootage (cognitive 196) static/index.html:8197 — index.html.analyseFootage has cognitive complexity 196 (threshold 15). Drivers by points: if/else 45 (81 pts), boolean chains 57, ternaries 14 (26 pts), loops 11 (17 pts), error handling 9 (15 pts) (nesting depth added 60). Of this number, 98 points are the body's own statements and 98 belong to 18 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.runNativeVideoAnalysis (cognitive 150) · ×4
  • index.html.runNativeVideoAnalysis (cognitive 150) android-app/android/app/src/main/assets/public/index.html:7949 — index.html.runNativeVideoAnalysis has cognitive complexity 150 (threshold 15). Drivers by points: if/else 40 (85 pts), boolean chains 30, ternaries 10 (16 pts), error handling 6 (15 pts), loops 3 (4 pts) (nesting depth added 61). Of this number, 144 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runNativeVideoAnalysis (cognitive 150) android-app/www/index.html:7949 — index.html.runNativeVideoAnalysis has cognitive complexity 150 (threshold 15). Drivers by points: if/else 40 (85 pts), boolean chains 30, ternaries 10 (16 pts), error handling 6 (15 pts), loops 3 (4 pts) (nesting depth added 61). Of this number, 144 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runNativeVideoAnalysis (cognitive 150) docs/index.html:7949 — index.html.runNativeVideoAnalysis has cognitive complexity 150 (threshold 15). Drivers by points: if/else 40 (85 pts), boolean chains 30, ternaries 10 (16 pts), error handling 6 (15 pts), loops 3 (4 pts) (nesting depth added 61). Of this number, 144 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runNativeVideoAnalysis (cognitive 150) static/index.html:7949 — index.html.runNativeVideoAnalysis has cognitive complexity 150 (threshold 15). Drivers by points: if/else 40 (85 pts), boolean chains 30, ternaries 10 (16 pts), error handling 6 (15 pts), loops 3 (4 pts) (nesting depth added 61). Of this number, 144 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.runImportedVideoAnalysis (cognitive 144) · ×4
  • index.html.runImportedVideoAnalysis (cognitive 144) android-app/android/app/src/main/assets/public/index.html:7562 — index.html.runImportedVideoAnalysis has cognitive complexity 144 (threshold 15). Drivers by points: if/else 41 (83 pts), ternaries 13 (27 pts), boolean chains 21, error handling 4 (8 pts), loops 4 (5 pts) (nesting depth added 61). Of this number, 141 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runImportedVideoAnalysis (cognitive 144) android-app/www/index.html:7562 — index.html.runImportedVideoAnalysis has cognitive complexity 144 (threshold 15). Drivers by points: if/else 41 (83 pts), ternaries 13 (27 pts), boolean chains 21, error handling 4 (8 pts), loops 4 (5 pts) (nesting depth added 61). Of this number, 141 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runImportedVideoAnalysis (cognitive 144) docs/index.html:7562 — index.html.runImportedVideoAnalysis has cognitive complexity 144 (threshold 15). Drivers by points: if/else 41 (83 pts), ternaries 13 (27 pts), boolean chains 21, error handling 4 (8 pts), loops 4 (5 pts) (nesting depth added 61). Of this number, 141 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.runImportedVideoAnalysis (cognitive 144) static/index.html:7562 — index.html.runImportedVideoAnalysis has cognitive complexity 144 (threshold 15). Drivers by points: if/else 41 (83 pts), ternaries 13 (27 pts), boolean chains 21, error handling 4 (8 pts), loops 4 (5 pts) (nesting depth added 61). Of this number, 141 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.draftCivicComplaint (cognitive 126) · ×4
  • standalone.draftCivicComplaint (cognitive 126) android-app/android/app/src/main/assets/public/standalone.js:8106 — standalone.draftCivicComplaint has cognitive complexity 126 (threshold 15). Drivers by points: ternaries 38 (108 pts), boolean chains 17, if/else 1 (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.draftCivicComplaint (cognitive 126) android-app/www/standalone.js:8106 — standalone.draftCivicComplaint has cognitive complexity 126 (threshold 15). Drivers by points: ternaries 38 (108 pts), boolean chains 17, if/else 1 (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.draftCivicComplaint (cognitive 126) docs/standalone.js:8106 — standalone.draftCivicComplaint has cognitive complexity 126 (threshold 15). Drivers by points: ternaries 38 (108 pts), boolean chains 17, if/else 1 (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.draftCivicComplaint (cognitive 126) static/standalone.js:8106 — standalone.draftCivicComplaint has cognitive complexity 126 (threshold 15). Drivers by points: ternaries 38 (108 pts), boolean chains 17, if/else 1 (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the 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 · standalone.currentOfficialRouteBinding (cognitive 113) · ×4
  • standalone.currentOfficialRouteBinding (cognitive 113) android-app/android/app/src/main/assets/public/standalone.js:12534 — standalone.currentOfficialRouteBinding has cognitive complexity 113 (threshold 15). Drivers by points: if/else 38 (54 pts), boolean chains 53, ternaries 3 (6 pts) (nesting depth added 19). Of this number, 111 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.
  • standalone.currentOfficialRouteBinding (cognitive 113) android-app/www/standalone.js:12534 — standalone.currentOfficialRouteBinding has cognitive complexity 113 (threshold 15). Drivers by points: if/else 38 (54 pts), boolean chains 53, ternaries 3 (6 pts) (nesting depth added 19). Of this number, 111 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.
  • standalone.currentOfficialRouteBinding (cognitive 113) docs/standalone.js:12534 — standalone.currentOfficialRouteBinding has cognitive complexity 113 (threshold 15). Drivers by points: if/else 38 (54 pts), boolean chains 53, ternaries 3 (6 pts) (nesting depth added 19). Of this number, 111 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.
  • standalone.currentOfficialRouteBinding (cognitive 113) static/standalone.js:12534 — standalone.currentOfficialRouteBinding has cognitive complexity 113 (threshold 15). Drivers by points: if/else 38 (54 pts), boolean chains 53, ternaries 3 (6 pts) (nesting depth added 19). Of this number, 111 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.html.restoreNativeDrive (cognitive 105) · ×4
  • index.html.restoreNativeDrive (cognitive 105) android-app/android/app/src/main/assets/public/index.html:6225 — index.html.restoreNativeDrive has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 39, ternaries 3 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.restoreNativeDrive (cognitive 105) android-app/www/index.html:6225 — index.html.restoreNativeDrive has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 39, ternaries 3 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.restoreNativeDrive (cognitive 105) docs/index.html:6225 — index.html.restoreNativeDrive has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 39, ternaries 3 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.restoreNativeDrive (cognitive 105) static/index.html:6225 — index.html.restoreNativeDrive has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 39, ternaries 3 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.html.sendReport (cognitive 100) · ×4
  • index.html.sendReport (cognitive 100) android-app/android/app/src/main/assets/public/index.html:3851 — index.html.sendReport has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 60, if/else 13 (24 pts), ternaries 7 (15 pts), error handling 1 (nesting depth added 19). Of this number, 97 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cognitive 100) android-app/www/index.html:3851 — index.html.sendReport has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 60, if/else 13 (24 pts), ternaries 7 (15 pts), error handling 1 (nesting depth added 19). Of this number, 97 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cognitive 100) docs/index.html:3851 — index.html.sendReport has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 60, if/else 13 (24 pts), ternaries 7 (15 pts), error handling 1 (nesting depth added 19). Of this number, 97 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.sendReport (cognitive 100) static/index.html:3851 — index.html.sendReport has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 60, if/else 13 (24 pts), ternaries 7 (15 pts), error handling 1 (nesting depth added 19). Of this number, 97 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · standalone.validateRoutingPack (cognitive 99) · ×4
  • standalone.validateRoutingPack (cognitive 99) android-app/android/app/src/main/assets/public/standalone.js:2556 — standalone.validateRoutingPack has cognitive complexity 99 (threshold 15). Drivers by points: if/else 42 (62 pts), boolean chains 29, ternaries 4 (8 pts) (nesting depth added 24). Of this number, 98 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.
  • standalone.validateRoutingPack (cognitive 99) android-app/www/standalone.js:2556 — standalone.validateRoutingPack has cognitive complexity 99 (threshold 15). Drivers by points: if/else 42 (62 pts), boolean chains 29, ternaries 4 (8 pts) (nesting depth added 24). Of this number, 98 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.
  • standalone.validateRoutingPack (cognitive 99) docs/standalone.js:2556 — standalone.validateRoutingPack has cognitive complexity 99 (threshold 15). Drivers by points: if/else 42 (62 pts), boolean chains 29, ternaries 4 (8 pts) (nesting depth added 24). Of this number, 98 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.
  • standalone.validateRoutingPack (cognitive 99) static/standalone.js:2556 — standalone.validateRoutingPack has cognitive complexity 99 (threshold 15). Drivers by points: if/else 42 (62 pts), boolean chains 29, ternaries 4 (8 pts) (nesting depth added 24). Of this number, 98 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 · standalone.installRoutingAuthorities (cognitive 97) · ×4
  • standalone.installRoutingAuthorities (cognitive 97) android-app/android/app/src/main/assets/public/standalone.js:1442 — standalone.installRoutingAuthorities has cognitive complexity 97 (threshold 15). Drivers by points: if/else 43 (66 pts), boolean chains 22, loops 5 (9 pts) (nesting depth added 27). Of this number, 96 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.
  • standalone.installRoutingAuthorities (cognitive 97) android-app/www/standalone.js:1442 — standalone.installRoutingAuthorities has cognitive complexity 97 (threshold 15). Drivers by points: if/else 43 (66 pts), boolean chains 22, loops 5 (9 pts) (nesting depth added 27). Of this number, 96 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.
  • standalone.installRoutingAuthorities (cognitive 97) docs/standalone.js:1442 — standalone.installRoutingAuthorities has cognitive complexity 97 (threshold 15). Drivers by points: if/else 43 (66 pts), boolean chains 22, loops 5 (9 pts) (nesting depth added 27). Of this number, 96 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.
  • standalone.installRoutingAuthorities (cognitive 97) static/standalone.js:1442 — standalone.installRoutingAuthorities has cognitive complexity 97 (threshold 15). Drivers by points: if/else 43 (66 pts), boolean chains 22, loops 5 (9 pts) (nesting depth added 27). Of this number, 96 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.html.startDriveAdmitted (cognitive 93) · ×4
  • index.html.startDriveAdmitted (cognitive 93) android-app/android/app/src/main/assets/public/index.html:5247 — index.html.startDriveAdmitted has cognitive complexity 93 (threshold 15). Drivers by points: boolean chains 42, if/else 29 (35 pts), error handling 5 (8 pts), ternaries 5 (8 pts) (nesting depth added 12). Of this number, 79 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.startDriveAdmitted (cognitive 93) android-app/www/index.html:5247 — index.html.startDriveAdmitted has cognitive complexity 93 (threshold 15). Drivers by points: boolean chains 42, if/else 29 (35 pts), error handling 5 (8 pts), ternaries 5 (8 pts) (nesting depth added 12). Of this number, 79 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.startDriveAdmitted (cognitive 93) docs/index.html:5247 — index.html.startDriveAdmitted has cognitive complexity 93 (threshold 15). Drivers by points: boolean chains 42, if/else 29 (35 pts), error handling 5 (8 pts), ternaries 5 (8 pts) (nesting depth added 12). Of this number, 79 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.startDriveAdmitted (cognitive 93) static/index.html:5247 — index.html.startDriveAdmitted has cognitive complexity 93 (threshold 15). Drivers by points: boolean chains 42, if/else 29 (35 pts), error handling 5 (8 pts), ternaries 5 (8 pts) (nesting depth added 12). Of this number, 79 points are the body's own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · standalone.savedOfficialRouteBinding (cognitive 88) · ×4
  • standalone.savedOfficialRouteBinding (cognitive 88) android-app/android/app/src/main/assets/public/standalone.js:12333 — standalone.savedOfficialRouteBinding has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 52, if/else 33 (36 pts) (nesting depth added 3). Of this number, 87 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.
  • standalone.savedOfficialRouteBinding (cognitive 88) android-app/www/standalone.js:12333 — standalone.savedOfficialRouteBinding has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 52, if/else 33 (36 pts) (nesting depth added 3). Of this number, 87 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.
  • standalone.savedOfficialRouteBinding (cognitive 88) docs/standalone.js:12333 — standalone.savedOfficialRouteBinding has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 52, if/else 33 (36 pts) (nesting depth added 3). Of this number, 87 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.
  • standalone.savedOfficialRouteBinding (cognitive 88) static/standalone.js:12333 — standalone.savedOfficialRouteBinding has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 52, if/else 33 (36 pts) (nesting depth added 3). Of this number, 87 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.
D2 · Cognitive Complexity · standalone.createCivicReport (cognitive 81) · ×4
  • standalone.createCivicReport (cognitive 81) android-app/android/app/src/main/assets/public/standalone.js:11463 — standalone.createCivicReport has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 40 (43 pts), boolean chains 36, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.createCivicReport (cognitive 81) android-app/www/standalone.js:11463 — standalone.createCivicReport has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 40 (43 pts), boolean chains 36, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.createCivicReport (cognitive 81) docs/standalone.js:11463 — standalone.createCivicReport has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 40 (43 pts), boolean chains 36, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.createCivicReport (cognitive 81) static/standalone.js:11463 — standalone.createCivicReport has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 40 (43 pts), boolean chains 36, if/else 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · standalone.buildComplaintOutputs (cognitive 77) · ×4
  • standalone.buildComplaintOutputs (cognitive 77) android-app/android/app/src/main/assets/public/standalone.js:7694 — standalone.buildComplaintOutputs has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 27 (39 pts), boolean chains 37, if/else 1 (nesting depth added 12). Of this number, 68 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.buildComplaintOutputs (cognitive 77) android-app/www/standalone.js:7694 — standalone.buildComplaintOutputs has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 27 (39 pts), boolean chains 37, if/else 1 (nesting depth added 12). Of this number, 68 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.buildComplaintOutputs (cognitive 77) docs/standalone.js:7694 — standalone.buildComplaintOutputs has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 27 (39 pts), boolean chains 37, if/else 1 (nesting depth added 12). Of this number, 68 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.buildComplaintOutputs (cognitive 77) static/standalone.js:7694 — standalone.buildComplaintOutputs has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 27 (39 pts), boolean chains 37, if/else 1 (nesting depth added 12). Of this number, 68 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.savedNonMunicipalLocationMatches (cognitive 75) · ×4
  • standalone.savedNonMunicipalLocationMatches (cognitive 75) android-app/android/app/src/main/assets/public/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 41, if/else 27 (34 pts) (nesting depth added 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.
  • standalone.savedNonMunicipalLocationMatches (cognitive 75) android-app/www/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 41, if/else 27 (34 pts) (nesting depth added 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.
  • standalone.savedNonMunicipalLocationMatches (cognitive 75) docs/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 41, if/else 27 (34 pts) (nesting depth added 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.
  • standalone.savedNonMunicipalLocationMatches (cognitive 75) static/standalone.js:12856 — standalone.savedNonMunicipalLocationMatches has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 41, if/else 27 (34 pts) (nesting depth added 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 · index.html.handleFile (cognitive 70) · ×4
  • index.html.handleFile (cognitive 70) android-app/android/app/src/main/assets/public/index.html:3229 — index.html.handleFile has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (31 pts), ternaries 12 (21 pts), boolean chains 17, error handling 1 (nesting depth added 16). Of this number, 68 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.handleFile (cognitive 70) android-app/www/index.html:3229 — index.html.handleFile has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (31 pts), ternaries 12 (21 pts), boolean chains 17, error handling 1 (nesting depth added 16). Of this number, 68 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.handleFile (cognitive 70) docs/index.html:3229 — index.html.handleFile has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (31 pts), ternaries 12 (21 pts), boolean chains 17, error handling 1 (nesting depth added 16). Of this number, 68 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.handleFile (cognitive 70) static/index.html:3229 — index.html.handleFile has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (31 pts), ternaries 12 (21 pts), boolean chains 17, error handling 1 (nesting depth added 16). Of this number, 68 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 · index.html.scheduleNativeKeyframeReplay (cognitive 68) · ×4
  • index.html.scheduleNativeKeyframeReplay (cognitive 68) android-app/android/app/src/main/assets/public/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 15, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 26). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cognitive 68) android-app/www/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 15, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 26). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cognitive 68) docs/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 15, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 26). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.scheduleNativeKeyframeReplay (cognitive 68) static/index.html:7009 — index.html.scheduleNativeKeyframeReplay has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 15, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 26). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 7022, 7034, 7111). 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.html.replayNativeKeyframeBatch (cognitive 62) · ×4
  • index.html.replayNativeKeyframeBatch (cognitive 62) android-app/android/app/src/main/assets/public/index.html:6847 — index.html.replayNativeKeyframeBatch has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 11, ternaries 5 (8 pts), error handling 1 (2 pts), loops 1 (nesting depth added 19). Of this number, 58 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.replayNativeKeyframeBatch (cognitive 62) android-app/www/index.html:6847 — index.html.replayNativeKeyframeBatch has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 11, ternaries 5 (8 pts), error handling 1 (2 pts), loops 1 (nesting depth added 19). Of this number, 58 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.replayNativeKeyframeBatch (cognitive 62) docs/index.html:6847 — index.html.replayNativeKeyframeBatch has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 11, ternaries 5 (8 pts), error handling 1 (2 pts), loops 1 (nesting depth added 19). Of this number, 58 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.replayNativeKeyframeBatch (cognitive 62) static/index.html:6847 — index.html.replayNativeKeyframeBatch has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 11, ternaries 5 (8 pts), error handling 1 (2 pts), loops 1 (nesting depth added 19). Of this number, 58 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.pruneStatePacks (cognitive 62) · ×4
  • standalone.pruneStatePacks (cognitive 62) android-app/android/app/src/main/assets/public/standalone.js:2805 — standalone.pruneStatePacks has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 22, if/else 5 (9 pts), error handling 2 (3 pts), loops 3 (nesting depth added 20). Of this number, 58 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.pruneStatePacks (cognitive 62) android-app/www/standalone.js:2805 — standalone.pruneStatePacks has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 22, if/else 5 (9 pts), error handling 2 (3 pts), loops 3 (nesting depth added 20). Of this number, 58 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.pruneStatePacks (cognitive 62) docs/standalone.js:2805 — standalone.pruneStatePacks has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 22, if/else 5 (9 pts), error handling 2 (3 pts), loops 3 (nesting depth added 20). Of this number, 58 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • standalone.pruneStatePacks (cognitive 62) static/standalone.js:2805 — standalone.pruneStatePacks has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 10 (25 pts), boolean chains 22, if/else 5 (9 pts), error handling 2 (3 pts), loops 3 (nesting depth added 20). Of this number, 58 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.html.drainDriveQueue (cognitive 60) · ×4
  • index.html.drainDriveQueue (cognitive 60) android-app/android/app/src/main/assets/public/index.html:5693 — index.html.drainDriveQueue has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 19, loops 1, ternaries 1 (nesting depth added 19). Of this number, 16 points are the body's own statements and 44 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.
  • index.html.drainDriveQueue (cognitive 60) android-app/www/index.html:5693 — index.html.drainDriveQueue has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 19, loops 1, ternaries 1 (nesting depth added 19). Of this number, 16 points are the body's own statements and 44 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.
  • index.html.drainDriveQueue (cognitive 60) docs/index.html:5693 — index.html.drainDriveQueue has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 19, loops 1, ternaries 1 (nesting depth added 19). Of this number, 16 points are the body's own statements and 44 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.
  • index.html.drainDriveQueue (cognitive 60) static/index.html:5693 — index.html.drainDriveQueue has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 19, loops 1, ternaries 1 (nesting depth added 19). Of this number, 16 points are the body's own statements and 44 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.html.updateNativeDriveHud (cognitive 58) · ×4
  • index.html.updateNativeDriveHud (cognitive 58) android-app/android/app/src/main/assets/public/index.html:4533 — index.html.updateNativeDriveHud has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 28, if/else 25 (27 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.updateNativeDriveHud (cognitive 58) android-app/www/index.html:4533 — index.html.updateNativeDriveHud has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 28, if/else 25 (27 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.updateNativeDriveHud (cognitive 58) docs/index.html:4533 — index.html.updateNativeDriveHud has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 28, if/else 25 (27 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.updateNativeDriveHud (cognitive 58) static/index.html:4533 — index.html.updateNativeDriveHud has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 28, if/else 25 (27 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.renderReports (cognitive 56) · ×4
  • index.html.renderReports (cognitive 56) android-app/android/app/src/main/assets/public/index.html:2508 — index.html.renderReports has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 48, ternaries 20 (30 pts), if/else 11 (18 pts), loops 13, 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports::cardHtml, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cognitive 56) android-app/www/index.html:2508 — index.html.renderReports has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 48, ternaries 20 (30 pts), if/else 11 (18 pts), loops 13, 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports::cardHtml, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cognitive 56) docs/index.html:2508 — index.html.renderReports has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 48, ternaries 20 (30 pts), if/else 11 (18 pts), loops 13, 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports::cardHtml, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.renderReports (cognitive 56) static/index.html:2508 — index.html.renderReports has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 48, ternaries 20 (30 pts), if/else 11 (18 pts), loops 13, 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. This shape REPEATS in the file: 2 other methods here (index.html.renderReports::cardHtml, index.html.renderReports::footageRowHtml) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · index.html.driveTick (cognitive 55) · ×4
  • index.html.driveTick (cognitive 55) android-app/android/app/src/main/assets/public/index.html:5881 — index.html.driveTick has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 18, ternaries 7 (15 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.driveTick (cognitive 55) android-app/www/index.html:5881 — index.html.driveTick has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 18, ternaries 7 (15 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.driveTick (cognitive 55) docs/index.html:5881 — index.html.driveTick has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 18, ternaries 7 (15 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.driveTick (cognitive 55) static/index.html:5881 — index.html.driveTick has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 18, ternaries 7 (15 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createService · ×4
  • createService::report (cognitive 55) infra/aws-central/service/core.mjs:870 — createService::report has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 15, if/else 10 (14 pts), error handling 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • createService::handleProfiled (cognitive 55) infra/aws-central/service/core.mjs:1217 — createService::handleProfiled has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 26, other 11, ternaries 5 (8 pts), error handling 3 (6 pts), if/else 3 (4 pts) (nesting depth added 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.
  • createService::detect (cognitive 32) infra/aws-central/service/core.mjs:501 — createService::detect has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 10 (11 pts), boolean chains 6, error handling 2 (4 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.
  • createService::streetRouting (cognitive 17) infra/aws-central/service/core.mjs:815 — createService::streetRouting has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5 (6 pts), boolean chains 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.
D2 · Cognitive Complexity · standalone.municipalCityRouteFromGeocode (cognitive 51) · ×4
  • standalone.municipalCityRouteFromGeocode (cognitive 51) android-app/android/app/src/main/assets/public/standalone.js:5167 — standalone.municipalCityRouteFromGeocode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (41 pts), boolean chains 7, loops 2 (3 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.
  • standalone.municipalCityRouteFromGeocode (cognitive 51) android-app/www/standalone.js:5167 — standalone.municipalCityRouteFromGeocode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (41 pts), boolean chains 7, loops 2 (3 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.
  • standalone.municipalCityRouteFromGeocode (cognitive 51) docs/standalone.js:5167 — standalone.municipalCityRouteFromGeocode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (41 pts), boolean chains 7, loops 2 (3 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.
  • standalone.municipalCityRouteFromGeocode (cognitive 51) static/standalone.js:5167 — standalone.municipalCityRouteFromGeocode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (41 pts), boolean chains 7, loops 2 (3 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 · index.html.openDetail (cognitive 48) · ×4
  • index.html.openDetail (cognitive 48) android-app/android/app/src/main/assets/public/index.html:3636 — index.html.openDetail has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 17 (20 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 45 points are the body's own statements and 3 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.
  • index.html.openDetail (cognitive 48) android-app/www/index.html:3636 — index.html.openDetail has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 17 (20 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 45 points are the body's own statements and 3 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.
  • index.html.openDetail (cognitive 48) docs/index.html:3636 — index.html.openDetail has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 17 (20 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 45 points are the body's own statements and 3 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.
  • index.html.openDetail (cognitive 48) static/index.html:3636 — index.html.openDetail has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 26, if/else 17 (20 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 45 points are the body's own statements and 3 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 · index.html.finishNativeDrive (cognitive 48) · ×4
  • index.html.finishNativeDrive (cognitive 48) android-app/android/app/src/main/assets/public/index.html:4883 — index.html.finishNativeDrive has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 32, if/else 9 (11 pts), ternaries 3, loops 1 (2 pts) (nesting depth added 3). Of this number, 45 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.
  • index.html.finishNativeDrive (cognitive 48) android-app/www/index.html:4883 — index.html.finishNativeDrive has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 32, if/else 9 (11 pts), ternaries 3, loops 1 (2 pts) (nesting depth added 3). Of this number, 45 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.
  • index.html.finishNativeDrive (cognitive 48) docs/index.html:4883 — index.html.finishNativeDrive has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 32, if/else 9 (11 pts), ternaries 3, loops 1 (2 pts) (nesting depth added 3). Of this number, 45 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.
  • index.html.finishNativeDrive (cognitive 48) static/index.html:4883 — index.html.finishNativeDrive has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 32, if/else 9 (11 pts), ternaries 3, loops 1 (2 pts) (nesting depth added 3). Of this number, 45 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 · index.html.ensureNativeDriveListeners (cognitive 46) · ×4
  • index.html.ensureNativeDriveListeners (cognitive 46) android-app/android/app/src/main/assets/public/index.html:5043 — index.html.ensureNativeDriveListeners has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 24, if/else 12 (20 pts), ternaries 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cognitive 46) android-app/www/index.html:5043 — index.html.ensureNativeDriveListeners has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 24, if/else 12 (20 pts), ternaries 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cognitive 46) docs/index.html:5043 — index.html.ensureNativeDriveListeners has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 24, if/else 12 (20 pts), ternaries 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.ensureNativeDriveListeners (cognitive 46) static/index.html:5043 — index.html.ensureNativeDriveListeners has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 24, if/else 12 (20 pts), ternaries 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 5047, 5084). 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 · standalone.maharashtraRouteFromGeocode (cognitive 45) · ×4
  • standalone.maharashtraRouteFromGeocode (cognitive 45) android-app/android/app/src/main/assets/public/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 12 (17 pts), boolean chains 7 (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.
  • standalone.maharashtraRouteFromGeocode (cognitive 45) android-app/www/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 12 (17 pts), boolean chains 7 (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.
  • standalone.maharashtraRouteFromGeocode (cognitive 45) docs/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 12 (17 pts), boolean chains 7 (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.
  • standalone.maharashtraRouteFromGeocode (cognitive 45) static/standalone.js:5372 — standalone.maharashtraRouteFromGeocode has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 8 (21 pts), if/else 12 (17 pts), boolean chains 7 (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 · standalone.shortlistFor (cognitive 43) · ×4
  • standalone.shortlistFor (cognitive 43) android-app/android/app/src/main/assets/public/standalone.js:6546 — standalone.shortlistFor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (11 pts), boolean chains 7, ternaries 1 (nesting depth added 14). Of this number, 40 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.shortlistFor (cognitive 43) android-app/www/standalone.js:6546 — standalone.shortlistFor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (11 pts), boolean chains 7, ternaries 1 (nesting depth added 14). Of this number, 40 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.shortlistFor (cognitive 43) docs/standalone.js:6546 — standalone.shortlistFor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (11 pts), boolean chains 7, ternaries 1 (nesting depth added 14). Of this number, 40 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.shortlistFor (cognitive 43) static/standalone.js:6546 — standalone.shortlistFor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (11 pts), boolean chains 7, ternaries 1 (nesting depth added 14). Of this number, 40 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.openDash (cognitive 42) · ×4
  • index.html.openDash (cognitive 42) android-app/android/app/src/main/assets/public/index.html:8855 — index.html.openDash has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 21, ternaries 11 (14 pts), if/else 5 (6 pts), loops 1 (nesting depth added 4). Of this number, 38 points are the body's own statements and 4 belong to 6 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.
  • index.html.openDash (cognitive 42) android-app/www/index.html:8855 — index.html.openDash has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 21, ternaries 11 (14 pts), if/else 5 (6 pts), loops 1 (nesting depth added 4). Of this number, 38 points are the body's own statements and 4 belong to 6 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.
  • index.html.openDash (cognitive 42) docs/index.html:8855 — index.html.openDash has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 21, ternaries 11 (14 pts), if/else 5 (6 pts), loops 1 (nesting depth added 4). Of this number, 38 points are the body's own statements and 4 belong to 6 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.
  • index.html.openDash (cognitive 42) static/index.html:8855 — index.html.openDash has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 21, ternaries 11 (14 pts), if/else 5 (6 pts), loops 1 (nesting depth added 4). Of this number, 38 points are the body's own statements and 4 belong to 6 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 · index.html.syncNativeRepairData (cognitive 40) · ×4
  • index.html.syncNativeRepairData (cognitive 40) android-app/android/app/src/main/assets/public/index.html:4783 — index.html.syncNativeRepairData has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 2 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.syncNativeRepairData (cognitive 40) android-app/www/index.html:4783 — index.html.syncNativeRepairData has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 2 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.syncNativeRepairData (cognitive 40) docs/index.html:4783 — index.html.syncNativeRepairData has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 2 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.syncNativeRepairData (cognitive 40) static/index.html:4783 — index.html.syncNativeRepairData has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 2 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.validateOfficialHandoffRegistry (cognitive 40) · ×4
  • standalone.validateOfficialHandoffRegistry (cognitive 40) android-app/android/app/src/main/assets/public/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 17, loops 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateOfficialHandoffRegistry (cognitive 40) android-app/www/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 17, loops 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateOfficialHandoffRegistry (cognitive 40) docs/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 17, loops 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateOfficialHandoffRegistry (cognitive 40) static/standalone.js:1334 — standalone.validateOfficialHandoffRegistry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 17, loops 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.performNativeDataSync (cognitive 37) · ×4
  • index.html.performNativeDataSync (cognitive 37) android-app/android/app/src/main/assets/public/index.html:4702 — index.html.performNativeDataSync has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 3 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 16). Of this number, 36 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.
  • index.html.performNativeDataSync (cognitive 37) android-app/www/index.html:4702 — index.html.performNativeDataSync has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 3 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 16). Of this number, 36 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.
  • index.html.performNativeDataSync (cognitive 37) docs/index.html:4702 — index.html.performNativeDataSync has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 3 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 16). Of this number, 36 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.
  • index.html.performNativeDataSync (cognitive 37) static/index.html:4702 — index.html.performNativeDataSync has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 3 (8 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 16). Of this number, 36 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 · standalone.binaryAssessment (cognitive 37) · ×4
  • standalone.binaryAssessment (cognitive 37) android-app/android/app/src/main/assets/public/standalone.js:872 — standalone.binaryAssessment has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 23, ternaries 12 (14 pts) (nesting depth added 2). Of this number, 35 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.
  • standalone.binaryAssessment (cognitive 37) android-app/www/standalone.js:872 — standalone.binaryAssessment has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 23, ternaries 12 (14 pts) (nesting depth added 2). Of this number, 35 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.
  • standalone.binaryAssessment (cognitive 37) docs/standalone.js:872 — standalone.binaryAssessment has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 23, ternaries 12 (14 pts) (nesting depth added 2). Of this number, 35 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.
  • standalone.binaryAssessment (cognitive 37) static/standalone.js:872 — standalone.binaryAssessment has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 23, ternaries 12 (14 pts) (nesting depth added 2). Of this number, 35 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.
D2 · Cognitive Complexity · standalone.roadEventMatch (cognitive 37) · ×4
  • standalone.roadEventMatch (cognitive 37) android-app/android/app/src/main/assets/public/standalone.js:6243 — standalone.roadEventMatch has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 15, if/else 13 (14 pts), ternaries 7 (8 pts) (nesting depth added 2). Of this number, 36 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.
  • standalone.roadEventMatch (cognitive 37) android-app/www/standalone.js:6243 — standalone.roadEventMatch has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 15, if/else 13 (14 pts), ternaries 7 (8 pts) (nesting depth added 2). Of this number, 36 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.
  • standalone.roadEventMatch (cognitive 37) docs/standalone.js:6243 — standalone.roadEventMatch has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 15, if/else 13 (14 pts), ternaries 7 (8 pts) (nesting depth added 2). Of this number, 36 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.
  • standalone.roadEventMatch (cognitive 37) static/standalone.js:6243 — standalone.roadEventMatch has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 15, if/else 13 (14 pts), ternaries 7 (8 pts) (nesting depth added 2). Of this number, 36 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 · standalone.drainSSE (cognitive 31) · ×4
  • standalone.drainSSE (cognitive 31) android-app/android/app/src/main/assets/public/standalone.js:958 — standalone.drainSSE has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.drainSSE (cognitive 31) android-app/www/standalone.js:958 — standalone.drainSSE has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.drainSSE (cognitive 31) docs/standalone.js:958 — standalone.drainSSE has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.drainSSE (cognitive 31) static/standalone.js:958 — standalone.drainSSE has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.matchHighwayTile (cognitive 30) · ×4
  • standalone.matchHighwayTile (cognitive 30) android-app/android/app/src/main/assets/public/standalone.js:4124 — standalone.matchHighwayTile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.matchHighwayTile (cognitive 30) android-app/www/standalone.js:4124 — standalone.matchHighwayTile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.matchHighwayTile (cognitive 30) docs/standalone.js:4124 — standalone.matchHighwayTile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.matchHighwayTile (cognitive 30) static/standalone.js:4124 — standalone.matchHighwayTile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.addReportUnlessDuplicate (cognitive 30) · ×4
  • standalone.addReportUnlessDuplicate (cognitive 30) android-app/android/app/src/main/assets/public/standalone.js:8760 — standalone.addReportUnlessDuplicate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 5, error handling 2 (3 pts), ternaries 3 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 11 function literals inside it that branch (lines 8785, 8761, 8858, …). 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.
  • standalone.addReportUnlessDuplicate (cognitive 30) android-app/www/standalone.js:8760 — standalone.addReportUnlessDuplicate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 5, error handling 2 (3 pts), ternaries 3 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 11 function literals inside it that branch (lines 8785, 8761, 8858, …). 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.
  • standalone.addReportUnlessDuplicate (cognitive 30) docs/standalone.js:8760 — standalone.addReportUnlessDuplicate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 5, error handling 2 (3 pts), ternaries 3 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 11 function literals inside it that branch (lines 8785, 8761, 8858, …). 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.
  • standalone.addReportUnlessDuplicate (cognitive 30) static/standalone.js:8760 — standalone.addReportUnlessDuplicate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 19, if/else 5, error handling 2 (3 pts), ternaries 3 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 11 function literals inside it that branch (lines 8785, 8761, 8858, …). 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 · standalone.evidenceForReport (cognitive 28) · ×4
  • standalone.evidenceForReport (cognitive 28) android-app/android/app/src/main/assets/public/standalone.js:11401 — standalone.evidenceForReport has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 6, if/else 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.evidenceForReport (cognitive 28) android-app/www/standalone.js:11401 — standalone.evidenceForReport has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 6, if/else 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.evidenceForReport (cognitive 28) docs/standalone.js:11401 — standalone.evidenceForReport has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 6, if/else 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.evidenceForReport (cognitive 28) static/standalone.js:11401 — standalone.evidenceForReport has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 6, if/else 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.html.renderNativeDriveStatus (cognitive 26) · ×4
  • index.html.renderNativeDriveStatus (cognitive 26) android-app/android/app/src/main/assets/public/index.html:5208 — index.html.renderNativeDriveStatus has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 10, if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.renderNativeDriveStatus (cognitive 26) android-app/www/index.html:5208 — index.html.renderNativeDriveStatus has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 10, if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.renderNativeDriveStatus (cognitive 26) docs/index.html:5208 — index.html.renderNativeDriveStatus has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 10, if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • index.html.renderNativeDriveStatus (cognitive 26) static/index.html:5208 — index.html.renderNativeDriveStatus has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (15 pts), boolean chains 10, if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.html.deleteAllAppData (cognitive 26) · ×4
  • index.html.deleteAllAppData (cognitive 26) android-app/android/app/src/main/assets/public/index.html:9676 — index.html.deleteAllAppData has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 3 (4 pts), error handling 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.
  • index.html.deleteAllAppData (cognitive 26) android-app/www/index.html:9676 — index.html.deleteAllAppData has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 3 (4 pts), error handling 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.
  • index.html.deleteAllAppData (cognitive 26) docs/index.html:9676 — index.html.deleteAllAppData has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 3 (4 pts), error handling 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.
  • index.html.deleteAllAppData (cognitive 26) static/index.html:9676 — index.html.deleteAllAppData has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), ternaries 3 (4 pts), error handling 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 · standalone.oaiStream (cognitive 26) · ×4
  • standalone.oaiStream (cognitive 26) android-app/android/app/src/main/assets/public/standalone.js:985 — standalone.oaiStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.oaiStream (cognitive 26) android-app/www/standalone.js:985 — standalone.oaiStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.oaiStream (cognitive 26) docs/standalone.js:985 — standalone.oaiStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.oaiStream (cognitive 26) static/standalone.js:985 — standalone.oaiStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.hydrateThumbs (cognitive 25) · ×4
  • index.html.hydrateThumbs (cognitive 25) android-app/android/app/src/main/assets/public/index.html:2811 — index.html.hydrateThumbs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.hydrateThumbs (cognitive 25) android-app/www/index.html:2811 — index.html.hydrateThumbs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.hydrateThumbs (cognitive 25) docs/index.html:2811 — index.html.hydrateThumbs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.hydrateThumbs (cognitive 25) static/index.html:2811 — index.html.hydrateThumbs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (3 pts) (nesting depth added 12). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch 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.html.unroutedHelp (cognitive 25) · ×4
  • index.html.unroutedHelp (cognitive 25) android-app/android/app/src/main/assets/public/index.html:3507 — index.html.unroutedHelp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (25 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.
  • index.html.unroutedHelp (cognitive 25) android-app/www/index.html:3507 — index.html.unroutedHelp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (25 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.
  • index.html.unroutedHelp (cognitive 25) docs/index.html:3507 — index.html.unroutedHelp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (25 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.
  • index.html.unroutedHelp (cognitive 25) static/index.html:3507 — index.html.unroutedHelp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (25 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.
D2 · Cognitive Complexity · index.html.watchForFix (cognitive 24) · ×4
  • index.html.watchForFix (cognitive 24) android-app/android/app/src/main/assets/public/index.html:2891 — index.html.watchForFix has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 7). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.watchForFix (cognitive 24) android-app/www/index.html:2891 — index.html.watchForFix has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 7). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.watchForFix (cognitive 24) docs/index.html:2891 — index.html.watchForFix has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 7). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.watchForFix (cognitive 24) static/index.html:2891 — index.html.watchForFix has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 7). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.handleAppBack (cognitive 24) · ×4
  • index.html.handleAppBack (cognitive 24) android-app/android/app/src/main/assets/public/index.html:9279 — index.html.handleAppBack has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.handleAppBack (cognitive 24) android-app/www/index.html:9279 — index.html.handleAppBack has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.handleAppBack (cognitive 24) docs/index.html:9279 — index.html.handleAppBack has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.handleAppBack (cognitive 24) static/index.html:9279 — index.html.handleAppBack has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.html.$("setSave").onclick (cognitive 24) · ×4
  • index.html.$("setSave").onclick (cognitive 24) android-app/android/app/src/main/assets/public/index.html:9567 — index.html.$("setSave").onclick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 5 (7 pts), 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.
  • index.html.$("setSave").onclick (cognitive 24) android-app/www/index.html:9567 — index.html.$("setSave").onclick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 5 (7 pts), 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.
  • index.html.$("setSave").onclick (cognitive 24) docs/index.html:9567 — index.html.$("setSave").onclick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 5 (7 pts), 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.
  • index.html.$("setSave").onclick (cognitive 24) static/index.html:9567 — index.html.$("setSave").onclick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 5 (7 pts), 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 · standalone.authorityRoute (cognitive 24) · ×4
  • standalone.authorityRoute (cognitive 24) android-app/android/app/src/main/assets/public/standalone.js:5288 — standalone.authorityRoute has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, ternaries 5 (8 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.
  • standalone.authorityRoute (cognitive 24) android-app/www/standalone.js:5288 — standalone.authorityRoute has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, ternaries 5 (8 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.
  • standalone.authorityRoute (cognitive 24) docs/standalone.js:5288 — standalone.authorityRoute has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, ternaries 5 (8 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.
  • standalone.authorityRoute (cognitive 24) static/standalone.js:5288 — standalone.authorityRoute has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, ternaries 5 (8 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 · index.html.startNativePreview (cognitive 23) · ×4
  • index.html.startNativePreview (cognitive 23) android-app/android/app/src/main/assets/public/index.html:4472 — index.html.startNativePreview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cognitive 23) android-app/www/index.html:4472 — index.html.startNativePreview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cognitive 23) docs/index.html:4472 — index.html.startNativePreview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • index.html.startNativePreview (cognitive 23) static/index.html:4472 — index.html.startNativePreview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 4478, 4523). 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.html.stopDrive · ×4
  • index.html.stopDrive::finish (cognitive 23) android-app/android/app/src/main/assets/public/index.html:6054 — index.html.stopDrive::finish has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 7 (9 pts), if/else 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cognitive 23) android-app/www/index.html:6054 — index.html.stopDrive::finish has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 7 (9 pts), if/else 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cognitive 23) docs/index.html:6054 — index.html.stopDrive::finish has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 7 (9 pts), if/else 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (index.html.stopDrive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive::finish (cognitive 23) static/index.html:6054 — index.html.stopDrive::finish has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, ternaries 7 (9 pts), if/else 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (index.html.stopDrive) 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 · standalone.kgisJurisdiction (cognitive 23) · ×4
  • standalone.kgisJurisdiction (cognitive 23) android-app/android/app/src/main/assets/public/standalone.js:5491 — standalone.kgisJurisdiction has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.kgisJurisdiction (cognitive 23) android-app/www/standalone.js:5491 — standalone.kgisJurisdiction has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.kgisJurisdiction (cognitive 23) docs/standalone.js:5491 — standalone.kgisJurisdiction has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.kgisJurisdiction (cognitive 23) static/standalone.js:5491 — standalone.kgisJurisdiction has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · standalone.savedMunicipalLocationMatches (cognitive 23) · ×4
  • standalone.savedMunicipalLocationMatches (cognitive 23) android-app/android/app/src/main/assets/public/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.savedMunicipalLocationMatches (cognitive 23) android-app/www/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.savedMunicipalLocationMatches (cognitive 23) docs/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.savedMunicipalLocationMatches (cognitive 23) static/standalone.js:12827 — standalone.savedMunicipalLocationMatches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch 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.html.updateNativeSourcePresentation (cognitive 22) · ×4
  • index.html.updateNativeSourcePresentation (cognitive 22) android-app/android/app/src/main/assets/public/index.html:4306 — index.html.updateNativeSourcePresentation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.updateNativeSourcePresentation (cognitive 22) android-app/www/index.html:4306 — index.html.updateNativeSourcePresentation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.updateNativeSourcePresentation (cognitive 22) docs/index.html:4306 — index.html.updateNativeSourcePresentation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • index.html.updateNativeSourcePresentation (cognitive 22) static/index.html:4306 — index.html.updateNativeSourcePresentation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.html.refreshNativeRepairTargetCache (cognitive 22) · ×4
  • index.html.refreshNativeRepairTargetCache (cognitive 22) android-app/android/app/src/main/assets/public/index.html:4826 — index.html.refreshNativeRepairTargetCache has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 2 (3 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.
  • index.html.refreshNativeRepairTargetCache (cognitive 22) android-app/www/index.html:4826 — index.html.refreshNativeRepairTargetCache has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 2 (3 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.
  • index.html.refreshNativeRepairTargetCache (cognitive 22) docs/index.html:4826 — index.html.refreshNativeRepairTargetCache has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 2 (3 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.
  • index.html.refreshNativeRepairTargetCache (cognitive 22) static/index.html:4826 — index.html.refreshNativeRepairTargetCache has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), error handling 2 (3 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 · index.html.presentNativeStoppingStatus (cognitive 22) · ×4
  • index.html.presentNativeStoppingStatus (cognitive 22) android-app/android/app/src/main/assets/public/index.html:5005 — index.html.presentNativeStoppingStatus has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.presentNativeStoppingStatus (cognitive 22) android-app/www/index.html:5005 — index.html.presentNativeStoppingStatus has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.presentNativeStoppingStatus (cognitive 22) docs/index.html:5005 — index.html.presentNativeStoppingStatus has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.presentNativeStoppingStatus (cognitive 22) static/index.html:5005 — index.html.presentNativeStoppingStatus has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.drawMap (cognitive 22) · ×4
  • index.html.drawMap (cognitive 22) android-app/android/app/src/main/assets/public/index.html:9090 — index.html.drawMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 3 (4 pts), error handling 1, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.drawMap (cognitive 22) android-app/www/index.html:9090 — index.html.drawMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 3 (4 pts), error handling 1, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.drawMap (cognitive 22) docs/index.html:9090 — index.html.drawMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 3 (4 pts), error handling 1, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • index.html.drawMap (cognitive 22) static/index.html:9090 — index.html.drawMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 3 (4 pts), error handling 1, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · standalone.reverseGeocodeUncached (cognitive 22) · ×4
  • standalone.reverseGeocodeUncached (cognitive 22) android-app/android/app/src/main/assets/public/standalone.js:1247 — standalone.reverseGeocodeUncached has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, error handling 1, if/else 1. 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.reverseGeocodeUncached (cognitive 22) android-app/www/standalone.js:1247 — standalone.reverseGeocodeUncached has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, error handling 1, if/else 1. 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.reverseGeocodeUncached (cognitive 22) docs/standalone.js:1247 — standalone.reverseGeocodeUncached has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, error handling 1, if/else 1. 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.reverseGeocodeUncached (cognitive 22) static/standalone.js:1247 — standalone.reverseGeocodeUncached has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, error handling 1, if/else 1. 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, name the conditions: bind each compound test to a 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.html.stopDrive (cognitive 20) · ×4
  • index.html.stopDrive (cognitive 20) android-app/android/app/src/main/assets/public/index.html:5976 — index.html.stopDrive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 18, ternaries 8 (10 pts), error handling 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. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cognitive 20) android-app/www/index.html:5976 — index.html.stopDrive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 18, ternaries 8 (10 pts), error handling 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. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cognitive 20) docs/index.html:5976 — index.html.stopDrive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 18, ternaries 8 (10 pts), error handling 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. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.html.stopDrive (cognitive 20) static/index.html:5976 — index.html.stopDrive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 18, ternaries 8 (10 pts), error handling 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. This shape REPEATS in the file: one other method here (index.html.stopDrive::finish) 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 · standalone.validateAuthorityRegistry (cognitive 20) · ×4
  • standalone.validateAuthorityRegistry (cognitive 20) android-app/android/app/src/main/assets/public/standalone.js:1389 — standalone.validateAuthorityRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateAuthorityRegistry (cognitive 20) android-app/www/standalone.js:1389 — standalone.validateAuthorityRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateAuthorityRegistry (cognitive 20) docs/standalone.js:1389 — standalone.validateAuthorityRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateAuthorityRegistry (cognitive 20) static/standalone.js:1389 — standalone.validateAuthorityRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.loadStatePack (cognitive 20) · ×4
  • standalone.loadStatePack (cognitive 20) android-app/android/app/src/main/assets/public/standalone.js:2916 — standalone.loadStatePack has cognitive complexity 20 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 6, boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 2918). 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.
  • standalone.loadStatePack (cognitive 20) android-app/www/standalone.js:2916 — standalone.loadStatePack has cognitive complexity 20 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 6, boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 2918). 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.
  • standalone.loadStatePack (cognitive 20) docs/standalone.js:2916 — standalone.loadStatePack has cognitive complexity 20 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 6, boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 2918). 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.
  • standalone.loadStatePack (cognitive 20) static/standalone.js:2916 — standalone.loadStatePack has cognitive complexity 20 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 6, boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 2918). 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 · index.html.validateDashcamRtspUrl (cognitive 19) · ×4
  • index.html.validateDashcamRtspUrl (cognitive 19) android-app/android/app/src/main/assets/public/index.html:438 — index.html.validateDashcamRtspUrl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8 (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.
  • index.html.validateDashcamRtspUrl (cognitive 19) android-app/www/index.html:438 — index.html.validateDashcamRtspUrl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8 (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.
  • index.html.validateDashcamRtspUrl (cognitive 19) docs/index.html:438 — index.html.validateDashcamRtspUrl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8 (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.
  • index.html.validateDashcamRtspUrl (cognitive 19) static/index.html:438 — index.html.validateDashcamRtspUrl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8 (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.html.startDriveLocation (cognitive 19) · ×4
  • index.html.startDriveLocation (cognitive 19) android-app/android/app/src/main/assets/public/index.html:5799 — index.html.startDriveLocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cognitive 19) android-app/www/index.html:5799 — index.html.startDriveLocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cognitive 19) docs/index.html:5799 — index.html.startDriveLocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (probe, clear, accept, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.startDriveLocation (cognitive 19) static/index.html:5799 — index.html.startDriveLocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (probe, clear, accept, …). 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 · index.html.end (cognitive 19) · ×4
  • index.html.end (cognitive 19) android-app/android/app/src/main/assets/public/index.html:6704 — index.html.end has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 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.
  • index.html.end (cognitive 19) android-app/www/index.html:6704 — index.html.end has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 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.
  • index.html.end (cognitive 19) docs/index.html:6704 — index.html.end has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 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.
  • index.html.end (cognitive 19) static/index.html:6704 — index.html.end has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 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 · index.html.renderNativeVideoImports (cognitive 19) · ×4
  • index.html.renderNativeVideoImports (cognitive 19) android-app/android/app/src/main/assets/public/index.html:7840 — index.html.renderNativeVideoImports has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 3, loops 2. Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.renderNativeVideoImports (cognitive 19) android-app/www/index.html:7840 — index.html.renderNativeVideoImports has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 3, loops 2. Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.renderNativeVideoImports (cognitive 19) docs/index.html:7840 — index.html.renderNativeVideoImports has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 3, loops 2. Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.renderNativeVideoImports (cognitive 19) static/index.html:7840 — index.html.renderNativeVideoImports has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 3, loops 2. Of this number, 13 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · standalone.loadHighwayContractPack (cognitive 19) · ×4
  • standalone.loadHighwayContractPack (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:3177 — standalone.loadHighwayContractPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadHighwayContractPack (cognitive 19) android-app/www/standalone.js:3177 — standalone.loadHighwayContractPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadHighwayContractPack (cognitive 19) docs/standalone.js:3177 — standalone.loadHighwayContractPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadHighwayContractPack (cognitive 19) static/standalone.js:3177 — standalone.loadHighwayContractPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3181). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadRoadNoticePack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · standalone.loadRoadNoticePack (cognitive 19) · ×4
  • standalone.loadRoadNoticePack (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:3432 — standalone.loadRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadNoticePack (cognitive 19) android-app/www/standalone.js:3432 — standalone.loadRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadNoticePack (cognitive 19) docs/standalone.js:3432 — standalone.loadRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadNoticePack (cognitive 19) static/standalone.js:3432 — standalone.loadRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3436). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadAgreementPack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · standalone.loadRoadAgreementPack (cognitive 19) · ×4
  • standalone.loadRoadAgreementPack (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:3756 — standalone.loadRoadAgreementPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadAgreementPack (cognitive 19) android-app/www/standalone.js:3756 — standalone.loadRoadAgreementPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadAgreementPack (cognitive 19) docs/standalone.js:3756 — standalone.loadRoadAgreementPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • standalone.loadRoadAgreementPack (cognitive 19) static/standalone.js:3756 — standalone.loadRoadAgreementPack has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6, boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 3760). 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. This shape REPEATS in the file: 2 other methods here (standalone.loadHighwayContractPack, standalone.loadRoadNoticePack) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · standalone.detectionEnhancementPlan (cognitive 19) · ×4
  • standalone.detectionEnhancementPlan (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:9282 — standalone.detectionEnhancementPlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.detectionEnhancementPlan (cognitive 19) android-app/www/standalone.js:9282 — standalone.detectionEnhancementPlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.detectionEnhancementPlan (cognitive 19) docs/standalone.js:9282 — standalone.detectionEnhancementPlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.detectionEnhancementPlan (cognitive 19) static/standalone.js:9282 — standalone.detectionEnhancementPlan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.planUnreportedReminder (cognitive 18) · ×4
  • standalone.planUnreportedReminder (cognitive 18) android-app/android/app/src/main/assets/public/standalone.js:6639 — standalone.planUnreportedReminder has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
  • standalone.planUnreportedReminder (cognitive 18) android-app/www/standalone.js:6639 — standalone.planUnreportedReminder has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
  • standalone.planUnreportedReminder (cognitive 18) docs/standalone.js:6639 — standalone.planUnreportedReminder has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
  • standalone.planUnreportedReminder (cognitive 18) static/standalone.js:6639 — standalone.planUnreportedReminder has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 2 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · standalone.sanitiseWardTenders (cognitive 18) · ×4
  • standalone.sanitiseWardTenders (cognitive 18) android-app/android/app/src/main/assets/public/standalone.js:6719 — standalone.sanitiseWardTenders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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.
  • standalone.sanitiseWardTenders (cognitive 18) android-app/www/standalone.js:6719 — standalone.sanitiseWardTenders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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.
  • standalone.sanitiseWardTenders (cognitive 18) docs/standalone.js:6719 — standalone.sanitiseWardTenders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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.
  • standalone.sanitiseWardTenders (cognitive 18) static/standalone.js:6719 — standalone.sanitiseWardTenders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, 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.html.acquireManualPosition (cognitive 17) · ×4
  • index.html.acquireManualPosition (cognitive 17) android-app/android/app/src/main/assets/public/index.html:2954 — index.html.acquireManualPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.acquireManualPosition (cognitive 17) android-app/www/index.html:2954 — index.html.acquireManualPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.acquireManualPosition (cognitive 17) docs/index.html:2954 — index.html.acquireManualPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.acquireManualPosition (cognitive 17) static/index.html:2954 — index.html.acquireManualPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.unroutedTitle (cognitive 17) · ×4
  • index.html.unroutedTitle (cognitive 17) android-app/android/app/src/main/assets/public/index.html:3481 — index.html.unroutedTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.unroutedTitle (cognitive 17) android-app/www/index.html:3481 — index.html.unroutedTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.unroutedTitle (cognitive 17) docs/index.html:3481 — index.html.unroutedTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.unroutedTitle (cognitive 17) static/index.html:3481 — index.html.unroutedTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.html.ensureVisionAvailable (cognitive 17) · ×4
  • index.html.ensureVisionAvailable (cognitive 17) android-app/android/app/src/main/assets/public/index.html:5179 — index.html.ensureVisionAvailable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.ensureVisionAvailable (cognitive 17) android-app/www/index.html:5179 — index.html.ensureVisionAvailable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.ensureVisionAvailable (cognitive 17) docs/index.html:5179 — index.html.ensureVisionAvailable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • index.html.ensureVisionAvailable (cognitive 17) static/index.html:5179 — index.html.ensureVisionAvailable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). 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 into named stages: move each independent step or branch 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.html.recoverDriveCamera (cognitive 17) · ×4
  • index.html.recoverDriveCamera (cognitive 17) android-app/android/app/src/main/assets/public/index.html:5838 — index.html.recoverDriveCamera has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 2 (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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cognitive 17) android-app/www/index.html:5838 — index.html.recoverDriveCamera has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 2 (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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cognitive 17) docs/index.html:5838 — index.html.recoverDriveCamera has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 2 (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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • index.html.recoverDriveCamera (cognitive 17) static/index.html:5838 — index.html.recoverDriveCamera has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 2 (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, name the conditions: bind each compound test to a 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.html.cycleClip (cognitive 17) · ×4
  • index.html.cycleClip (cognitive 17) android-app/android/app/src/main/assets/public/index.html:6477 — index.html.cycleClip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 3. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cognitive 17) android-app/www/index.html:6477 — index.html.cycleClip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 3. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cognitive 17) docs/index.html:6477 — index.html.cycleClip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 3. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.html.cycleClip (cognitive 17) static/index.html:6477 — index.html.cycleClip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 3. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (settle, requestStop, a function literal at line 6514). 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 · index.html.publicMapPin (cognitive 17) · ×4
  • index.html.publicMapPin (cognitive 17) android-app/android/app/src/main/assets/public/index.html:8805 — index.html.publicMapPin has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.publicMapPin (cognitive 17) android-app/www/index.html:8805 — index.html.publicMapPin has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.publicMapPin (cognitive 17) docs/index.html:8805 — index.html.publicMapPin has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • index.html.publicMapPin (cognitive 17) static/index.html:8805 — index.html.publicMapPin has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.html.positionWithoutAsking (cognitive 17) · ×4
  • index.html.positionWithoutAsking (cognitive 17) android-app/android/app/src/main/assets/public/index.html:9063 — index.html.positionWithoutAsking has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 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.
  • index.html.positionWithoutAsking (cognitive 17) android-app/www/index.html:9063 — index.html.positionWithoutAsking has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 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.
  • index.html.positionWithoutAsking (cognitive 17) docs/index.html:9063 — index.html.positionWithoutAsking has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 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.
  • index.html.positionWithoutAsking (cognitive 17) static/index.html:9063 — index.html.positionWithoutAsking has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 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 · index.html.updateHud (cognitive 16) · ×4
  • index.html.updateHud (cognitive 16) android-app/android/app/src/main/assets/public/index.html:5523 — index.html.updateHud has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 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.
  • index.html.updateHud (cognitive 16) android-app/www/index.html:5523 — index.html.updateHud has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 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.
  • index.html.updateHud (cognitive 16) docs/index.html:5523 — index.html.updateHud has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 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.
  • index.html.updateHud (cognitive 16) static/index.html:5523 — index.html.updateHud has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 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 · standalone.validateRoadNoticeManifest (cognitive 16) · ×4
  • standalone.validateRoadNoticeManifest (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:3260 — standalone.validateRoadNoticeManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadNoticeManifest (cognitive 16) android-app/www/standalone.js:3260 — standalone.validateRoadNoticeManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadNoticeManifest (cognitive 16) docs/standalone.js:3260 — standalone.validateRoadNoticeManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadNoticeManifest (cognitive 16) static/standalone.js:3260 — standalone.validateRoadNoticeManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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 · standalone.validateRoadAgreementManifest (cognitive 16) · ×4
  • standalone.validateRoadAgreementManifest (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:3520 — standalone.validateRoadAgreementManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadAgreementManifest (cognitive 16) android-app/www/standalone.js:3520 — standalone.validateRoadAgreementManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadAgreementManifest (cognitive 16) docs/standalone.js:3520 — standalone.validateRoadAgreementManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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.
  • standalone.validateRoadAgreementManifest (cognitive 16) static/standalone.js:3520 — standalone.validateRoadAgreementManifest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 2 (3 pts), ternaries 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 · standalone.loadHighwayTile (cognitive 16) · ×4
  • standalone.loadHighwayTile (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:4033 — standalone.loadHighwayTile has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5, boolean chains 2 (nesting depth added 4). 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 4035). 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.
  • standalone.loadHighwayTile (cognitive 16) android-app/www/standalone.js:4033 — standalone.loadHighwayTile has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5, boolean chains 2 (nesting depth added 4). 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 4035). 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.
  • standalone.loadHighwayTile (cognitive 16) docs/standalone.js:4033 — standalone.loadHighwayTile has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5, boolean chains 2 (nesting depth added 4). 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 4035). 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.
  • standalone.loadHighwayTile (cognitive 16) static/standalone.js:4033 — standalone.loadHighwayTile has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5, boolean chains 2 (nesting depth added 4). 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 4035). 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 · standalone.kolkataRouteFromGeocode (cognitive 16) · ×4
  • standalone.kolkataRouteFromGeocode (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:4485 — standalone.kolkataRouteFromGeocode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 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.
  • standalone.kolkataRouteFromGeocode (cognitive 16) android-app/www/standalone.js:4485 — standalone.kolkataRouteFromGeocode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 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.
  • standalone.kolkataRouteFromGeocode (cognitive 16) docs/standalone.js:4485 — standalone.kolkataRouteFromGeocode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 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.
  • standalone.kolkataRouteFromGeocode (cognitive 16) static/standalone.js:4485 — standalone.kolkataRouteFromGeocode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 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 · standalone.trustedContractStateCode (cognitive 16) · ×4
  • standalone.trustedContractStateCode (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:6082 — standalone.trustedContractStateCode has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 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.
  • standalone.trustedContractStateCode (cognitive 16) android-app/www/standalone.js:6082 — standalone.trustedContractStateCode has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 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.
  • standalone.trustedContractStateCode (cognitive 16) docs/standalone.js:6082 — standalone.trustedContractStateCode has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 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.
  • standalone.trustedContractStateCode (cognitive 16) static/standalone.js:6082 — standalone.trustedContractStateCode has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 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 · standalone.tendersFor (cognitive 16) · ×4
  • standalone.tendersFor (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:6499 — standalone.tendersFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.tendersFor (cognitive 16) android-app/www/standalone.js:6499 — standalone.tendersFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.tendersFor (cognitive 16) docs/standalone.js:6499 — standalone.tendersFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.tendersFor (cognitive 16) static/standalone.js:6499 — standalone.tendersFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: DriveForegroundService android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:75 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× 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: DriveModePlugin android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:165 — TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.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: NativeDriveCameraManager android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:63 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: NativeRtspFrameSource android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:40 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×4
  • Edited copy of a member (4 corresponding lines) eval/private_drive_corpus.py:413 — eval/private_drive_corpus.py:413-416 | eval/private_release_gate.py:157-160 — 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.
  • Edited copy of a member (4 corresponding lines) tools/build-gepnic-road-notice-packs.py:181 — tools/build-gepnic-road-notice-packs.py:181-184 | tools/build-pmgsy-road-agreement-packs.py:210-213 — 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.
  • Edited copy of a member (4 corresponding lines) tools/build-maharashtra-coverage.py:63 — tools/build-maharashtra-coverage.py:63-66 | tools/build-west-bengal-coverage.py:74-77 — 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.
  • Edited copy of a member (4 corresponding lines) tools/pull-bihar-road-tenders.py:127 — tools/pull-bihar-road-tenders.py:127-130 | tools/pull-telangana-road-tenders.py:119-122 — 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 · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/FrameCompressor.kt:60 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/FrameCompressor.kt:60-69 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/FrameCompressor.kt:183-192 — 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 `android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/FrameCompressor.kt:60` 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 (10 lines × 2) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:596 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:596-605 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:486-495 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:596` 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 (10 lines × 2) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:44 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:44-54 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:103-112 — 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 `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:44` 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 (10 lines × 2) ml/yolo/common.py:110 — ml/yolo/common.py:110-119 | ml/yolo/parity.py:60-69 — 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 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.
D1 · Cyclomatic Complexity · createService · ×3
  • createService::report (cyclomatic 59) infra/aws-central/service/core.mjs:870 — createService::report has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • createService::handleProfiled (cyclomatic 48) infra/aws-central/service/core.mjs:1217 — createService::handleProfiled has cyclomatic complexity 48 (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.
  • createService::detect (cyclomatic 29) infra/aws-central/service/core.mjs:501 — createService::detect has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · tenderCoversCarriageway (cognitive 52) · ×3
  • tenderCoversCarriageway (cognitive 52) static/standalone.js:6421 — tenderCoversCarriageway has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 20, loops 3 (6 pts) (nesting depth added 15). Of this number, 49 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.
  • tenderCoversCarriageway (cognitive 52) android-app/www/standalone.js:6421 — tenderCoversCarriageway has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 20, loops 3 (6 pts) (nesting depth added 15). Of this number, 49 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.
  • tenderCoversCarriageway (cognitive 52) infra/aws-central/service/tender-scope.mjs:70 — tenderCoversCarriageway has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 20, loops 3 (6 pts) (nesting depth added 15). Of this number, 49 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.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×3
  • Edited copy of a member (12 corresponding lines) eval/exhaustive_video_eval.py:987 — eval/exhaustive_video_eval.py:987-1001 | eval/run_rad_eval.py:1188-1199 — 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.
  • Edited copy of a member (12 corresponding lines) ml/yolo/common.py:134 — ml/yolo/common.py:134-145 | ml/yolo/parity.py:81-92 — 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.
  • Edited copy of a member (12 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:1223 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:1223-1234 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeSourceMediaLedger.kt:13-24 — 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 · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) eval/exhaustive_video_eval.py:661 — eval/exhaustive_video_eval.py:661-667 | eval/private_release_gate.py:272-280 — 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) tools/build-delhi-coverage.py:133 — tools/build-delhi-coverage.py:133-141 | tools/build-metro-coverage.py:142-148 — 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) tools/pull-emarg-road-contracts.py:90 — tools/pull-emarg-road-contracts.py:90-96 | tools/pull-lakshadweep-road-tenders.py:74-80 — 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 (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:373 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:373-377 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:504-508 — 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 `android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:373` 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) eval/materialize_private_eval.py:196 — eval/materialize_private_eval.py:196-200 | eval/materialize_private_eval.py:294-298 — 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 `eval/materialize_private_eval.py:196` 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 (5 lines × 2) tools/build-delhi-coverage.py:134 — tools/build-delhi-coverage.py:134-138 | tools/build-metro-coverage.py:143-147 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) infra/aws-yolo/service/detector.py:227 — infra/aws-yolo/service/detector.py:227-234 | ml/yolo/release.py:299-305 — 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. 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.
  • Duplicated block (7–8 lines × 2) tools/build-gepnic-road-notice-packs.py:1049 — tools/build-gepnic-road-notice-packs.py:1049-1055 | tools/build-pmgsy-road-agreement-packs.py:564-571 — 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 (7–8 lines × 2) tools/state_pack_tools.py:1874 — tools/state_pack_tools.py:1874-1880 | tools/state_pack_tools.py:1956-1963 — 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 `tools/state_pack_tools.py:1956` 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 (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) ml/yolo/common.py:457 — ml/yolo/common.py:457-463 | ml/yolo/prepare_dataset.py:825-831 — 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 (7 lines × 2) eval/run_prepared_eval.py:86 — eval/run_prepared_eval.py:86-92 | eval/run_prepared_eval.py:93-99 — 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) tools/pull-chhattisgarh-chips-road-tenders.py:109 — tools/pull-chhattisgarh-chips-road-tenders.py:109-115 | tools/pull-gujarat-nprocure-road-tenders.py:114-120 — before extracting anything, compare `tools/pull-chhattisgarh-chips-road-tenders.py` and `tools/pull-gujarat-nprocure-road-tenders.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:80 — tools/build-andhra-pradesh-coverage.py:80-95 | tools/build-punjab-coverage.py:76-90 | tools/build-tamil-nadu-coverage.py:88-103 | tools/build-telangana-coverage.py:81-96 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:173 — tools/build-andhra-pradesh-coverage.py:173-178 | tools/build-punjab-coverage.py:168-173 | tools/build-tamil-nadu-coverage.py:181-186 | tools/build-telangana-coverage.py:174-179 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:182 — tools/build-andhra-pradesh-coverage.py:182-217 | tools/build-punjab-coverage.py:177-214 | tools/build-tamil-nadu-coverage.py:190-225 | tools/build-telangana-coverage.py:183-218 — 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.
R10 · Code Duplication · Forked directory tree (17 identical files, ~31534 lines × 2 trees) · ×3
  • Forked directory tree (17 identical files, ~31534 lines × 2 trees) android-app/www/standalone.js:1 — android-app/www/ and docs/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 17 and 467 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (17 identical files, ~31534 lines × 2 trees) android-app/www/standalone.js:1 — android-app/www/ and static/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 17 and 17 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (17 identical files, ~31534 lines × 2 trees) docs/standalone.js:1 — docs/ and static/ are near-verbatim copies of each other: 17 files are byte-identical under the same relative paths (~31534 lines; the trees hold 467 and 17 files). That is one structural fact, not 17 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark android-app/www/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark static/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×2
  • Modal dialog does not manage focus android-app/www/index.html:391 — 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 static/index.html:391 — 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.
D1 · Cyclomatic Complexity · createReport (cyclomatic 304) · ×2
  • createReport (cyclomatic 304) static/standalone.js:9590 — createReport has cyclomatic complexity 304 (threshold 15). Of this number, 298 points are the body's own statements and 6 belong to 11 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.
  • createReport (cyclomatic 304) android-app/www/standalone.js:9590 — createReport has cyclomatic complexity 304 (threshold 15). Of this number, 298 points are the body's own statements and 6 belong to 11 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 · standalone.createReport (cyclomatic 297) · ×2
  • standalone.createReport (cyclomatic 297) android-app/android/app/src/main/assets/public/standalone.js:9590 — standalone.createReport has cyclomatic complexity 297 (threshold 15). Of this number, 292 points are the body's own statements and 5 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.
  • standalone.createReport (cyclomatic 297) docs/standalone.js:9590 — standalone.createReport has cyclomatic complexity 297 (threshold 15). Of this number, 292 points are the body's own statements and 5 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 · importNativeReport (cyclomatic 221) · ×2
  • importNativeReport (cyclomatic 221) static/standalone.js:11171 — importNativeReport has cyclomatic complexity 221 (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.
  • importNativeReport (cyclomatic 221) android-app/www/standalone.js:11171 — importNativeReport has cyclomatic complexity 221 (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 · standalone.importNativeReport (cyclomatic 219) · ×2
  • standalone.importNativeReport (cyclomatic 219) android-app/android/app/src/main/assets/public/standalone.js:11171 — standalone.importNativeReport has cyclomatic complexity 219 (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.
  • standalone.importNativeReport (cyclomatic 219) docs/standalone.js:11171 — standalone.importNativeReport has cyclomatic complexity 219 (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 · prepareComplaint (cyclomatic 137) · ×2
  • prepareComplaint (cyclomatic 137) static/standalone.js:10132 — prepareComplaint has cyclomatic complexity 137 (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.
  • prepareComplaint (cyclomatic 137) android-app/www/standalone.js:10132 — prepareComplaint has cyclomatic complexity 137 (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 · standalone.prepareComplaint (cyclomatic 133) · ×2
  • standalone.prepareComplaint (cyclomatic 133) android-app/android/app/src/main/assets/public/standalone.js:10132 — standalone.prepareComplaint has cyclomatic complexity 133 (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.
  • standalone.prepareComplaint (cyclomatic 133) docs/standalone.js:10132 — standalone.prepareComplaint has cyclomatic complexity 133 (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 · createCivicReport (cyclomatic 80) · ×2
  • createCivicReport (cyclomatic 80) static/standalone.js:11463 — createCivicReport has cyclomatic complexity 80 (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.
  • createCivicReport (cyclomatic 80) android-app/www/standalone.js:11463 — createCivicReport has cyclomatic complexity 80 (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 · standalone.createCivicReport (cyclomatic 79) · ×2
  • standalone.createCivicReport (cyclomatic 79) android-app/android/app/src/main/assets/public/standalone.js:11463 — standalone.createCivicReport has cyclomatic complexity 79 (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.
  • standalone.createCivicReport (cyclomatic 79) docs/standalone.js:11463 — standalone.createCivicReport has cyclomatic complexity 79 (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 · openEmailDraft (cyclomatic 76) · ×2
  • openEmailDraft (cyclomatic 76) static/standalone.js:10289 — openEmailDraft has cyclomatic complexity 76 (threshold 15). Of this number, 75 points are the body's own statements and 1 belongs 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.
  • openEmailDraft (cyclomatic 76) android-app/www/standalone.js:10289 — openEmailDraft has cyclomatic complexity 76 (threshold 15). Of this number, 75 points are the body's own statements and 1 belongs 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 · standalone.openEmailDraft (cyclomatic 75) · ×2
  • standalone.openEmailDraft (cyclomatic 75) android-app/android/app/src/main/assets/public/standalone.js:10289 — standalone.openEmailDraft has cyclomatic complexity 75 (threshold 15). Of this number, 74 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.
  • standalone.openEmailDraft (cyclomatic 75) docs/standalone.js:10289 — standalone.openEmailDraft has cyclomatic complexity 75 (threshold 15). Of this number, 74 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 · retryCivicRouting (cyclomatic 45) · ×2
  • retryCivicRouting (cyclomatic 45) static/standalone.js:11595 — retryCivicRouting has cyclomatic complexity 45 (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.
  • retryCivicRouting (cyclomatic 45) android-app/www/standalone.js:11595 — retryCivicRouting has cyclomatic complexity 45 (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 · standalone.retryCivicRouting (cyclomatic 42) · ×2
  • standalone.retryCivicRouting (cyclomatic 42) android-app/android/app/src/main/assets/public/standalone.js:11595 — standalone.retryCivicRouting has cyclomatic complexity 42 (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.
  • standalone.retryCivicRouting (cyclomatic 42) docs/standalone.js:11595 — standalone.retryCivicRouting has cyclomatic complexity 42 (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 · openOfficialHandoff (cyclomatic 36) · ×2
  • openOfficialHandoff (cyclomatic 36) static/standalone.js:11976 — openOfficialHandoff 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.
  • openOfficialHandoff (cyclomatic 36) android-app/www/standalone.js:11976 — openOfficialHandoff 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 · standalone.openOfficialHandoff (cyclomatic 35) · ×2
  • standalone.openOfficialHandoff (cyclomatic 35) android-app/android/app/src/main/assets/public/standalone.js:11976 — standalone.openOfficialHandoff has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • standalone.openOfficialHandoff (cyclomatic 35) docs/standalone.js:11976 — standalone.openOfficialHandoff has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · signedServicePost (cyclomatic 32) · ×2
  • signedServicePost (cyclomatic 32) static/standalone.js:672 — signedServicePost has cyclomatic complexity 32 (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.
  • signedServicePost (cyclomatic 32) android-app/www/standalone.js:672 — signedServicePost has cyclomatic complexity 32 (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 · validatePinnedStatewidePayload (cyclomatic 32) · ×2
  • validatePinnedStatewidePayload (cyclomatic 32) static/standalone.js:2404 — validatePinnedStatewidePayload has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • validatePinnedStatewidePayload (cyclomatic 32) android-app/www/standalone.js:2404 — validatePinnedStatewidePayload has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.signedServicePost (cyclomatic 31) · ×2
  • standalone.signedServicePost (cyclomatic 31) android-app/android/app/src/main/assets/public/standalone.js:672 — standalone.signedServicePost has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.signedServicePost (cyclomatic 31) docs/standalone.js:672 — standalone.signedServicePost has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · pruneStoredHistory (cyclomatic 31) · ×2
  • pruneStoredHistory (cyclomatic 31) static/standalone.js:8695 — pruneStoredHistory has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (endOf, a function literal at line 8701, keepsEverything, …). 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.
  • pruneStoredHistory (cyclomatic 31) android-app/www/standalone.js:8695 — pruneStoredHistory has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (endOf, a function literal at line 8701, keepsEverything, …). 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 · addReportUnlessDuplicate · ×2
  • addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess (cyclomatic 31) static/standalone.js:8786 — addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess 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.
  • addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess (cyclomatic 31) android-app/www/standalone.js:8786 — addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess 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 · validatePunjabPayload (cyclomatic 30) · ×2
  • validatePunjabPayload (cyclomatic 30) static/standalone.js:2268 — validatePunjabPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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.
  • validatePunjabPayload (cyclomatic 30) android-app/www/standalone.js:2268 — validatePunjabPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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 · validateTamilNaduPayload (cyclomatic 30) · ×2
  • validateTamilNaduPayload (cyclomatic 30) static/standalone.js:2302 — validateTamilNaduPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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.
  • validateTamilNaduPayload (cyclomatic 30) android-app/www/standalone.js:2302 — validateTamilNaduPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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 · validateAndhraPradeshPayload (cyclomatic 30) · ×2
  • validateAndhraPradeshPayload (cyclomatic 30) static/standalone.js:2336 — validateAndhraPradeshPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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.
  • validateAndhraPradeshPayload (cyclomatic 30) android-app/www/standalone.js:2336 — validateAndhraPradeshPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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 · validateTelanganaPayload (cyclomatic 30) · ×2
  • validateTelanganaPayload (cyclomatic 30) static/standalone.js:2370 — validateTelanganaPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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.
  • validateTelanganaPayload (cyclomatic 30) android-app/www/standalone.js:2370 — validateTelanganaPayload has cyclomatic complexity 30 (threshold 15). Of this number, 25 points are the body's own statements and 5 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 · validateKarnatakaBodies (cyclomatic 28) · ×2
  • validateKarnatakaBodies (cyclomatic 28) static/standalone.js:2063 — validateKarnatakaBodies has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2070, 2079, 2072). 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.
  • validateKarnatakaBodies (cyclomatic 28) android-app/www/standalone.js:2063 — validateKarnatakaBodies has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2070, 2079, 2072). 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 · tenderFromService (cyclomatic 26) · ×2
  • tenderFromService (cyclomatic 26) static/standalone.js:6744 — tenderFromService has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • tenderFromService (cyclomatic 26) android-app/www/standalone.js:6744 — tenderFromService has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · standalone.tenderFromService (cyclomatic 25) · ×2
  • standalone.tenderFromService (cyclomatic 25) android-app/android/app/src/main/assets/public/standalone.js:6744 — standalone.tenderFromService has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.tenderFromService (cyclomatic 25) docs/standalone.js:6744 — standalone.tenderFromService has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · analyzeImage (cyclomatic 23) · ×2
  • analyzeImage (cyclomatic 23) static/standalone.js:1157 — analyzeImage has cyclomatic complexity 23 (threshold 15). Of this number, 17 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • analyzeImage (cyclomatic 23) android-app/www/standalone.js:1157 — analyzeImage has cyclomatic complexity 23 (threshold 15). Of this number, 17 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.analyzeImage (cyclomatic 22) · ×2
  • standalone.analyzeImage (cyclomatic 22) android-app/android/app/src/main/assets/public/standalone.js:1157 — standalone.analyzeImage has cyclomatic complexity 22 (threshold 15). Of this number, 16 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.analyzeImage (cyclomatic 22) docs/standalone.js:1157 — standalone.analyzeImage has cyclomatic complexity 22 (threshold 15). Of this number, 16 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · validateTenderPack (cyclomatic 21) · ×2
  • validateTenderPack (cyclomatic 21) static/standalone.js:2734 — validateTenderPack 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • validateTenderPack (cyclomatic 21) android-app/www/standalone.js:2734 — validateTenderPack 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · loadInstallationIdentity (cyclomatic 20) · ×2
  • loadInstallationIdentity (cyclomatic 20) static/standalone.js:578 — loadInstallationIdentity 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • loadInstallationIdentity (cyclomatic 20) android-app/www/standalone.js:578 — loadInstallationIdentity 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.pruneStoredHistory (cyclomatic 19) · ×2
  • standalone.pruneStoredHistory (cyclomatic 19) android-app/android/app/src/main/assets/public/standalone.js:8695 — standalone.pruneStoredHistory has cyclomatic complexity 19 (threshold 15). Of this number, 12 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.pruneStoredHistory (cyclomatic 19) docs/standalone.js:8695 — standalone.pruneStoredHistory has cyclomatic complexity 19 (threshold 15). Of this number, 12 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. This is NOT this file's highest cyclomatic complexity: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · completeCentralRetry · ×2
  • completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess (cyclomatic 19) static/standalone.js:9174 — completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess (cyclomatic 19) android-app/www/standalone.js:9174 — completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · retryCentralOutbox (cyclomatic 19) · ×2
  • retryCentralOutbox (cyclomatic 19) static/standalone.js:9224 — retryCentralOutbox 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 3 function literals inside it that branch (lines 9227, 9229, 9259). 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • retryCentralOutbox (cyclomatic 19) android-app/www/standalone.js:9224 — retryCentralOutbox 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 3 function literals inside it that branch (lines 9227, 9229, 9259). 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · standalone.loadInstallationIdentity (cyclomatic 18) · ×2
  • standalone.loadInstallationIdentity (cyclomatic 18) android-app/android/app/src/main/assets/public/standalone.js:578 — standalone.loadInstallationIdentity 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • standalone.loadInstallationIdentity (cyclomatic 18) docs/standalone.js:578 — standalone.loadInstallationIdentity 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: standalone.validatePinnedStatewidePayload (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×2
  • (anonymous) (cyclomatic 17) static/standalone.js:4 — (anonymous) 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • (anonymous) (cyclomatic 17) android-app/www/standalone.js:4 — (anonymous) 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · openIdb (cyclomatic 17) · ×2
  • openIdb (cyclomatic 17) static/standalone.js:8198 — openIdb has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function items inside it that branch ((anonymous)::onupgradeneeded, (anonymous)::onupgradeneeded::onsuccess, a function literal at line 8199, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • openIdb (cyclomatic 17) android-app/www/standalone.js:8198 — openIdb has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function items inside it that branch ((anonymous)::onupgradeneeded, (anonymous)::onupgradeneeded::onsuccess, a function literal at line 8199, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · resumePendingDetections (cyclomatic 17) · ×2
  • resumePendingDetections (cyclomatic 17) static/standalone.js:9554 — resumePendingDetections 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 4 function literals inside it that branch (lines 9556, 9557, 9565, …). 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • resumePendingDetections (cyclomatic 17) android-app/www/standalone.js:9554 — resumePendingDetections 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 4 function literals inside it that branch (lines 9556, 9557, 9565, …). 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: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · delhiCoverage (cyclomatic 16) · ×2
  • delhiCoverage (cyclomatic 16) static/standalone.js:4391 — delhiCoverage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 4394). 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
  • delhiCoverage (cyclomatic 16) android-app/www/standalone.js:4391 — delhiCoverage has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 4394). 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. This is NOT this file's highest cyclomatic complexity: migrateLegacyAndhraPradeshHandoff (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D10 · Test Quality · Fixed-sleep synchronisation · ×2
  • Fixed-sleep synchronisation: after the breaker closes the next lookup asks KGIS again infra/aws-central/test/geolocation.test.mjs:270 — This test starts work it did not wait for (`geolocator`, still running when the sleep starts) and then orders itself against it with `sleep(60)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: an expired map answers from memory at once and refreshes behind the answer infra/aws-central/test/speed.test.mjs:242 — This test starts work it did not wait for (`blocked`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 5))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D2 · Cognitive Complexity · createReport (cognitive 348) · ×2
  • createReport (cognitive 348) static/standalone.js:9590 — createReport has cognitive complexity 348 (threshold 15). Drivers by points: ternaries 138 (157 pts), boolean chains 106, if/else 39 (61 pts), error handling 11 (24 pts) (nesting depth added 54). Of this number, 337 points are the body's own statements and 11 belong to 11 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.
  • createReport (cognitive 348) android-app/www/standalone.js:9590 — createReport has cognitive complexity 348 (threshold 15). Drivers by points: ternaries 138 (157 pts), boolean chains 106, if/else 39 (61 pts), error handling 11 (24 pts) (nesting depth added 54). Of this number, 337 points are the body's own statements and 11 belong to 11 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 · standalone.createReport (cognitive 319) · ×2
  • standalone.createReport (cognitive 319) android-app/android/app/src/main/assets/public/standalone.js:9590 — standalone.createReport has cognitive complexity 319 (threshold 15). Drivers by points: ternaries 122 (146 pts), boolean chains 106, if/else 39 (61 pts), error handling 4 (6 pts) (nesting depth added 48). Of this number, 313 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, 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.
  • standalone.createReport (cognitive 319) docs/standalone.js:9590 — standalone.createReport has cognitive complexity 319 (threshold 15). Drivers by points: ternaries 122 (146 pts), boolean chains 106, if/else 39 (61 pts), error handling 4 (6 pts) (nesting depth added 48). Of this number, 313 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, 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 · handle (cognitive 242) · ×2
  • handle (cognitive 242) static/standalone.js:10636 — handle has cognitive complexity 242 (threshold 15). Drivers by points: if/else 70 (110 pts), boolean chains 85, ternaries 19 (38 pts), error handling 4 (9 pts) (nesting depth added 64). Of this number, 207 points are the body's own statements and 35 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • handle (cognitive 242) android-app/www/standalone.js:10636 — handle has cognitive complexity 242 (threshold 15). Drivers by points: if/else 70 (110 pts), boolean chains 85, ternaries 19 (38 pts), error handling 4 (9 pts) (nesting depth added 64). Of this number, 207 points are the body's own statements and 35 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.handle (cognitive 238) · ×2
  • standalone.handle (cognitive 238) android-app/android/app/src/main/assets/public/standalone.js:10636 — standalone.handle has cognitive complexity 238 (threshold 15). Drivers by points: if/else 69 (107 pts), boolean chains 86, ternaries 18 (36 pts), error handling 4 (9 pts) (nesting depth added 61). Of this number, 207 points are the body's own statements and 31 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.handle (cognitive 238) docs/standalone.js:10636 — standalone.handle has cognitive complexity 238 (threshold 15). Drivers by points: if/else 69 (107 pts), boolean chains 86, ternaries 18 (36 pts), error handling 4 (9 pts) (nesting depth added 61). Of this number, 207 points are the body's own statements and 31 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · importNativeReport (cognitive 208) · ×2
  • importNativeReport (cognitive 208) static/standalone.js:11171 — importNativeReport has cognitive complexity 208 (threshold 15). Drivers by points: ternaries 116, boolean chains 85, if/else 5, error handling 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.
  • importNativeReport (cognitive 208) android-app/www/standalone.js:11171 — importNativeReport has cognitive complexity 208 (threshold 15). Drivers by points: ternaries 116, boolean chains 85, if/else 5, error handling 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 · standalone.importNativeReport (cognitive 201) · ×2
  • standalone.importNativeReport (cognitive 201) android-app/android/app/src/main/assets/public/standalone.js:11171 — standalone.importNativeReport has cognitive complexity 201 (threshold 15). Drivers by points: ternaries 116 (118 pts), boolean chains 78, if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.importNativeReport (cognitive 201) docs/standalone.js:11171 — standalone.importNativeReport has cognitive complexity 201 (threshold 15). Drivers by points: ternaries 116 (118 pts), boolean chains 78, if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · routeOfficer (cognitive 174) · ×2
  • routeOfficer (cognitive 174) static/standalone.js:5689 — routeOfficer has cognitive complexity 174 (threshold 15). Drivers by points: if/else 80 (131 pts), boolean chains 30, ternaries 8 (10 pts), loops 2, error handling 1 (nesting depth added 53). Of this number, 167 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • routeOfficer (cognitive 174) android-app/www/standalone.js:5689 — routeOfficer has cognitive complexity 174 (threshold 15). Drivers by points: if/else 80 (131 pts), boolean chains 30, ternaries 8 (10 pts), loops 2, error handling 1 (nesting depth added 53). Of this number, 167 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.routeOfficer (cognitive 172) · ×2
  • standalone.routeOfficer (cognitive 172) android-app/android/app/src/main/assets/public/standalone.js:5689 — standalone.routeOfficer has cognitive complexity 172 (threshold 15). Drivers by points: if/else 80 (131 pts), boolean chains 31, ternaries 6 (7 pts), loops 2, error handling 1 (nesting depth added 52). Of this number, 165 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.routeOfficer (cognitive 172) docs/standalone.js:5689 — standalone.routeOfficer has cognitive complexity 172 (threshold 15). Drivers by points: if/else 80 (131 pts), boolean chains 31, ternaries 6 (7 pts), loops 2, error handling 1 (nesting depth added 52). Of this number, 165 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepareComplaint (cognitive 142) · ×2
  • prepareComplaint (cognitive 142) static/standalone.js:10132 — prepareComplaint has cognitive complexity 142 (threshold 15). Drivers by points: boolean chains 94, ternaries 15 (24 pts), if/else 12 (14 pts), error handling 4 (10 pts) (nesting depth added 17). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • prepareComplaint (cognitive 142) android-app/www/standalone.js:10132 — prepareComplaint has cognitive complexity 142 (threshold 15). Drivers by points: boolean chains 94, ternaries 15 (24 pts), if/else 12 (14 pts), error handling 4 (10 pts) (nesting depth added 17). To reduce it, name the conditions: bind each compound test to a 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 · standalone.prepareComplaint (cognitive 119) · ×2
  • standalone.prepareComplaint (cognitive 119) android-app/android/app/src/main/assets/public/standalone.js:10132 — standalone.prepareComplaint has cognitive complexity 119 (threshold 15). Drivers by points: boolean chains 87, ternaries 11 (18 pts), if/else 12 (14 pts) (nesting depth added 9). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.prepareComplaint (cognitive 119) docs/standalone.js:10132 — standalone.prepareComplaint has cognitive complexity 119 (threshold 15). Drivers by points: boolean chains 87, ternaries 11 (18 pts), if/else 12 (14 pts) (nesting depth added 9). To reduce it, name the conditions: bind each compound test to a 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 · migrateLegacyComplaintRecord (cognitive 91) · ×2
  • migrateLegacyComplaintRecord (cognitive 91) static/standalone.js:7224 — migrateLegacyComplaintRecord has cognitive complexity 91 (threshold 15). Drivers by points: boolean chains 32, if/else 24 (32 pts), ternaries 11 (23 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 86 points are the body's own statements and 5 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • migrateLegacyComplaintRecord (cognitive 91) android-app/www/standalone.js:7224 — migrateLegacyComplaintRecord has cognitive complexity 91 (threshold 15). Drivers by points: boolean chains 32, if/else 24 (32 pts), ternaries 11 (23 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 86 points are the body's own statements and 5 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.migrateLegacyComplaintRecord (cognitive 89) · ×2
  • standalone.migrateLegacyComplaintRecord (cognitive 89) android-app/android/app/src/main/assets/public/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cognitive complexity 89 (threshold 15). Drivers by points: boolean chains 31, if/else 23 (31 pts), ternaries 11 (23 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 86 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.migrateLegacyComplaintRecord (cognitive 89) docs/standalone.js:7224 — standalone.migrateLegacyComplaintRecord has cognitive complexity 89 (threshold 15). Drivers by points: boolean chains 31, if/else 23 (31 pts), ternaries 11 (23 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 22). Of this number, 86 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openEmailDraft (cognitive 75) · ×2
  • openEmailDraft (cognitive 75) static/standalone.js:10289 — openEmailDraft has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 37, if/else 14 (19 pts), ternaries 8 (11 pts), error handling 3 (4 pts), loops 2 (4 pts) (nesting depth added 11). Of this number, 74 points are the body's own statements and 1 belongs 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.
  • openEmailDraft (cognitive 75) android-app/www/standalone.js:10289 — openEmailDraft has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 37, if/else 14 (19 pts), ternaries 8 (11 pts), error handling 3 (4 pts), loops 2 (4 pts) (nesting depth added 11). Of this number, 74 points are the body's own statements and 1 belongs 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 · standalone.openEmailDraft (cognitive 70) · ×2
  • standalone.openEmailDraft (cognitive 70) android-app/android/app/src/main/assets/public/standalone.js:10289 — standalone.openEmailDraft has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 37, if/else 14 (19 pts), ternaries 5 (7 pts), loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 10). Of this number, 68 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.
  • standalone.openEmailDraft (cognitive 70) docs/standalone.js:10289 — standalone.openEmailDraft has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 37, if/else 14 (19 pts), ternaries 5 (7 pts), loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 10). Of this number, 68 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 · main (cognitive 58) · ×2
  • main (cognitive 58) infra/aws-central/tools/build-india-localities.mjs:118 — main has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 6 (11 pts), boolean chains 10, ternaries 4 (8 pts) (nesting depth added 22). Of this number, 50 points are the body's own statements and 8 belong to 16 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main (cognitive 58) infra/aws-central/tools/ward-tender-experiment.mjs:42 — main has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 10 (17 pts), loops 9 (13 pts), boolean chains 10 (nesting depth added 18). Of this number, 45 points are the body's own statements and 13 belong to 22 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.tenderCoversCarriageway (cognitive 50) · ×2
  • standalone.tenderCoversCarriageway (cognitive 50) android-app/android/app/src/main/assets/public/standalone.js:6421 — standalone.tenderCoversCarriageway has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 18, loops 3 (6 pts) (nesting depth added 15). Of this number, 47 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.
  • standalone.tenderCoversCarriageway (cognitive 50) docs/standalone.js:6421 — standalone.tenderCoversCarriageway has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 18, loops 3 (6 pts) (nesting depth added 15). Of this number, 47 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 · retryCivicRouting (cognitive 49) · ×2
  • retryCivicRouting (cognitive 49) static/standalone.js:11595 — retryCivicRouting has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 21, ternaries 10 (15 pts), if/else 9, error handling 3 (4 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.
  • retryCivicRouting (cognitive 49) android-app/www/standalone.js:11595 — retryCivicRouting has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 21, ternaries 10 (15 pts), if/else 9, error handling 3 (4 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 · openOfficialHandoff (cognitive 42) · ×2
  • openOfficialHandoff (cognitive 42) static/standalone.js:11976 — openOfficialHandoff has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 14, ternaries 4 (6 pts), error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • openOfficialHandoff (cognitive 42) android-app/www/standalone.js:11976 — openOfficialHandoff has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 14, ternaries 4 (6 pts), error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · normaliseTenderMatch (cognitive 41) · ×2
  • normaliseTenderMatch (cognitive 41) static/standalone.js:7510 — normaliseTenderMatch has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 29, ternaries 10, if/else 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.
  • normaliseTenderMatch (cognitive 41) android-app/www/standalone.js:7510 — normaliseTenderMatch has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 29, ternaries 10, if/else 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 · standalone.retryCivicRouting (cognitive 40) · ×2
  • standalone.retryCivicRouting (cognitive 40) android-app/android/app/src/main/assets/public/standalone.js:11595 — standalone.retryCivicRouting has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 20, ternaries 8 (11 pts), if/else 9 (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.
  • standalone.retryCivicRouting (cognitive 40) docs/standalone.js:11595 — standalone.retryCivicRouting has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 20, ternaries 8 (11 pts), if/else 9 (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 · validateMunicipalCityPayload (cognitive 40) · ×2
  • validateMunicipalCityPayload (cognitive 40) static/standalone.js:2157 — validateMunicipalCityPayload has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 17, ternaries 1 (3 pts), loops 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 6 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • validateMunicipalCityPayload (cognitive 40) android-app/www/standalone.js:2157 — validateMunicipalCityPayload has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 17, ternaries 1 (3 pts), loops 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 6 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addReportUnlessDuplicate · ×2
  • addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess (cognitive 39) static/standalone.js:8786 — addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 13, if/else 5 (8 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.
  • addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess (cognitive 39) android-app/www/standalone.js:8786 — addReportUnlessDuplicate::(anonymous)::(anonymous)::scan::onsuccess has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 13, if/else 5 (8 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 · standalone.openOfficialHandoff (cognitive 37) · ×2
  • standalone.openOfficialHandoff (cognitive 37) android-app/android/app/src/main/assets/public/standalone.js:11976 — standalone.openOfficialHandoff has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 15, ternaries 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.
  • standalone.openOfficialHandoff (cognitive 37) docs/standalone.js:11976 — standalone.openOfficialHandoff has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 15, ternaries 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.
D2 · Cognitive Complexity · generatedComplaintOutputs (cognitive 36) · ×2
  • generatedComplaintOutputs (cognitive 36) static/standalone.js:7968 — generatedComplaintOutputs has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 29, ternaries 4 (5 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.
  • generatedComplaintOutputs (cognitive 36) android-app/www/standalone.js:7968 — generatedComplaintOutputs has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 29, ternaries 4 (5 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 · standalone.validateMunicipalCityPayload (cognitive 35) · ×2
  • standalone.validateMunicipalCityPayload (cognitive 35) android-app/android/app/src/main/assets/public/standalone.js:2157 — standalone.validateMunicipalCityPayload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 12, ternaries 1 (3 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.
  • standalone.validateMunicipalCityPayload (cognitive 35) docs/standalone.js:2157 — standalone.validateMunicipalCityPayload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 12, ternaries 1 (3 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 · standalone.normaliseTenderMatch (cognitive 35) · ×2
  • standalone.normaliseTenderMatch (cognitive 35) android-app/android/app/src/main/assets/public/standalone.js:7510 — standalone.normaliseTenderMatch has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 27, ternaries 6, if/else 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.
  • standalone.normaliseTenderMatch (cognitive 35) docs/standalone.js:7510 — standalone.normaliseTenderMatch has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 27, ternaries 6, if/else 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 · standalone.generatedComplaintOutputs (cognitive 34) · ×2
  • standalone.generatedComplaintOutputs (cognitive 34) android-app/android/app/src/main/assets/public/standalone.js:7968 — standalone.generatedComplaintOutputs has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 29, ternaries 3, if/else 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.
  • standalone.generatedComplaintOutputs (cognitive 34) docs/standalone.js:7968 — standalone.generatedComplaintOutputs has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 29, ternaries 3, if/else 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 · analyzeImage (cognitive 33) · ×2
  • analyzeImage (cognitive 33) static/standalone.js:1157 — analyzeImage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • analyzeImage (cognitive 33) android-app/www/standalone.js:1157 — analyzeImage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeRepairEvidence (cognitive 33) · ×2
  • decodeRepairEvidence (cognitive 33) static/standalone.js:11907 — decodeRepairEvidence has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (11 pts), error handling 4 (7 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.
  • decodeRepairEvidence (cognitive 33) android-app/www/standalone.js:11907 — decodeRepairEvidence has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (11 pts), error handling 4 (7 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 · highwayContractCandidates (cognitive 33) · ×2
  • highwayContractCandidates (cognitive 33) static/standalone.js:12657 — highwayContractCandidates has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 12, loops 3, ternaries 1 (2 pts) (nesting depth added 8). Of this number, 27 points are the body's own statements and 6 belong to 10 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • highwayContractCandidates (cognitive 33) android-app/www/standalone.js:12657 — highwayContractCandidates has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 12, loops 3, ternaries 1 (2 pts) (nesting depth added 8). Of this number, 27 points are the body's own statements and 6 belong to 10 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.decodeRepairEvidence (cognitive 32) · ×2
  • standalone.decodeRepairEvidence (cognitive 32) android-app/android/app/src/main/assets/public/standalone.js:11907 — standalone.decodeRepairEvidence has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (11 pts), error handling 4 (7 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.
  • standalone.decodeRepairEvidence (cognitive 32) docs/standalone.js:11907 — standalone.decodeRepairEvidence has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (11 pts), error handling 4 (7 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 · standalone.analyzeImage (cognitive 31) · ×2
  • standalone.analyzeImage (cognitive 31) android-app/android/app/src/main/assets/public/standalone.js:1157 — standalone.analyzeImage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.analyzeImage (cognitive 31) docs/standalone.js:1157 — standalone.analyzeImage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · separateRoadResponsibility (cognitive 31) · ×2
  • separateRoadResponsibility (cognitive 31) static/standalone.js:308 — separateRoadResponsibility has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, ternaries 13, 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.
  • separateRoadResponsibility (cognitive 31) android-app/www/standalone.js:308 — separateRoadResponsibility has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, ternaries 13, 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 · validateHighwayContractPack (cognitive 31) · ×2
  • validateHighwayContractPack (cognitive 31) static/standalone.js:3095 — validateHighwayContractPack has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 25, if/else 3 (5 pts), loops 1 (nesting depth added 2). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • validateHighwayContractPack (cognitive 31) android-app/www/standalone.js:3095 — validateHighwayContractPack has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 25, if/else 3 (5 pts), loops 1 (nesting depth added 2). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · standalone.highwayContractCandidates (cognitive 30) · ×2
  • standalone.highwayContractCandidates (cognitive 30) android-app/android/app/src/main/assets/public/standalone.js:12657 — standalone.highwayContractCandidates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 11, loops 3 (nesting depth added 7). Of this number, 26 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.highwayContractCandidates (cognitive 30) docs/standalone.js:12657 — standalone.highwayContractCandidates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 11, loops 3 (nesting depth added 7). Of this number, 26 points are the body's own statements and 4 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · core.createService · ×2
  • core.createService::dispatch (cognitive 30) infra/aws-central/service/core.mjs:1152 — core.createService::dispatch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (core.createService::authenticate) 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.
  • core.createService::authenticate (cognitive 17) infra/aws-central/service/core.mjs:368 — core.createService::authenticate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (core.createService::dispatch) 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 · signedServicePost (cognitive 30) · ×2
  • signedServicePost (cognitive 30) static/standalone.js:672 — signedServicePost has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11, error handling 3, ternaries 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.
  • signedServicePost (cognitive 30) android-app/www/standalone.js:672 — signedServicePost has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11, error handling 3, ternaries 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 · pruneStoredHistory (cognitive 30) · ×2
  • pruneStoredHistory (cognitive 30) static/standalone.js:8695 — pruneStoredHistory has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (10 pts), loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 15 belong to 8 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.
  • pruneStoredHistory (cognitive 30) android-app/www/standalone.js:8695 — pruneStoredHistory has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (10 pts), loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 15 belong to 8 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 · standalone.signedServicePost (cognitive 29) · ×2
  • standalone.signedServicePost (cognitive 29) android-app/android/app/src/main/assets/public/standalone.js:672 — standalone.signedServicePost has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11, ternaries 2 (3 pts), error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.signedServicePost (cognitive 29) docs/standalone.js:672 — standalone.signedServicePost has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11, ternaries 2 (3 pts), error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyzeViaService (cognitive 29) · ×2
  • analyzeViaService (cognitive 29) static/standalone.js:1092 — analyzeViaService has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 5, error handling 1, loops 1 (nesting depth added 2). Of this number, 27 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.
  • analyzeViaService (cognitive 29) android-app/www/standalone.js:1092 — analyzeViaService has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 5, error handling 1, loops 1 (nesting depth added 2). Of this number, 27 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.
D2 · Cognitive Complexity · roadAgreementCandidates (cognitive 29) · ×2
  • roadAgreementCandidates (cognitive 29) static/standalone.js:12972 — roadAgreementCandidates has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 4 (6 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 11 belong to 13 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.
  • roadAgreementCandidates (cognitive 29) android-app/www/standalone.js:12972 — roadAgreementCandidates has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 4 (6 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 11 belong to 13 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 · standalone.separateRoadResponsibility (cognitive 28) · ×2
  • standalone.separateRoadResponsibility (cognitive 28) android-app/android/app/src/main/assets/public/standalone.js:308 — standalone.separateRoadResponsibility has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, ternaries 13, 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.
  • standalone.separateRoadResponsibility (cognitive 28) docs/standalone.js:308 — standalone.separateRoadResponsibility has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, ternaries 13, 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 · standalone.analyzeViaService (cognitive 27) · ×2
  • standalone.analyzeViaService (cognitive 27) android-app/android/app/src/main/assets/public/standalone.js:1092 — standalone.analyzeViaService has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 3, error handling 1, loops 1 (nesting depth added 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: 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.
  • standalone.analyzeViaService (cognitive 27) docs/standalone.js:1092 — standalone.analyzeViaService has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 3, error handling 1, loops 1 (nesting depth added 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: 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 · validateRoadAgreementPack (cognitive 27) · ×2
  • validateRoadAgreementPack (cognitive 27) static/standalone.js:3599 — validateRoadAgreementPack has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 17, if/else 5 (8 pts), loops 2 (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.
  • validateRoadAgreementPack (cognitive 27) android-app/www/standalone.js:3599 — validateRoadAgreementPack has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 17, if/else 5 (8 pts), loops 2 (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 · tenderFromService (cognitive 25) · ×2
  • tenderFromService (cognitive 25) static/standalone.js:6744 — tenderFromService has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), error handling 2, ternaries 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • tenderFromService (cognitive 25) android-app/www/standalone.js:6744 — tenderFromService has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), error handling 2, ternaries 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · validateHighwayManifest (cognitive 24) · ×2
  • validateHighwayManifest (cognitive 24) static/standalone.js:3865 — validateHighwayManifest has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • validateHighwayManifest (cognitive 24) android-app/www/standalone.js:3865 — validateHighwayManifest has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verifiedContractForComplaint (cognitive 24) · ×2
  • verifiedContractForComplaint (cognitive 24) static/standalone.js:7582 — verifiedContractForComplaint has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 20, if/else 4. Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • verifiedContractForComplaint (cognitive 24) android-app/www/standalone.js:7582 — verifiedContractForComplaint has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 20, if/else 4. Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a 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 · resumePendingDetections (cognitive 24) · ×2
  • resumePendingDetections (cognitive 24) static/standalone.js:9554 — resumePendingDetections has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 9556, 9557, 9565, …). 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.
  • resumePendingDetections (cognitive 24) android-app/www/standalone.js:9554 — resumePendingDetections has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 9556, 9557, 9565, …). 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 · roadNoticeCandidates (cognitive 24) · ×2
  • roadNoticeCandidates (cognitive 24) static/standalone.js:13036 — roadNoticeCandidates has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 7 belong to 10 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.
  • roadNoticeCandidates (cognitive 24) android-app/www/standalone.js:13036 — roadNoticeCandidates has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 7 belong to 10 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 · standalone.validateHighwayManifest (cognitive 23) · ×2
  • standalone.validateHighwayManifest (cognitive 23) android-app/android/app/src/main/assets/public/standalone.js:3865 — standalone.validateHighwayManifest has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateHighwayManifest (cognitive 23) docs/standalone.js:3865 — standalone.validateHighwayManifest has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.tenderFromService (cognitive 22) · ×2
  • standalone.tenderFromService (cognitive 22) android-app/android/app/src/main/assets/public/standalone.js:6744 — standalone.tenderFromService has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 7, error handling 1, ternaries 1. Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.tenderFromService (cognitive 22) docs/standalone.js:6744 — standalone.tenderFromService has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 7, error handling 1, ternaries 1. Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a 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 · standalone.pruneStoredHistory (cognitive 22) · ×2
  • standalone.pruneStoredHistory (cognitive 22) android-app/android/app/src/main/assets/public/standalone.js:8695 — standalone.pruneStoredHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.pruneStoredHistory (cognitive 22) docs/standalone.js:8695 — standalone.pruneStoredHistory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · standalone.roadAgreementCandidates (cognitive 22) · ×2
  • standalone.roadAgreementCandidates (cognitive 22) android-app/android/app/src/main/assets/public/standalone.js:12972 — standalone.roadAgreementCandidates has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 10 belong to 9 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.
  • standalone.roadAgreementCandidates (cognitive 22) docs/standalone.js:12972 — standalone.roadAgreementCandidates has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 10 belong to 9 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 · fetchWithTimeout (cognitive 22) · ×2
  • fetchWithTimeout (cognitive 22) static/standalone.js:509 — fetchWithTimeout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 4 (5 pts), error handling 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • fetchWithTimeout (cognitive 22) android-app/www/standalone.js:509 — fetchWithTimeout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, ternaries 4 (5 pts), error handling 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateRoadNoticePack (cognitive 22) · ×2
  • validateRoadNoticePack (cognitive 22) static/standalone.js:3333 — validateRoadNoticePack has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2 (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.
  • validateRoadNoticePack (cognitive 22) android-app/www/standalone.js:3333 — validateRoadNoticePack has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (6 pts), loops 2 (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 · standalone.fetchWithTimeout (cognitive 21) · ×2
  • standalone.fetchWithTimeout (cognitive 21) android-app/android/app/src/main/assets/public/standalone.js:509 — standalone.fetchWithTimeout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.fetchWithTimeout (cognitive 21) docs/standalone.js:509 — standalone.fetchWithTimeout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.validateRoadAgreementPack (cognitive 21) · ×2
  • standalone.validateRoadAgreementPack (cognitive 21) android-app/android/app/src/main/assets/public/standalone.js:3599 — standalone.validateRoadAgreementPack has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (8 pts), loops 2 (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.
  • standalone.validateRoadAgreementPack (cognitive 21) docs/standalone.js:3599 — standalone.validateRoadAgreementPack has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (8 pts), loops 2 (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 · standalone.roadNoticeCandidates (cognitive 21) · ×2
  • standalone.roadNoticeCandidates (cognitive 21) android-app/android/app/src/main/assets/public/standalone.js:13036 — standalone.roadNoticeCandidates has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (6 pts), loops 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 6 belong to 7 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.
  • standalone.roadNoticeCandidates (cognitive 21) docs/standalone.js:13036 — standalone.roadNoticeCandidates has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (6 pts), loops 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 6 belong to 7 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 · validateStatePackManifest (cognitive 21) · ×2
  • validateStatePackManifest (cognitive 21) static/standalone.js:1949 — validateStatePackManifest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • validateStatePackManifest (cognitive 21) android-app/www/standalone.js:1949 — validateStatePackManifest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a 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 · centralPotholeRequest (cognitive 21) · ×2
  • centralPotholeRequest (cognitive 21) static/standalone.js:9021 — centralPotholeRequest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, ternaries 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.
  • centralPotholeRequest (cognitive 21) android-app/www/standalone.js:9021 — centralPotholeRequest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, ternaries 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 · retryCentralOutbox (cognitive 21) · ×2
  • retryCentralOutbox (cognitive 21) static/standalone.js:9224 — retryCentralOutbox has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 9227, 9259, 9229). 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.
  • retryCentralOutbox (cognitive 21) android-app/www/standalone.js:9224 — retryCentralOutbox has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 9227, 9259, 9229). 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 · routeForIssue (cognitive 20) · ×2
  • routeForIssue (cognitive 20) static/standalone.js:5322 — routeForIssue has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 4 (6 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.
  • routeForIssue (cognitive 20) android-app/www/standalone.js:5322 — routeForIssue has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 4 (6 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.
D2 · Cognitive Complexity · openIdb (cognitive 20) · ×2
  • openIdb (cognitive 20) static/standalone.js:8198 — openIdb has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 4). None of this is in the body itself: all 20 points belong to 7 function items inside it that branch ((anonymous)::onupgradeneeded, (anonymous)::onupgradeneeded::onsuccess, a function literal at line 8199, …). 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.
  • openIdb (cognitive 20) android-app/www/standalone.js:8198 — openIdb has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 4). None of this is in the body itself: all 20 points belong to 7 function items inside it that branch ((anonymous)::onupgradeneeded, (anonymous)::onupgradeneeded::onsuccess, a function literal at line 8199, …). 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 · completeCentralRetry · ×2
  • completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess (cognitive 20) static/standalone.js:9174 — completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), 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.
  • completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess (cognitive 20) android-app/www/standalone.js:9174 — completeCentralRetry::(anonymous)::(anonymous)::onsuccess::onsuccess has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), 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 · matchRoadAgreement (cognitive 20) · ×2
  • matchRoadAgreement (cognitive 20) static/standalone.js:12709 — matchRoadAgreement has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 3, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • matchRoadAgreement (cognitive 20) android-app/www/standalone.js:12709 — matchRoadAgreement has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 3, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · standalone.validateRoadNoticePack (cognitive 19) · ×2
  • standalone.validateRoadNoticePack (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:3333 — standalone.validateRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (6 pts), loops 2 (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.
  • standalone.validateRoadNoticePack (cognitive 19) docs/standalone.js:3333 — standalone.validateRoadNoticePack has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (6 pts), loops 2 (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 · standalone.verifiedContractForComplaint (cognitive 19) · ×2
  • standalone.verifiedContractForComplaint (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:7582 — standalone.verifiedContractForComplaint has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 4. Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.verifiedContractForComplaint (cognitive 19) docs/standalone.js:7582 — standalone.verifiedContractForComplaint has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 4. Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · standalone.centralPotholeRequest (cognitive 19) · ×2
  • standalone.centralPotholeRequest (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:9021 — standalone.centralPotholeRequest has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 6, 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.
  • standalone.centralPotholeRequest (cognitive 19) docs/standalone.js:9021 — standalone.centralPotholeRequest has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 6, 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 · standalone.matchRoadAgreement (cognitive 19) · ×2
  • standalone.matchRoadAgreement (cognitive 19) android-app/android/app/src/main/assets/public/standalone.js:12709 — standalone.matchRoadAgreement has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 3, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.matchRoadAgreement (cognitive 19) docs/standalone.js:12709 — standalone.matchRoadAgreement has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 3, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous) (cognitive 19) · ×2
  • (anonymous) (cognitive 19) static/standalone.js:4 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, error handling 1 (2 pts), 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.
  • (anonymous) (cognitive 19) android-app/www/standalone.js:4 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, error handling 1 (2 pts), 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 · applyRepairObservation · ×2
  • applyRepairObservation::(anonymous)::(anonymous)::onsuccess (cognitive 19) static/standalone.js:11101 — applyRepairObservation::(anonymous)::(anonymous)::onsuccess has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (5 pts), boolean chains 3 (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.
  • applyRepairObservation::(anonymous)::(anonymous)::onsuccess (cognitive 19) android-app/www/standalone.js:11101 — applyRepairObservation::(anonymous)::(anonymous)::onsuccess has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (5 pts), boolean chains 3 (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 · resumePendingRouting (cognitive 19) · ×2
  • resumePendingRouting (cognitive 19) static/standalone.js:11693 — resumePendingRouting has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, error handling 1 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 11695, a function literal at line 11697, a function literal at line 11711, …). 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.
  • resumePendingRouting (cognitive 19) android-app/www/standalone.js:11693 — resumePendingRouting has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, error handling 1 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 11695, a function literal at line 11697, a function literal at line 11711, …). 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 · standalone.validateStatePackManifest (cognitive 18) · ×2
  • standalone.validateStatePackManifest (cognitive 18) android-app/android/app/src/main/assets/public/standalone.js:1949 — standalone.validateStatePackManifest has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • standalone.validateStatePackManifest (cognitive 18) docs/standalone.js:1949 — standalone.validateStatePackManifest has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · standalone.validateHighwayContractPack (cognitive 18) · ×2
  • standalone.validateHighwayContractPack (cognitive 18) android-app/android/app/src/main/assets/public/standalone.js:3095 — standalone.validateHighwayContractPack has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (5 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.
  • standalone.validateHighwayContractPack (cognitive 18) docs/standalone.js:3095 — standalone.validateHighwayContractPack has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (5 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 · standalone.routeForIssue (cognitive 18) · ×2
  • standalone.routeForIssue (cognitive 18) android-app/android/app/src/main/assets/public/standalone.js:5322 — standalone.routeForIssue has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • standalone.routeForIssue (cognitive 18) docs/standalone.js:5322 — standalone.routeForIssue has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · serviceError (cognitive 18) · ×2
  • serviceError (cognitive 18) static/standalone.js:639 — serviceError has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, ternaries 3, 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.
  • serviceError (cognitive 18) android-app/www/standalone.js:639 — serviceError has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, ternaries 3, 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 · wardAnswerFor (cognitive 18) · ×2
  • wardAnswerFor (cognitive 18) static/standalone.js:6892 — wardAnswerFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 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.
  • wardAnswerFor (cognitive 18) android-app/www/standalone.js:6892 — wardAnswerFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 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 · footageSummaries (cognitive 18) · ×2
  • footageSummaries (cognitive 18) static/standalone.js:8615 — footageSummaries has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), boolean chains 5, if/else 2 (4 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.
  • footageSummaries (cognitive 18) android-app/www/standalone.js:8615 — footageSummaries has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), boolean chains 5, if/else 2 (4 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 · standalone.serviceError (cognitive 17) · ×2
  • standalone.serviceError (cognitive 17) android-app/android/app/src/main/assets/public/standalone.js:639 — standalone.serviceError has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • standalone.serviceError (cognitive 17) docs/standalone.js:639 — standalone.serviceError has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · repairTargetMatch (cognitive 17) · ×2
  • repairTargetMatch (cognitive 17) static/standalone.js:6297 — repairTargetMatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 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.
  • repairTargetMatch (cognitive 17) android-app/www/standalone.js:6297 — repairTargetMatch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 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 · standalone.repairTargetMatch (cognitive 16) · ×2
  • standalone.repairTargetMatch (cognitive 16) android-app/android/app/src/main/assets/public/standalone.js:6297 — standalone.repairTargetMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, 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.
  • standalone.repairTargetMatch (cognitive 16) docs/standalone.js:6297 — standalone.repairTargetMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, 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 · loadInstallationIdentity (cognitive 16) · ×2
  • loadInstallationIdentity (cognitive 16) static/standalone.js:578 — loadInstallationIdentity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, error handling 2, ternaries 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.
  • loadInstallationIdentity (cognitive 16) android-app/www/standalone.js:578 — loadInstallationIdentity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, error handling 2, ternaries 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 · matchTender (cognitive 16) · ×2
  • matchTender (cognitive 16) static/standalone.js:6985 — matchTender has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • matchTender (cognitive 16) android-app/www/standalone.js:6985 — matchTender has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · matchRoadNotice (cognitive 16) · ×2
  • matchRoadNotice (cognitive 16) static/standalone.js:12769 — matchRoadNotice has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 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.
  • matchRoadNotice (cognitive 16) android-app/www/standalone.js:12769 — matchRoadNotice has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:372 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:372-387 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:606-625 — 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.
  • Edited copy of a member (16 corresponding lines) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:222 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:222-238 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:240-255 — 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 copies of one member (3 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 4+ corresponding lines) REDACTED:578 — REDACTED:578-581 | eval/run_rad_eval.py:141-146 | REDACTED:309-313 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) tools/build-gepnic-road-notice-packs.py:135 — tools/build-gepnic-road-notice-packs.py:135-138 | tools/build-highway-contract-packs.py:135-138 | tools/build-pmgsy-road-agreement-packs.py:158-164 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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 · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:144 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:144-156 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:330-342 — 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 (13 lines × 2) tools/pull-bihar-road-tenders.py:336 — tools/pull-bihar-road-tenders.py:336-362 | tools/pull-telangana-road-tenders.py:409-421 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-bihar-road-tenders.py:336` 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 (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) eval/private_drive_corpus.py:54 — eval/private_drive_corpus.py:54-58 | eval/private_release_gate.py:44-48 | REDACTED:140-144 | eval/run_rad_eval.py:133-137 | ml/yolo/common.py:100-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
  • Duplicated block (5 lines × 5) tools/pull-bihar-road-tenders.py:511 — tools/pull-bihar-road-tenders.py:511-515 | tools/pull-chhattisgarh-chips-road-tenders.py:333-337 | tools/pull-gujarat-nprocure-road-tenders.py:124-128 | tools/pull-lakshadweep-road-tenders.py:136-140 | tools/pull-pmgsy-road-agreements.py:503-507 — before extracting anything, compare `tools/pull-chhattisgarh-chips-road-tenders.py` and `tools/pull-gujarat-nprocure-road-tenders.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) tools/pull-bihar-road-tenders.py:519 — tools/pull-bihar-road-tenders.py:519-539 | tools/pull-telangana-road-tenders.py:523-545 — 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.
  • Edited copy of a member (18 corresponding lines) tools/prune-catalog-packs.py:177 — tools/prune-catalog-packs.py:177-198 | tools/prune-catalog-packs.py:353-370 — 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 (2 corresponding lines) · ×2
  • Edited copy of a member (2 corresponding lines) tools/build-delhi-coverage.py:145 — tools/build-delhi-coverage.py:145-146 | tools/build-metro-coverage.py:152-156 — 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.
  • Edited copy of a member (2 corresponding lines) tools/pull-chhattisgarh-chips-road-tenders.py:88 — tools/pull-chhattisgarh-chips-road-tenders.py:88-89 | tools/pull-lakshadweep-road-tenders.py:69-70 — 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 · Edited copies of one member (8 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (8 members, 4+ corresponding lines) tools/build-andhra-pradesh-coverage.py:73 — tools/build-andhra-pradesh-coverage.py:73-76 | tools/build-maharashtra-coverage.py:31-34 | tools/build-punjab-coverage.py:69-72 | tools/build-tamil-nadu-coverage.py:81-84 | tools/build-telangana-coverage.py:74-77 | tools/build-top50-coverage.py:207-210 | tools/build-west-bengal-coverage.py:34-37 | tools/statewide_boundary_builder.py:53-56 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 4 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 8 times and the copies will drift further apart.
  • Edited copies of one member (8 members, 4+ corresponding lines) tools/pull-bihar-road-tenders.py:98 — tools/pull-bihar-road-tenders.py:98-101 | tools/pull-chhattisgarh-chips-road-tenders.py:81-84 | tools/pull-emarg-road-contracts.py:83-86 | tools/pull-gujarat-nprocure-road-tenders.py:92-95 | tools/pull-kppp.py:82-85 | tools/pull-lakshadweep-road-tenders.py:62-65 | tools/pull-pmgsy-road-agreements.py:143-146 | tools/pull-telangana-road-tenders.py:86-89 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 4 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) tools/pull-bihar-road-tenders.py:530 — tools/pull-bihar-road-tenders.py:530-535 | tools/pull-chhattisgarh-chips-road-tenders.py:447-452 | tools/pull-gujarat-nprocure-road-tenders.py:318-323 | tools/pull-lakshadweep-road-tenders.py:231-236 — before extracting anything, compare `tools/pull-chhattisgarh-chips-road-tenders.py` and `tools/pull-gujarat-nprocure-road-tenders.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-bihar-road-tenders.py:530` 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 (6 lines × 4) tools/build-andhra-pradesh-coverage.py:173 — tools/build-andhra-pradesh-coverage.py:173-178 | tools/build-punjab-coverage.py:168-173 | tools/build-tamil-nadu-coverage.py:181-186 | tools/build-telangana-coverage.py:174-179 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
R10 · Code Duplication · Duplicated block (182 lines × 2 locations) · ×2
  • Duplicated block (182 lines × 2 locations) android-app/www/standalone.js:70 — android-app/www/standalone.js:70 · static/standalone.js:70 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (182 lines × 2 locations) android-app/www/standalone.js:11346 — android-app/www/standalone.js:11346 · static/standalone.js:11346 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (176 lines × 2 locations) · ×2
  • Duplicated block (176 lines × 2 locations) android-app/www/standalone.js:2709 — android-app/www/standalone.js:2709 · static/standalone.js:2709 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (176 lines × 2 locations) android-app/www/standalone.js:3809 — android-app/www/standalone.js:3809 · static/standalone.js:3809 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (171 lines × 2 locations) · ×2
  • Duplicated block (171 lines × 2 locations) android-app/www/standalone.js:7800 — android-app/www/standalone.js:7800 · static/standalone.js:7800 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (171 lines × 2 locations) android-app/www/standalone.js:12982 — android-app/www/standalone.js:12982 · static/standalone.js:12982 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:test-cross-package-internals] infra/aws-central/test/tender-scope.test.mjs:6 — infra/aws-central/test/tender-scope.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../../tools/harness/release-verdict.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:relative-cross-package] ml/detector/lambda/handler.mjs:11 — ml/detector/lambda/handler.mjs:11 reaches into another package with a relative path (./service.mjs) — import the package by name instead.
R2 · Cyclomatic Complexity · Complex function createReport (cyclomatic 298, cognitive 337) · ×2
  • Complex function createReport (cyclomatic 298, cognitive 337) android-app/www/standalone.js:9590 — createReport has cyclomatic complexity 298 and cognitive complexity 337; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function createReport (cyclomatic 298, cognitive 337) static/standalone.js:9590 — createReport has cyclomatic complexity 298 and cognitive complexity 337; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 importNativeReport (cyclomatic 221, cognitive 208) · ×2
  • Complex function importNativeReport (cyclomatic 221, cognitive 208) android-app/www/standalone.js:11171 — importNativeReport has cyclomatic complexity 221 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function importNativeReport (cyclomatic 221, cognitive 208) static/standalone.js:11171 — importNativeReport has cyclomatic complexity 221 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handle (cyclomatic 164, cognitive 207) · ×2
  • Complex function handle (cyclomatic 164, cognitive 207) android-app/www/standalone.js:10636 — handle has cyclomatic complexity 164 and cognitive complexity 207; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function handle (cyclomatic 164, cognitive 207) static/standalone.js:10636 — handle has cyclomatic complexity 164 and cognitive complexity 207; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function prepareComplaint (cyclomatic 137, cognitive 142) · ×2
  • Complex function prepareComplaint (cyclomatic 137, cognitive 142) android-app/www/standalone.js:10132 — prepareComplaint has cyclomatic complexity 137 and cognitive complexity 142; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function prepareComplaint (cyclomatic 137, cognitive 142) static/standalone.js:10132 — prepareComplaint has cyclomatic complexity 137 and cognitive complexity 142; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 validateRoutingPack (cyclomatic 129, cognitive 98) · ×2
  • Complex function validateRoutingPack (cyclomatic 129, cognitive 98) android-app/www/standalone.js:2556 — validateRoutingPack has cyclomatic complexity 129 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateRoutingPack (cyclomatic 129, cognitive 98) static/standalone.js:2556 — validateRoutingPack has cyclomatic complexity 129 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function currentOfficialRouteBinding (cyclomatic 126, cognitive 111) · ×2
  • Complex function currentOfficialRouteBinding (cyclomatic 126, cognitive 111) android-app/www/standalone.js:12534 — currentOfficialRouteBinding has cyclomatic complexity 126 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function currentOfficialRouteBinding (cyclomatic 126, cognitive 111) static/standalone.js:12534 — currentOfficialRouteBinding has cyclomatic complexity 126 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 savedOfficialRouteBinding (cyclomatic 122, cognitive 86) · ×2
  • Complex function savedOfficialRouteBinding (cyclomatic 122, cognitive 86) android-app/www/standalone.js:12333 — savedOfficialRouteBinding has cyclomatic complexity 122 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function savedOfficialRouteBinding (cyclomatic 122, cognitive 86) static/standalone.js:12333 — savedOfficialRouteBinding has cyclomatic complexity 122 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 routeOfficer (cyclomatic 116, cognitive 167) · ×2
  • Complex function routeOfficer (cyclomatic 116, cognitive 167) android-app/www/standalone.js:5689 — routeOfficer has cyclomatic complexity 116 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function routeOfficer (cyclomatic 116, cognitive 167) static/standalone.js:5689 — routeOfficer has cyclomatic complexity 116 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function savedNonMunicipalLocationMatches (cyclomatic 85, cognitive 75) · ×2
  • Complex function savedNonMunicipalLocationMatches (cyclomatic 85, cognitive 75) android-app/www/standalone.js:12856 — savedNonMunicipalLocationMatches has cyclomatic complexity 85 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function savedNonMunicipalLocationMatches (cyclomatic 85, cognitive 75) static/standalone.js:12856 — savedNonMunicipalLocationMatches has cyclomatic complexity 85 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 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 validateRoadAgreementPack (cyclomatic 81, cognitive 27) · ×2
  • Complex function validateRoadAgreementPack (cyclomatic 81, cognitive 27) android-app/www/standalone.js:3599 — validateRoadAgreementPack has cyclomatic complexity 81 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateRoadAgreementPack (cyclomatic 81, cognitive 27) static/standalone.js:3599 — validateRoadAgreementPack has cyclomatic complexity 81 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 createCivicReport (cyclomatic 80, cognitive 78) · ×2
  • Complex function createCivicReport (cyclomatic 80, cognitive 78) android-app/www/standalone.js:11463 — createCivicReport has cyclomatic complexity 80 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function createCivicReport (cyclomatic 80, cognitive 78) static/standalone.js:11463 — createCivicReport has cyclomatic complexity 80 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function openEmailDraft (cyclomatic 75, cognitive 74) · ×2
  • Complex function openEmailDraft (cyclomatic 75, cognitive 74) android-app/www/standalone.js:10289 — openEmailDraft has cyclomatic complexity 75 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function openEmailDraft (cyclomatic 75, cognitive 74) static/standalone.js:10289 — openEmailDraft has cyclomatic complexity 75 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 installRoutingAuthorities (cyclomatic 74, cognitive 96) · ×2
  • Complex function installRoutingAuthorities (cyclomatic 74, cognitive 96) android-app/www/standalone.js:1442 — installRoutingAuthorities has cyclomatic complexity 74 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function installRoutingAuthorities (cyclomatic 74, cognitive 96) static/standalone.js:1442 — installRoutingAuthorities has cyclomatic complexity 74 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateHighwayManifest (cyclomatic 70, cognitive 24) · ×2
  • Complex function validateHighwayManifest (cyclomatic 70, cognitive 24) android-app/www/standalone.js:3865 — validateHighwayManifest has cyclomatic complexity 70 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateHighwayManifest (cyclomatic 70, cognitive 24) static/standalone.js:3865 — validateHighwayManifest has cyclomatic complexity 70 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 validateMunicipalCityPayload (cyclomatic 67, cognitive 34) · ×2
  • Complex function validateMunicipalCityPayload (cyclomatic 67, cognitive 34) android-app/www/standalone.js:2157 — validateMunicipalCityPayload has cyclomatic complexity 67 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateMunicipalCityPayload (cyclomatic 67, cognitive 34) static/standalone.js:2157 — validateMunicipalCityPayload has cyclomatic complexity 67 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 migrateLegacyComplaintRecord (cyclomatic 66, cognitive 86) · ×2
  • Complex function migrateLegacyComplaintRecord (cyclomatic 66, cognitive 86) android-app/www/standalone.js:7224 — migrateLegacyComplaintRecord has cyclomatic complexity 66 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function migrateLegacyComplaintRecord (cyclomatic 66, cognitive 86) static/standalone.js:7224 — migrateLegacyComplaintRecord has cyclomatic complexity 66 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 validateRoadNoticePack (cyclomatic 64, cognitive 22) · ×2
  • Complex function validateRoadNoticePack (cyclomatic 64, cognitive 22) android-app/www/standalone.js:3333 — validateRoadNoticePack has cyclomatic complexity 64 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateRoadNoticePack (cyclomatic 64, cognitive 22) static/standalone.js:3333 — validateRoadNoticePack has cyclomatic complexity 64 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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 validateRoadAgreementManifest (cyclomatic 63, cognitive 14) · ×2
  • Complex function validateRoadAgreementManifest (cyclomatic 63, cognitive 14) android-app/www/standalone.js:3520 — validateRoadAgreementManifest has cyclomatic complexity 63 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function validateRoadAgreementManifest (cyclomatic 63, cognitive 14) static/standalone.js:3520 — validateRoadAgreementManifest has cyclomatic complexity 63 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×2
  • Recursive walk over a caller-supplied document has no depth cap eval/exhaustive_video_eval.py:106 — `reject_private_locator_strings` is public and takes `value: Any` from its caller, and it calls itself at line 106 (`reject_private_locator_strings`) with a piece of `value` (and at line 110) — and nowhere in `reject_private_locator_strings` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reject_private_locator_strings` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap eval/private_drive_corpus.py:88 — `reject_absolute_paths` is public and takes `value: Any` from its caller, and it calls itself at line 88 (`reject_absolute_paths`) with a piece of `value` (and at line 91) — and nowhere in `reject_absolute_paths` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reject_absolute_paths` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X2 · Cancellation propagation · Suspend function with a blocking request · ×2
  • Suspend function with a blocking request: doWork android-app/android/app/src/main/java/com/gauravsen/potholereporter/messages/MessageWorker.kt:41 — `doWork` suspends, but makes its request with `URL(…).openConnection()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
  • Suspend function with a blocking request: detect android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DetectionDispatcher.kt:165 — `detect` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) tools/harness/webview-drive-analyse.py:118 — `except 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) static/standalone.js:972 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
D1 · Cyclomatic Complexity · createAddressModel (cyclomatic 116) · ×1
  • createAddressModel (cyclomatic 116) infra/aws-central/tools/build-street-index.mjs:776 — createAddressModel has cyclomatic complexity 116 (threshold 15). Of this number, 107 points are the body's own statements and 9 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · render (cyclomatic 108) · ×1
  • render (cyclomatic 108) infra/aws-central/tools/india-ward-coverage-report.mjs:162 — render has cyclomatic complexity 108 (threshold 15). Of this number, 46 points are the body's own statements and 62 belong to 123 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 · DriveModePlugin.reconcileNativeState (cyclomatic 85) · ×1
  • DriveModePlugin.reconcileNativeState (cyclomatic 85) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1641 — DriveModePlugin.reconcileNativeState has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · exhaustive_video_eval.validate_label_manifest (cyclomatic 85) · ×1
  • exhaustive_video_eval.validate_label_manifest (cyclomatic 85) eval/exhaustive_video_eval.py:271 — exhaustive_video_eval.validate_label_manifest has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · private_drive_corpus._validate_manifest_for_receipt (cyclomatic 81) · ×1
  • private_drive_corpus._validate_manifest_for_receipt (cyclomatic 81) eval/private_drive_corpus.py:136 — private_drive_corpus._validate_manifest_for_receipt has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build-street-index.buildRegion (cyclomatic 75) · ×1
  • build-street-index.buildRegion (cyclomatic 75) infra/aws-central/tools/build-street-index.mjs:1155 — build-street-index.buildRegion has cyclomatic complexity 75 (threshold 15). Of this number, 68 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · common.validate_prepared_dataset (cyclomatic 74) · ×1
  • common.validate_prepared_dataset (cyclomatic 74) ml/yolo/common.py:275 — common.validate_prepared_dataset has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geolocation.createGeolocator.resolve (cyclomatic 71) · ×1
  • geolocation.createGeolocator.resolve (cyclomatic 71) infra/aws-central/service/geolocation.mjs:410 — geolocation.createGeolocator.resolve has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createGeolocator.resolve (cyclomatic 71) · ×1
  • createGeolocator.resolve (cyclomatic 71) infra/aws-central/service/geolocation.mjs:410 — createGeolocator.resolve has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wardMarkersIn (cyclomatic 69) · ×1
  • wardMarkersIn (cyclomatic 69) infra/aws-central/service/india-ward-tenders.mjs:95 — wardMarkersIn has cyclomatic complexity 69 (threshold 15). Of this number, 63 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DriveForegroundService.stopDriveSession (cyclomatic 63) · ×1
  • DriveForegroundService.stopDriveSession (cyclomatic 63) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2118 — DriveForegroundService.stopDriveSession has cyclomatic complexity 63 (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.resolveJurisdiction (cyclomatic 61) · ×1
  • index.resolveJurisdiction (cyclomatic 61) server/src/index.js:2739 — index.resolveJurisdiction has cyclomatic complexity 61 (threshold 15). Of this number, 60 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 · ward-tenders.matchWardTenders (cyclomatic 58) · ×1
  • ward-tenders.matchWardTenders (cyclomatic 58) infra/aws-central/service/ward-tenders.mjs:579 — ward-tenders.matchWardTenders has cyclomatic complexity 58 (threshold 15). Of this number, 18 points are the body's own statements and 40 belong to 11 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 · run_prepared_eval.load_event (cyclomatic 56) · ×1
  • run_prepared_eval.load_event (cyclomatic 56) eval/run_prepared_eval.py:45 — run_prepared_eval.load_event has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · judgeWindow (cyclomatic 54) · ×1
  • judgeWindow (cyclomatic 54) infra/aws-central/service/health/window.mjs:42 — judgeWindow has cyclomatic complexity 54 (threshold 15). Of this number, 44 points are the body's own statements and 10 belong to 15 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 · UploadWorker.doWork (cyclomatic 53) · ×1
  • UploadWorker.doWork (cyclomatic 53) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:150 — UploadWorker.doWork 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 · build-street-index.createAddressModel.rowsOf (cyclomatic 52) · ×1
  • build-street-index.createAddressModel.rowsOf (cyclomatic 52) infra/aws-central/tools/build-street-index.mjs:930 — build-street-index.createAddressModel.rowsOf has cyclomatic complexity 52 (threshold 15). Of this number, 44 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createAddressModel.rowsOf (cyclomatic 52) · ×1
  • createAddressModel.rowsOf (cyclomatic 52) infra/aws-central/tools/build-street-index.mjs:930 — createAddressModel.rowsOf has cyclomatic complexity 52 (threshold 15). Of this number, 44 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_rad_eval._index_to_manifest (cyclomatic 50) · ×1
  • run_rad_eval._index_to_manifest (cyclomatic 50) eval/run_rad_eval.py:347 — run_rad_eval._index_to_manifest has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · release.build_model_manifest (cyclomatic 50) · ×1
  • release.build_model_manifest (cyclomatic 50) ml/yolo/release.py:150 — release.build_model_manifest 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 · ward-tenders.titleNameKeys (cyclomatic 49) · ×1
  • ward-tenders.titleNameKeys (cyclomatic 49) infra/aws-central/service/ward-tenders.mjs:239 — ward-tenders.titleNameKeys has cyclomatic complexity 49 (threshold 15). Of this number, 45 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · notice-bodies.urbanBodyOf (cyclomatic 46) · ×1
  • notice-bodies.urbanBodyOf (cyclomatic 46) infra/aws-central/service/notice-bodies.mjs:74 — notice-bodies.urbanBodyOf 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 · run_tender_eval.main (cyclomatic 44) · ×1
  • run_tender_eval.main (cyclomatic 44) REDACTED:316 — run_tender_eval.main 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 · prepare_dataset.collect_rad (cyclomatic 44) · ×1
  • prepare_dataset.collect_rad (cyclomatic 44) ml/yolo/prepare_dataset.py:546 — prepare_dataset.collect_rad 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 · canary.runCanary (cyclomatic 43) · ×1
  • canary.runCanary (cyclomatic 43) infra/aws-central/service/health/canary.mjs:23 — canary.runCanary has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ward-tender-experiment.main (cyclomatic 43) · ×1
  • ward-tender-experiment.main (cyclomatic 43) infra/aws-central/tools/ward-tender-experiment.mjs:42 — ward-tender-experiment.main has cyclomatic complexity 43 (threshold 15). Of this number, 34 points are the body's own statements and 9 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 · NotificationHelper.buildNotification (cyclomatic 43) · ×1
  • NotificationHelper.buildNotification (cyclomatic 43) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt:66 — NotificationHelper.buildNotification has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · private_release_gate.validate_manifest (cyclomatic 42) · ×1
  • private_release_gate.validate_manifest (cyclomatic 42) eval/private_release_gate.py:59 — private_release_gate.validate_manifest 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 · tender-scope.tenderCoversCarriageway (cyclomatic 39) · ×1
  • tender-scope.tenderCoversCarriageway (cyclomatic 39) infra/aws-central/service/tender-scope.mjs:70 — tender-scope.tenderCoversCarriageway has cyclomatic complexity 39 (threshold 15). Of this number, 36 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 · ward-tenders.wardMarkers (cyclomatic 39) · ×1
  • ward-tenders.wardMarkers (cyclomatic 39) infra/aws-central/service/ward-tenders.mjs:308 — ward-tenders.wardMarkers has cyclomatic complexity 39 (threshold 15). Of this number, 25 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · exhaustive_video_eval.run_paid (cyclomatic 39) · ×1
  • exhaustive_video_eval.run_paid (cyclomatic 39) eval/exhaustive_video_eval.py:1335 — exhaustive_video_eval.run_paid 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 · tenders.matchTender (cyclomatic 38) · ×1
  • tenders.matchTender (cyclomatic 38) REDACTED:45 — tenders.matchTender has cyclomatic complexity 38 (threshold 15). Of this number, 35 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · india-ward-coverage.measureSnapshot (cyclomatic 38) · ×1
  • india-ward-coverage.measureSnapshot (cyclomatic 38) infra/aws-central/tools/india-ward-coverage.mjs:149 — india-ward-coverage.measureSnapshot has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_rad_eval.validate_manifest (cyclomatic 38) · ×1
  • run_rad_eval.validate_manifest (cyclomatic 38) eval/run_rad_eval.py:250 — run_rad_eval.validate_manifest 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 · NativeDeduplicationEngine.matchRoadEvent (cyclomatic 37) · ×1
  • NativeDeduplicationEngine.matchRoadEvent (cyclomatic 37) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:259 — NativeDeduplicationEngine.matchRoadEvent has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · local-address.search (cyclomatic 36) · ×1
  • local-address.search (cyclomatic 36) infra/aws-central/service/local-address.mjs:267 — local-address.search has cyclomatic complexity 36 (threshold 15). Of this number, 22 points are the body's own statements and 14 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build-india-localities.main (cyclomatic 36) · ×1
  • build-india-localities.main (cyclomatic 36) infra/aws-central/tools/build-india-localities.mjs:118 — build-india-localities.main has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.reportCandidate (cyclomatic 36) · ×1
  • index.reportCandidate (cyclomatic 36) server/src/index.js:2353 — index.reportCandidate 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 · local-address.indexStreets (cyclomatic 35) · ×1
  • local-address.indexStreets (cyclomatic 35) infra/aws-central/service/local-address.mjs:131 — local-address.indexStreets has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-local-address.compare (cyclomatic 34) · ×1
  • verify-local-address.compare (cyclomatic 34) infra/aws-central/tools/verify-local-address.mjs:212 — verify-local-address.compare has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_eval.main (cyclomatic 34) · ×1
  • run_eval.main (cyclomatic 34) REDACTED:599 — run_eval.main 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 · detector.load_and_validate_manifest (cyclomatic 34) · ×1
  • detector.load_and_validate_manifest (cyclomatic 34) infra/aws-yolo/service/detector.py:111 — detector.load_and_validate_manifest 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 · exhaustive_video_eval.validate_materialized (cyclomatic 32) · ×1
  • exhaustive_video_eval.validate_materialized (cyclomatic 32) eval/exhaustive_video_eval.py:1015 — exhaustive_video_eval.validate_materialized 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 · verify-local-address.tenders (cyclomatic 31) · ×1
  • verify-local-address.tenders (cyclomatic 31) infra/aws-central/tools/verify-local-address.mjs:276 — verify-local-address.tenders has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (verify-local-address.tenders::outcome) 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 · buildSnapshot (cyclomatic 31) · ×1
  • buildSnapshot (cyclomatic 31) infra/aws-central/tools/snapshot-india-wards.mjs:911 — buildSnapshot has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 belong to 15 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.tenderShortlist (cyclomatic 30) · ×1
  • index.tenderShortlist (cyclomatic 30) server/src/index.js:2986 — index.tenderShortlist has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run.tasks (cyclomatic 30) · ×1
  • run.tasks (cyclomatic 30) tools/harness/run.mjs:130 — run.tasks 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 · DriveForegroundService.refreshCaptureInterlock (cyclomatic 30) · ×1
  • DriveForegroundService.refreshCaptureInterlock (cyclomatic 30) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1385 — DriveForegroundService.refreshCaptureInterlock 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 · exhaustive_video_eval.main (cyclomatic 30) · ×1
  • exhaustive_video_eval.main (cyclomatic 30) eval/exhaustive_video_eval.py:2126 — exhaustive_video_eval.main 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 · kgis-layers.downloadLayer (cyclomatic 29) · ×1
  • kgis-layers.downloadLayer (cyclomatic 29) infra/aws-central/tools/kgis-layers.mjs:100 — kgis-layers.downloadLayer 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 · exhaustive_video_eval._validate_source_manifest_for_receipt (cyclomatic 29) · ×1
  • exhaustive_video_eval._validate_source_manifest_for_receipt (cyclomatic 29) eval/exhaustive_video_eval.py:142 — exhaustive_video_eval._validate_source_manifest_for_receipt 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 · ownership-bundle-writer.createOwnershipWriter.addPolygon (cyclomatic 28) · ×1
  • ownership-bundle-writer.createOwnershipWriter.addPolygon (cyclomatic 28) infra/aws-central/tools/ownership-bundle-writer.mjs:134 — ownership-bundle-writer.createOwnershipWriter.addPolygon has cyclomatic complexity 28 (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 · createOwnershipWriter.addPolygon (cyclomatic 28) · ×1
  • createOwnershipWriter.addPolygon (cyclomatic 28) infra/aws-central/tools/ownership-bundle-writer.mjs:134 — createOwnershipWriter.addPolygon has cyclomatic complexity 28 (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 · index.callOpenAI (cyclomatic 27) · ×1
  • index.callOpenAI (cyclomatic 27) server/src/index.js:1324 — index.callOpenAI 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 · DriveModeService.driveTick (cyclomatic 27) · ×1
  • DriveModeService.driveTick (cyclomatic 27) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:560 — DriveModeService.driveTick 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 · prepare.main (cyclomatic 27) · ×1
  • prepare.main (cyclomatic 27) REDACTED:479 — prepare.main 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 · createDetector.yolo (cyclomatic 27) · ×1
  • createDetector.yolo (cyclomatic 27) infra/aws-central/service/detectors.mjs:391 — createDetector.yolo 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 · detectors.createDetector.yolo (cyclomatic 26) · ×1
  • detectors.createDetector.yolo (cyclomatic 26) infra/aws-central/service/detectors.mjs:391 — detectors.createDetector.yolo 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 · local-ownership.polygonsAt (cyclomatic 26) · ×1
  • local-ownership.polygonsAt (cyclomatic 26) infra/aws-central/service/local-ownership.mjs:115 — local-ownership.polygonsAt 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 · build-street-index.placeFromFeature (cyclomatic 26) · ×1
  • build-street-index.placeFromFeature (cyclomatic 26) infra/aws-central/tools/build-street-index.mjs:220 — build-street-index.placeFromFeature 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 · DriveForegroundService.consumeInferenceJobs (cyclomatic 26) · ×1
  • DriveForegroundService.consumeInferenceJobs (cyclomatic 26) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1672 — DriveForegroundService.consumeInferenceJobs 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 · prepare_dataset.collect_owned (cyclomatic 26) · ×1
  • prepare_dataset.collect_owned (cyclomatic 26) ml/yolo/prepare_dataset.py:388 — prepare_dataset.collect_owned 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 · release.command_release (cyclomatic 26) · ×1
  • release.command_release (cyclomatic 26) ml/yolo/release.py:432 — release.command_release 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 · build-street-index.encodeTile (cyclomatic 25) · ×1
  • build-street-index.encodeTile (cyclomatic 25) infra/aws-central/tools/build-street-index.mjs:1086 — build-street-index.encodeTile has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build-street-index.averagePostcodes (cyclomatic 25) · ×1
  • build-street-index.averagePostcodes (cyclomatic 25) infra/aws-central/tools/build-street-index.mjs:1402 — build-street-index.averagePostcodes has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-local-address.read (cyclomatic 25) · ×1
  • verify-local-address.read (cyclomatic 25) infra/aws-central/tools/verify-local-address.mjs:179 — verify-local-address.read has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · service.parseRequest (cyclomatic 25) · ×1
  • service.parseRequest (cyclomatic 25) ml/classifier/lambda/service.mjs:121 — service.parseRequest 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 · DuplicateDetector.roadEventMatch (cyclomatic 25) · ×1
  • DuplicateDetector.roadEventMatch (cyclomatic 25) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DuplicateDetector.kt:131 — DuplicateDetector.roadEventMatch 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 · rad_dataset.build_index (cyclomatic 25) · ×1
  • rad_dataset.build_index (cyclomatic 25) REDACTED:669 — rad_dataset.build_index 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 · webview-drive-analyse.main (cyclomatic 25) · ×1
  • webview-drive-analyse.main (cyclomatic 25) tools/harness/webview-drive-analyse.py:237 — webview-drive-analyse.main 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 · local-address.createLocalAddress.answer (cyclomatic 24) · ×1
  • local-address.createLocalAddress.answer (cyclomatic 24) infra/aws-central/service/local-address.mjs:420 — local-address.createLocalAddress.answer 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 · Area.pointOnSurface (cyclomatic 24) · ×1
  • Area.pointOnSurface (cyclomatic 24) infra/aws-central/tools/build-street-index.mjs:514 — Area.pointOnSurface 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 · verify-local-ownership.exactMetresToHighways (cyclomatic 24) · ×1
  • verify-local-ownership.exactMetresToHighways (cyclomatic 24) infra/aws-central/tools/verify-local-ownership.mjs:319 — verify-local-ownership.exactMetresToHighways 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 · ward-tender-vocabulary.main (cyclomatic 24) · ×1
  • ward-tender-vocabulary.main (cyclomatic 24) infra/aws-central/tools/ward-tender-vocabulary.mjs:47 — ward-tender-vocabulary.main 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, 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 · index.handleImpact (cyclomatic 24) · ×1
  • index.handleImpact (cyclomatic 24) server/src/index.js:3582 — index.handleImpact has cyclomatic complexity 24 (threshold 15). 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, name the conditions: bind each compound test to a 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 · run_rad_eval.main (cyclomatic 24) · ×1
  • run_rad_eval.main (cyclomatic 24) eval/run_rad_eval.py:1225 — run_rad_eval.main 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 · handler.parse_request (cyclomatic 24) · ×1
  • handler.parse_request (cyclomatic 24) infra/aws-yolo/service/handler.py:422 — handler.parse_request 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 · parity.compare_prediction_sets (cyclomatic 24) · ×1
  • parity.compare_prediction_sets (cyclomatic 24) ml/yolo/parity.py:182 — parity.compare_prediction_sets 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 · createDetector.openai (cyclomatic 24) · ×1
  • createDetector.openai (cyclomatic 24) infra/aws-central/service/detectors.mjs:270 — createDetector.openai 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 · createLocalAddress.answer (cyclomatic 24) · ×1
  • createLocalAddress.answer (cyclomatic 24) infra/aws-central/service/local-address.mjs:420 — createLocalAddress.answer 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 · detectors.createDetector.openai (cyclomatic 23) · ×1
  • detectors.createDetector.openai (cyclomatic 23) infra/aws-central/service/detectors.mjs:270 — detectors.createDetector.openai 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.recordMetrics (cyclomatic 23) · ×1
  • index.recordMetrics (cyclomatic 23) server/src/index.js:996 — index.recordMetrics 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 · index.verifySharedDetectionReceipt (cyclomatic 23) · ×1
  • index.verifySharedDetectionReceipt (cyclomatic 23) server/src/index.js:1904 — index.verifySharedDetectionReceipt 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.dispatch (cyclomatic 23) · ×1
  • index.dispatch (cyclomatic 23) server/src/index.js:3788 — index.dispatch 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 · DriveForegroundService.startScanLoop (cyclomatic 23) · ×1
  • DriveForegroundService.startScanLoop (cyclomatic 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:863 — DriveForegroundService.startScanLoop 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 · DriveForegroundService.scheduleCriticalCameraRecovery (cyclomatic 23) · ×1
  • DriveForegroundService.scheduleCriticalCameraRecovery (cyclomatic 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1169 — DriveForegroundService.scheduleCriticalCameraRecovery 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 · NativeRepairCandidateMatcher.selectCandidate (cyclomatic 23) · ×1
  • NativeRepairCandidateMatcher.selectCandidate (cyclomatic 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRepairStatusEngine.kt:57 — NativeRepairCandidateMatcher.selectCandidate 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 · NativeBridgeJpeg.isPlausibleJpeg (cyclomatic 23) · ×1
  • NativeBridgeJpeg.isPlausibleJpeg (cyclomatic 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/NativeBridgeJpeg.kt:34 — NativeBridgeJpeg.isPlausibleJpeg 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 · run_rad_eval.validate_result_rows (cyclomatic 23) · ×1
  • run_rad_eval.validate_result_rows (cyclomatic 23) eval/run_rad_eval.py:894 — run_rad_eval.validate_result_rows 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 · detector.validate_release_bundle (cyclomatic 23) · ×1
  • detector.validate_release_bundle (cyclomatic 23) infra/aws-yolo/service/detector.py:254 — detector.validate_release_bundle 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 · evaluate.evaluate (cyclomatic 23) · ×1
  • evaluate.evaluate (cyclomatic 23) ml/detector/evaluate.py:189 — evaluate.evaluate 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 · evaluate._score_operating_point (cyclomatic 23) · ×1
  • evaluate._score_operating_point (cyclomatic 23) ml/yolo/evaluate.py:140 — evaluate._score_operating_point 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 · build-street-index.prepare (cyclomatic 22) · ×1
  • build-street-index.prepare (cyclomatic 22) infra/aws-central/tools/build-street-index.mjs:1463 — build-street-index.prepare 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 · verify-local-address.sample (cyclomatic 22) · ×1
  • verify-local-address.sample (cyclomatic 22) infra/aws-central/tools/verify-local-address.mjs:111 — verify-local-address.sample has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DriveForegroundService.startDriveSession (cyclomatic 22) · ×1
  • DriveForegroundService.startDriveSession (cyclomatic 22) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:480 — DriveForegroundService.startDriveSession 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 · NativeDriveCameraManager.finalizeVideoSegment (cyclomatic 22) · ×1
  • NativeDriveCameraManager.finalizeVideoSegment (cyclomatic 22) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:927 — NativeDriveCameraManager.finalizeVideoSegment 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 · rad_dataset.list_remote_inventory (cyclomatic 22) · ×1
  • rad_dataset.list_remote_inventory (cyclomatic 22) REDACTED:298 — rad_dataset.list_remote_inventory 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 · run_eval.native_decision (cyclomatic 22) · ×1
  • run_eval.native_decision (cyclomatic 22) REDACTED:312 — run_eval.native_decision 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 · india-ward-tenders.matchIndiaWardTenders (cyclomatic 21) · ×1
  • india-ward-tenders.matchIndiaWardTenders (cyclomatic 21) infra/aws-central/service/india-ward-tenders.mjs:262 — india-ward-tenders.matchIndiaWardTenders has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeDriveCameraManager.processImageProxy (cyclomatic 21) · ×1
  • NativeDriveCameraManager.processImageProxy (cyclomatic 21) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:427 — NativeDriveCameraManager.processImageProxy 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 · exhaustive_video_eval.validate_results_receipt (cyclomatic 21) · ×1
  • exhaustive_video_eval.validate_results_receipt (cyclomatic 21) eval/exhaustive_video_eval.py:1575 — exhaustive_video_eval.validate_results_receipt 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 · rad_dataset._download_one (cyclomatic 21) · ×1
  • rad_dataset._download_one (cyclomatic 21) REDACTED:414 — rad_dataset._download_one 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 · run_rad_eval._verify_frame (cyclomatic 21) · ×1
  • run_rad_eval._verify_frame (cyclomatic 21) eval/run_rad_eval.py:186 — run_rad_eval._verify_frame 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 · build_manifest.main (cyclomatic 21) · ×1
  • build_manifest.main (cyclomatic 21) ml/classifier/build_manifest.py:111 — build_manifest.main 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 · prepare.rdd2022 (cyclomatic 21) · ×1
  • prepare.rdd2022 (cyclomatic 21) REDACTED:102 — prepare.rdd2022 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 · parseTile (cyclomatic 21) · ×1
  • parseTile (cyclomatic 21) infra/aws-central/service/local-address.mjs:62 — parseTile has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · junctionsOf (cyclomatic 21) · ×1
  • junctionsOf (cyclomatic 21) infra/aws-central/tools/build-street-index.mjs:665 — junctionsOf has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createHandler · ×1
  • createHandler::handle (cyclomatic 21) ml/classifier/lambda/service.mjs:186 — createHandler::handle 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 · local-ownership.openOwnershipBundle (cyclomatic 20) · ×1
  • local-ownership.openOwnershipBundle (cyclomatic 20) infra/aws-central/service/local-ownership.mjs:49 — local-ownership.openOwnershipBundle 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 · service.createHandler.handle (cyclomatic 20) · ×1
  • service.createHandler.handle (cyclomatic 20) ml/classifier/lambda/service.mjs:186 — service.createHandler.handle 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 · CentralServiceClient.resolveTender (cyclomatic 20) · ×1
  • CentralServiceClient.resolveTender (cyclomatic 20) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/CentralServiceClient.kt:177 — CentralServiceClient.resolveTender has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · NativeDeduplicationEngine.checkAndCommitReport (cyclomatic 20) · ×1
  • NativeDeduplicationEngine.checkAndCommitReport (cyclomatic 20) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:144 — NativeDeduplicationEngine.checkAndCommitReport 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 · NativeRtspFrameSource.onImageAvailable (cyclomatic 20) · ×1
  • NativeRtspFrameSource.onImageAvailable (cyclomatic 20) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:295 — NativeRtspFrameSource.onImageAvailable 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 · materialize_private_eval.validate_ground_truth_manifest (cyclomatic 20) · ×1
  • materialize_private_eval.validate_ground_truth_manifest (cyclomatic 20) eval/materialize_private_eval.py:55 — materialize_private_eval.validate_ground_truth_manifest 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 · evaluate._average_precision_at_iou (cyclomatic 20) · ×1
  • evaluate._average_precision_at_iou (cyclomatic 20) ml/yolo/evaluate.py:234 — evaluate._average_precision_at_iou 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 · prepare_dataset._parse_audit (cyclomatic 20) · ×1
  • prepare_dataset._parse_audit (cyclomatic 20) ml/yolo/prepare_dataset.py:145 — prepare_dataset._parse_audit 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 · india-ward-tenders.noticesOfBody (cyclomatic 19) · ×1
  • india-ward-tenders.noticesOfBody (cyclomatic 19) infra/aws-central/service/india-ward-tenders.mjs:203 — india-ward-tenders.noticesOfBody 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 · build-street-index.createAddressModel.readBack (cyclomatic 19) · ×1
  • build-street-index.createAddressModel.readBack (cyclomatic 19) infra/aws-central/tools/build-street-index.mjs:997 — build-street-index.createAddressModel.readBack has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · india-ward-coverage-report.packGeometry (cyclomatic 19) · ×1
  • india-ward-coverage-report.packGeometry (cyclomatic 19) infra/aws-central/tools/india-ward-coverage-report.mjs:124 — india-ward-coverage-report.packGeometry 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 2 function items inside it that branch (walk, a function literal at line 127). 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 · india-ward-coverage.positionCheck (cyclomatic 19) · ×1
  • india-ward-coverage.positionCheck (cyclomatic 19) infra/aws-central/tools/india-ward-coverage.mjs:126 — india-ward-coverage.positionCheck has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.handleMap (cyclomatic 19) · ×1
  • index.handleMap (cyclomatic 19) server/src/index.js:3506 — index.handleMap has cyclomatic complexity 19 (threshold 15). Of this number, 11 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 · DriveForegroundService.persistSelectedBurst (cyclomatic 19) · ×1
  • DriveForegroundService.persistSelectedBurst (cyclomatic 19) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1502 — DriveForegroundService.persistSelectedBurst 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 · DriveForegroundService.dispatchStatus (cyclomatic 19) · ×1
  • DriveForegroundService.dispatchStatus (cyclomatic 19) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2842 — DriveForegroundService.dispatchStatus 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 · DriveModePlugin.startDrive (cyclomatic 19) · ×1
  • DriveModePlugin.startDrive (cyclomatic 19) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:263 — DriveModePlugin.startDrive 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 · materialize_private_eval.validate_dataset (cyclomatic 19) · ×1
  • materialize_private_eval.validate_dataset (cyclomatic 19) eval/materialize_private_eval.py:606 — materialize_private_eval.validate_dataset 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 · parity.validate_runtime_verdict (cyclomatic 19) · ×1
  • parity.validate_runtime_verdict (cyclomatic 19) ml/yolo/parity.py:151 — parity.validate_runtime_verdict 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 · createAddressModel.readBack (cyclomatic 19) · ×1
  • createAddressModel.readBack (cyclomatic 19) infra/aws-central/tools/build-street-index.mjs:997 — createAddressModel.readBack 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · core.validateVerdict (cyclomatic 18) · ×1
  • core.validateVerdict (cyclomatic 18) infra/aws-central/service/core.mjs:156 — core.validateVerdict 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 · rules.judgeIndiaWardCanary (cyclomatic 18) · ×1
  • rules.judgeIndiaWardCanary (cyclomatic 18) infra/aws-central/service/health/rules.mjs:478 — rules.judgeIndiaWardCanary has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · build-karnataka-geometry.ownershipBundle (cyclomatic 18) · ×1
  • build-karnataka-geometry.ownershipBundle (cyclomatic 18) infra/aws-central/tools/build-karnataka-geometry.mjs:356 — build-karnataka-geometry.ownershipBundle has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.captureProvenance (cyclomatic 18) · ×1
  • index.captureProvenance (cyclomatic 18) server/src/index.js:158 — index.captureProvenance 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 · index.validateDetectionVerdict (cyclomatic 18) · ×1
  • index.validateDetectionVerdict (cyclomatic 18) server/src/index.js:1575 — index.validateDetectionVerdict 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 · index.prepareSharedDetection (cyclomatic 18) · ×1
  • index.prepareSharedDetection (cyclomatic 18) server/src/index.js:1625 — index.prepareSharedDetection 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 · NativeDuplicateReportOwnership.merge (cyclomatic 18) · ×1
  • NativeDuplicateReportOwnership.merge (cyclomatic 18) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:43 — NativeDuplicateReportOwnership.merge 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 · NativeDriveLocationProvider.replaceRegistration (cyclomatic 18) · ×1
  • NativeDriveLocationProvider.replaceRegistration (cyclomatic 18) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveLocationProvider.kt:190 — NativeDriveLocationProvider.replaceRegistration 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 · evaluate.markdown (cyclomatic 18) · ×1
  • evaluate.markdown (cyclomatic 18) ml/classifier/evaluate.py:205 — evaluate.markdown has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · parity.run_production_onnx (cyclomatic 18) · ×1
  • parity.run_production_onnx (cyclomatic 18) ml/yolo/parity.py:351 — parity.run_production_onnx 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 · prepare_dataset.build_dataset (cyclomatic 18) · ×1
  • prepare_dataset.build_dataset (cyclomatic 18) ml/yolo/prepare_dataset.py:773 — prepare_dataset.build_dataset 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 · createCachedGeolocator.resolve (cyclomatic 18) · ×1
  • createCachedGeolocator.resolve (cyclomatic 18) infra/aws-central/service/geo-cache.mjs:54 — createCachedGeolocator.resolve 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 · snapshotWards (cyclomatic 18) · ×1
  • snapshotWards (cyclomatic 18) infra/aws-central/tools/build-karnataka-geometry.mjs:196 — snapshotWards has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 200, 223, 207). 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 · returnedPairs (cyclomatic 18) · ×1
  • returnedPairs (cyclomatic 18) infra/aws-central/tools/india-ward-runtime.mjs:198 — returnedPairs 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · india-wards.createIndiaWards.locate (cyclomatic 17) · ×1
  • india-wards.createIndiaWards.locate (cyclomatic 17) infra/aws-central/service/india-wards.mjs:113 — india-wards.createIndiaWards.locate 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 · local-address.measure (cyclomatic 17) · ×1
  • local-address.measure (cyclomatic 17) infra/aws-central/service/local-address.mjs:218 — local-address.measure 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 · Area.constructor (cyclomatic 17) · ×1
  • Area.constructor (cyclomatic 17) infra/aws-central/tools/build-street-index.mjs:357 — Area.constructor has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · build-street-index.streetFromFeature (cyclomatic 17) · ×1
  • build-street-index.streetFromFeature (cyclomatic 17) infra/aws-central/tools/build-street-index.mjs:189 — build-street-index.streetFromFeature 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 · index.callHttpYolo (cyclomatic 17) · ×1
  • index.callHttpYolo (cyclomatic 17) server/src/index.js:1419 — index.callHttpYolo 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 · FrameQualityEvaluator.bitmapToBoundedJpegBytes (cyclomatic 17) · ×1
  • FrameQualityEvaluator.bitmapToBoundedJpegBytes (cyclomatic 17) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/FrameQualityEvaluator.kt:306 — FrameQualityEvaluator.bitmapToBoundedJpegBytes 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 · exhaustive_video_eval.require_private_artifact_root (cyclomatic 17) · ×1
  • exhaustive_video_eval.require_private_artifact_root (cyclomatic 17) eval/exhaustive_video_eval.py:564 — exhaustive_video_eval.require_private_artifact_root 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 · finetune.main (cyclomatic 17) · ×1
  • finetune.main (cyclomatic 17) ml/classifier/finetune.py:141 — finetune.main 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 · release.verify_prediction_split_coverage (cyclomatic 17) · ×1
  • release.verify_prediction_split_coverage (cyclomatic 17) ml/yolo/release.py:112 — release.verify_prediction_split_coverage 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 · partsFromGeocoder (cyclomatic 17) · ×1
  • partsFromGeocoder (cyclomatic 17) infra/aws-central/service/geolocation.mjs:115 — partsFromGeocoder has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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 · createIndiaWards.locate (cyclomatic 17) · ×1
  • createIndiaWards.locate (cyclomatic 17) infra/aws-central/service/india-wards.mjs:113 — createIndiaWards.locate has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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 · main (cyclomatic 17) · ×1
  • main (cyclomatic 17) infra/aws-central/tools/seed-tenders.mjs:36 — main has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · geo-cache.createCachedGeolocator.resolve (cyclomatic 16) · ×1
  • geo-cache.createCachedGeolocator.resolve (cyclomatic 16) infra/aws-central/service/geo-cache.mjs:54 — geo-cache.createCachedGeolocator.resolve 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 · ownership-bundle-writer.createOwnershipWriter.finish (cyclomatic 16) · ×1
  • ownership-bundle-writer.createOwnershipWriter.finish (cyclomatic 16) infra/aws-central/tools/ownership-bundle-writer.mjs:279 — ownership-bundle-writer.createOwnershipWriter.finish has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · build-street-index.createAddressModel.nearestPostcode (cyclomatic 16) · ×1
  • build-street-index.createAddressModel.nearestPostcode (cyclomatic 16) infra/aws-central/tools/build-street-index.mjs:908 — build-street-index.createAddressModel.nearestPostcode 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 · verify-local-address.tenders · ×1
  • verify-local-address.tenders::outcome (cyclomatic 16) infra/aws-central/tools/verify-local-address.mjs:294 — verify-local-address.tenders::outcome has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (verify-local-address.tenders) 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 · VideoImportPlugin.extractFrame (cyclomatic 16) · ×1
  • VideoImportPlugin.extractFrame (cyclomatic 16) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportPlugin.kt:338 — VideoImportPlugin.extractFrame 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 · VideoImportStore.import (cyclomatic 16) · ×1
  • VideoImportStore.import (cyclomatic 16) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:197 — VideoImportStore.import 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 · NativeReportEvidenceStorage.saveJpegAtomically (cyclomatic 16) · ×1
  • NativeReportEvidenceStorage.saveJpegAtomically (cyclomatic 16) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeReportEvidenceStorage.kt:115 — NativeReportEvidenceStorage.saveJpegAtomically 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 · DriveModePlugin.monitorPendingStart (cyclomatic 16) · ×1
  • DriveModePlugin.monitorPendingStart (cyclomatic 16) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:429 — DriveModePlugin.monitorPendingStart 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 · DriveModePlugin.deleteFootage (cyclomatic 16) · ×1
  • DriveModePlugin.deleteFootage (cyclomatic 16) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1548 — DriveModePlugin.deleteFootage 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 · private_drive_corpus.validate_phase (cyclomatic 16) · ×1
  • private_drive_corpus.validate_phase (cyclomatic 16) eval/private_drive_corpus.py:543 — private_drive_corpus.validate_phase 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 · run_rad_eval._validate_args (cyclomatic 16) · ×1
  • run_rad_eval._validate_args (cyclomatic 16) eval/run_rad_eval.py:1202 — run_rad_eval._validate_args 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 · YoloOnnxDetector._postprocess (cyclomatic 16) · ×1
  • YoloOnnxDetector._postprocess (cyclomatic 16) infra/aws-yolo/service/detector.py:582 — YoloOnnxDetector._postprocess 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 · evaluate._load_predictions (cyclomatic 16) · ×1
  • evaluate._load_predictions (cyclomatic 16) ml/yolo/evaluate.py:518 — evaluate._load_predictions 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 · snapshot (cyclomatic 16) · ×1
  • snapshot (cyclomatic 16) infra/aws-central/tools/build-karnataka-geometry.mjs:151 — snapshot has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 155, 177, 165). 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 · createAddressModel.nearestPostcode (cyclomatic 16) · ×1
  • createAddressModel.nearestPostcode (cyclomatic 16) infra/aws-central/tools/build-street-index.mjs:908 — createAddressModel.nearestPostcode 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 · createOwnershipWriter.finish (cyclomatic 16) · ×1
  • createOwnershipWriter.finish (cyclomatic 16) infra/aws-central/tools/ownership-bundle-writer.mjs:279 — createOwnershipWriter.finish has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · createAddressModel (cognitive 167) · ×1
  • createAddressModel (cognitive 167) infra/aws-central/tools/build-street-index.mjs:776 — createAddressModel has cognitive complexity 167 (threshold 15). Drivers by points: if/else 36 (94 pts), boolean chains 37, loops 15 (27 pts), ternaries 4 (9 pts) (nesting depth added 75). Of this number, 158 points are the body's own statements and 9 belong to 9 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · render (cognitive 148) · ×1
  • render (cognitive 148) infra/aws-central/tools/india-ward-coverage-report.mjs:162 — render has cognitive complexity 148 (threshold 15). Drivers by points: ternaries 29 (58 pts), boolean chains 47, if/else 13 (23 pts), loops 12 (18 pts), other 2 (nesting depth added 45). Of this number, 79 points are the body's own statements and 69 belong to 123 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 · exhaustive_video_eval.validate_label_manifest (cognitive 137) · ×1
  • exhaustive_video_eval.validate_label_manifest (cognitive 137) eval/exhaustive_video_eval.py:271 — exhaustive_video_eval.validate_label_manifest has cognitive complexity 137 (threshold 15). Drivers by points: if/else 38 (81 pts), boolean chains 34, loops 8 (13 pts), ternaries 3 (8 pts), error handling 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build-street-index.buildRegion (cognitive 131) · ×1
  • build-street-index.buildRegion (cognitive 131) infra/aws-central/tools/build-street-index.mjs:1155 — build-street-index.buildRegion has cognitive complexity 131 (threshold 15). Drivers by points: if/else 26 (73 pts), loops 22 (42 pts), boolean chains 14, ternaries 2 (nesting depth added 67). Of this number, 129 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveModePlugin.reconcileNativeState (cognitive 129) · ×1
  • DriveModePlugin.reconcileNativeState (cognitive 129) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1641 — DriveModePlugin.reconcileNativeState has cognitive complexity 129 (threshold 15). Drivers by points: if/else 58 (92 pts), boolean chains 28, loops 7 (8 pts), match/switch 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UploadWorker.doWork (cognitive 123) · ×1
  • UploadWorker.doWork (cognitive 123) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:150 — UploadWorker.doWork has cognitive complexity 123 (threshold 15). Drivers by points: if/else 50 (100 pts), error handling 5 (11 pts), boolean chains 10, loops 2 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · private_drive_corpus._validate_manifest_for_receipt (cognitive 116) · ×1
  • private_drive_corpus._validate_manifest_for_receipt (cognitive 116) eval/private_drive_corpus.py:136 — private_drive_corpus._validate_manifest_for_receipt has cognitive complexity 116 (threshold 15). Drivers by points: if/else 42 (77 pts), boolean chains 35, loops 3 (4 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · common.validate_prepared_dataset (cognitive 111) · ×1
  • common.validate_prepared_dataset (cognitive 111) ml/yolo/common.py:275 — common.validate_prepared_dataset has cognitive complexity 111 (threshold 15). Drivers by points: if/else 43 (73 pts), boolean chains 17, loops 7 (10 pts), ternaries 3 (6 pts), error handling 3 (5 pts) (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 · titleNameKeys (cognitive 106) · ×1
  • titleNameKeys (cognitive 106) infra/aws-central/service/ward-tenders.mjs:239 — titleNameKeys has cognitive complexity 106 (threshold 15). Drivers by points: if/else 14 (56 pts), boolean chains 18, ternaries 4 (18 pts), loops 5 (14 pts) (nesting depth added 65). Of this number, 103 points are the body's own statements and 3 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · measureSnapshot (cognitive 97) · ×1
  • measureSnapshot (cognitive 97) infra/aws-central/tools/india-ward-coverage.mjs:149 — measureSnapshot has cognitive complexity 97 (threshold 15). Drivers by points: if/else 19 (62 pts), loops 7 (19 pts), ternaries 3 (10 pts), boolean chains 6 (nesting depth added 62). Of this number, 94 points are the body's own statements and 3 belong to 11 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · createGeolocator.resolve (cognitive 95) · ×1
  • createGeolocator.resolve (cognitive 95) infra/aws-central/service/geolocation.mjs:410 — createGeolocator.resolve has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 32 (46 pts), if/else 16 (23 pts), boolean chains 20, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geolocation.createGeolocator.resolve (cognitive 85) · ×1
  • geolocation.createGeolocator.resolve (cognitive 85) infra/aws-central/service/geolocation.mjs:410 — geolocation.createGeolocator.resolve has cognitive complexity 85 (threshold 15). Drivers by points: ternaries 24 (37 pts), if/else 16 (23 pts), boolean chains 19, error handling 2 (4 pts), loops 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 · wardMarkersIn (cognitive 82) · ×1
  • wardMarkersIn (cognitive 82) infra/aws-central/service/india-ward-tenders.mjs:95 — wardMarkersIn has cognitive complexity 82 (threshold 15). Drivers by points: if/else 18 (44 pts), boolean chains 24, loops 5 (10 pts), ternaries 1 (3 pts), other 1 (nesting depth added 33). Of this number, 81 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_rad_eval._index_to_manifest (cognitive 75) · ×1
  • run_rad_eval._index_to_manifest (cognitive 75) eval/run_rad_eval.py:347 — run_rad_eval._index_to_manifest has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 15, loops 4 (6 pts), error handling 2 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createAddressModel.rowsOf (cognitive 75) · ×1
  • createAddressModel.rowsOf (cognitive 75) infra/aws-central/tools/build-street-index.mjs:930 — createAddressModel.rowsOf has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (41 pts), ternaries 12 (20 pts), boolean chains 10, loops 4 (nesting depth added 31). Of this number, 69 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveJurisdiction (cognitive 74) · ×1
  • resolveJurisdiction (cognitive 74) server/src/index.js:2739 — resolveJurisdiction has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 24 (36 pts), boolean chains 27, if/else 7 (11 pts) (nesting depth added 16). Of this number, 73 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tenders (cognitive 74) · ×1
  • tenders (cognitive 74) infra/aws-central/tools/verify-local-address.mjs:276 — tenders has cognitive complexity 74 (threshold 15). Drivers by points: if/else 13 (33 pts), ternaries 12 (19 pts), boolean chains 16, loops 5 (6 pts) (nesting depth added 28). Of this number, 57 points are the body's own statements and 17 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-local-ownership.exactMetresToHighways (cognitive 72) · ×1
  • verify-local-ownership.exactMetresToHighways (cognitive 72) infra/aws-central/tools/verify-local-ownership.mjs:319 — verify-local-ownership.exactMetresToHighways has cognitive complexity 72 (threshold 15). Drivers by points: if/else 8 (35 pts), loops 8 (24 pts), ternaries 2 (10 pts), boolean chains 3 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · private_release_gate.validate_manifest (cognitive 70) · ×1
  • private_release_gate.validate_manifest (cognitive 70) eval/private_release_gate.py:59 — private_release_gate.validate_manifest has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (51 pts), boolean chains 12, loops 3 (4 pts), ternaries 1 (3 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 · matchWardTenders (cognitive 69) · ×1
  • matchWardTenders (cognitive 69) infra/aws-central/service/ward-tenders.mjs:579 — matchWardTenders has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 26, if/else 12 (24 pts), ternaries 6 (11 pts), loops 5 (8 pts) (nesting depth added 20). Of this number, 29 points are the body's own statements and 40 belong to 23 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 · ownership-bundle-writer.createOwnershipWriter.addPolygon (cognitive 68) · ×1
  • ownership-bundle-writer.createOwnershipWriter.addPolygon (cognitive 68) infra/aws-central/tools/ownership-bundle-writer.mjs:134 — ownership-bundle-writer.createOwnershipWriter.addPolygon has cognitive complexity 68 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 9 (29 pts), boolean chains 4, ternaries 1 (nesting depth added 43). 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 · createOwnershipWriter.addPolygon (cognitive 68) · ×1
  • createOwnershipWriter.addPolygon (cognitive 68) infra/aws-central/tools/ownership-bundle-writer.mjs:134 — createOwnershipWriter.addPolygon has cognitive complexity 68 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 9 (29 pts), boolean chains 4, ternaries 1 (nesting depth added 43). 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 · DriveForegroundService.stopDriveSession (cognitive 67) · ×1
  • DriveForegroundService.stopDriveSession (cognitive 67) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2118 — DriveForegroundService.stopDriveSession has cognitive complexity 67 (threshold 15). Drivers by points: if/else 41 (47 pts), error handling 13 (14 pts), boolean chains 5, match/switch 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 · run_prepared_eval.load_event (cognitive 67) · ×1
  • run_prepared_eval.load_event (cognitive 67) eval/run_prepared_eval.py:45 — run_prepared_eval.load_event has cognitive complexity 67 (threshold 15). Drivers by points: if/else 37 (47 pts), boolean chains 14, error handling 2 (4 pts), loops 2 (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 · prepare_dataset.collect_rad (cognitive 67) · ×1
  • prepare_dataset.collect_rad (cognitive 67) ml/yolo/prepare_dataset.py:546 — prepare_dataset.collect_rad has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 13, loops 4 (7 pts), ternaries 4 (7 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 · polygonsAt (cognitive 64) · ×1
  • polygonsAt (cognitive 64) infra/aws-central/service/local-ownership.mjs:115 — polygonsAt has cognitive complexity 64 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 7 (16 pts), ternaries 3 (15 pts), boolean chains 3 (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 · judgeWindow (cognitive 64) · ×1
  • judgeWindow (cognitive 64) infra/aws-central/service/health/window.mjs:42 — judgeWindow has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 21 (28 pts), boolean chains 16, if/else 13 (15 pts), loops 4, error handling 1 (nesting depth added 9). Of this number, 54 points are the body's own statements and 10 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · build-street-index.createAddressModel.rowsOf (cognitive 63) · ×1
  • build-street-index.createAddressModel.rowsOf (cognitive 63) infra/aws-central/tools/build-street-index.mjs:930 — build-street-index.createAddressModel.rowsOf has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (41 pts), boolean chains 10, ternaries 4 (8 pts), loops 4 (nesting depth added 27). Of this number, 62 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-local-address.compare (cognitive 62) · ×1
  • verify-local-address.compare (cognitive 62) infra/aws-central/tools/verify-local-address.mjs:212 — verify-local-address.compare has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 7 (14 pts), boolean chains 7, ternaries 1 (nesting depth added 33). Of this number, 60 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 · wardMarkers (cognitive 61) · ×1
  • wardMarkers (cognitive 61) infra/aws-central/service/ward-tenders.mjs:308 — wardMarkers has cognitive complexity 61 (threshold 15). Drivers by points: loops 10 (25 pts), if/else 9 (17 pts), boolean chains 15, ternaries 2 (4 pts) (nesting depth added 25). Of this number, 49 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_tender_eval.main (cognitive 60) · ×1
  • run_tender_eval.main (cognitive 60) REDACTED:316 — run_tender_eval.main has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (34 pts), loops 10 (14 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · urbanBodyOf (cognitive 58) · ×1
  • urbanBodyOf (cognitive 58) infra/aws-central/service/notice-bodies.mjs:74 — urbanBodyOf has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 21, ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canary.runCanary (cognitive 55) · ×1
  • canary.runCanary (cognitive 55) infra/aws-central/service/health/canary.mjs:23 — canary.runCanary has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 13 (21 pts), if/else 14 (18 pts), boolean chains 13, error handling 2, loops 1 (nesting depth added 12). Of this number, 52 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_rad_eval.validate_manifest (cognitive 55) · ×1
  • run_rad_eval.validate_manifest (cognitive 55) eval/run_rad_eval.py:250 — run_rad_eval.validate_manifest has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 12, loops 2, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.consumeInferenceJobs (cognitive 53) · ×1
  • DriveForegroundService.consumeInferenceJobs (cognitive 53) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1672 — DriveForegroundService.consumeInferenceJobs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (36 pts), error handling 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exhaustive_video_eval.run_paid (cognitive 53) · ×1
  • exhaustive_video_eval.run_paid (cognitive 53) eval/exhaustive_video_eval.py:1335 — exhaustive_video_eval.run_paid has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 8, loops 3 (4 pts), ternaries 2, 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 · NativeDeduplicationEngine.matchRoadEvent (cognitive 51) · ×1
  • NativeDeduplicationEngine.matchRoadEvent (cognitive 51) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:259 — NativeDeduplicationEngine.matchRoadEvent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (35 pts), boolean chains 16 (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 · NotificationHelper.buildNotification (cognitive 51) · ×1
  • NotificationHelper.buildNotification (cognitive 51) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt:66 — NotificationHelper.buildNotification has cognitive complexity 51 (threshold 15). Drivers by points: if/else 30 (41 pts), boolean chains 8, match/switch 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 · pointOnSurface (cognitive 50) · ×1
  • pointOnSurface (cognitive 50) infra/aws-central/tools/build-street-index.mjs:514 — pointOnSurface has cognitive complexity 50 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 7 (15 pts), boolean chains 8 (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 · prepare.rdd2022 (cognitive 49) · ×1
  • prepare.rdd2022 (cognitive 49) REDACTED:102 — prepare.rdd2022 has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 5 (10 pts), ternaries 3 (10 pts), boolean chains 3 (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 · release.build_model_manifest (cognitive 49) · ×1
  • release.build_model_manifest (cognitive 49) ml/yolo/release.py:150 — release.build_model_manifest has cognitive complexity 49 (threshold 15). Drivers by points: if/else 35, boolean chains 12, error handling 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 · run_eval.main (cognitive 47) · ×1
  • run_eval.main (cognitive 47) REDACTED:599 — run_eval.main has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 9 (15 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exhaustive_video_eval.validate_materialized (cognitive 46) · ×1
  • exhaustive_video_eval.validate_materialized (cognitive 46) eval/exhaustive_video_eval.py:1015 — exhaustive_video_eval.validate_materialized has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 11, loops 4 (6 pts), error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ward-tender-vocabulary.main (cognitive 45) · ×1
  • ward-tender-vocabulary.main (cognitive 45) infra/aws-central/tools/ward-tender-vocabulary.mjs:47 — ward-tender-vocabulary.main has cognitive complexity 45 (threshold 15). Drivers by points: loops 14 (24 pts), if/else 4 (15 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 22). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · run_rad_eval.validate_result_rows (cognitive 45) · ×1
  • run_rad_eval.validate_result_rows (cognitive 45) eval/run_rad_eval.py:894 — run_rad_eval.validate_result_rows has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (38 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 · evaluate._score_operating_point (cognitive 45) · ×1
  • evaluate._score_operating_point (cognitive 45) ml/yolo/evaluate.py:140 — evaluate._score_operating_point has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (28 pts), ternaries 8, loops 3 (5 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare_dataset.collect_owned (cognitive 44) · ×1
  • prepare_dataset.collect_owned (cognitive 44) ml/yolo/prepare_dataset.py:388 — prepare_dataset.collect_owned has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 4 (8 pts), boolean chains 3, loops 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 · local-address.search (cognitive 43) · ×1
  • local-address.search (cognitive 43) infra/aws-central/service/local-address.mjs:267 — local-address.search has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 12, loops 4 (8 pts), ternaries 4 (8 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (local-address.search::visit) 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 · kgis-layers.downloadLayer (cognitive 43) · ×1
  • kgis-layers.downloadLayer (cognitive 43) infra/aws-central/tools/kgis-layers.mjs:100 — kgis-layers.downloadLayer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 7, loops 4 (7 pts), error handling 1 (3 pts), ternaries 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 · run.tasks (cognitive 43) · ×1
  • run.tasks (cognitive 43) tools/harness/run.mjs:130 — run.tasks has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 11, loops 3 (7 pts), ternaries 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.startScanLoop (cognitive 43) · ×1
  • DriveForegroundService.startScanLoop (cognitive 43) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:863 — DriveForegroundService.startScanLoop has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (33 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tenders.matchTender (cognitive 42) · ×1
  • tenders.matchTender (cognitive 42) REDACTED:45 — tenders.matchTender has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 16, loops 2 (3 pts) (nesting depth added 12). Of this number, 40 points are the body's own statements and 2 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.refreshCaptureInterlock (cognitive 42) · ×1
  • DriveForegroundService.refreshCaptureInterlock (cognitive 42) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1385 — DriveForegroundService.refreshCaptureInterlock has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 9, 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 · indexStreets (cognitive 42) · ×1
  • indexStreets (cognitive 42) infra/aws-central/service/local-address.mjs:131 — indexStreets has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (33 pts), ternaries 6 (16 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.tenderShortlist (cognitive 40) · ×1
  • index.tenderShortlist (cognitive 40) server/src/index.js:2986 — index.tenderShortlist has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 7 (10 pts), boolean chains 9, ternaries 2 (nesting depth added 12). Of this number, 37 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeBridgeJpeg.isPlausibleJpeg (cognitive 40) · ×1
  • NativeBridgeJpeg.isPlausibleJpeg (cognitive 40) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/NativeBridgeJpeg.kt:34 — NativeBridgeJpeg.isPlausibleJpeg has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rad_dataset.build_index (cognitive 40) · ×1
  • rad_dataset.build_index (cognitive 40) REDACTED:669 — rad_dataset.build_index has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 7 (11 pts), boolean chains 6 (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 · build_manifest.main (cognitive 39) · ×1
  • build_manifest.main (cognitive 39) ml/classifier/build_manifest.py:111 — build_manifest.main has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare.main (cognitive 39) · ×1
  • prepare.main (cognitive 39) REDACTED:479 — prepare.main has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 8 (11 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parity.compare_prediction_sets (cognitive 39) · ×1
  • parity.compare_prediction_sets (cognitive 39) ml/yolo/parity.py:182 — parity.compare_prediction_sets has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 5 (9 pts), loops 4 (6 pts), boolean chains 3 (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 · evaluate._average_precision_at_iou (cognitive 38) · ×1
  • evaluate._average_precision_at_iou (cognitive 38) ml/yolo/evaluate.py:234 — evaluate._average_precision_at_iou has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 6 (8 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · junctionsOf (cognitive 38) · ×1
  • junctionsOf (cognitive 38) infra/aws-central/tools/build-street-index.mjs:665 — junctionsOf has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 6 (8 pts), boolean chains 3 (nesting depth added 17). Of this number, 32 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · encodeTile (cognitive 38) · ×1
  • encodeTile (cognitive 38) infra/aws-central/tools/build-street-index.mjs:1086 — encodeTile has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 7 (14 pts), loops 8 (11 pts), if/else 6 (10 pts), boolean chains 3 (nesting depth added 14). Of this number, 34 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.scheduleCriticalCameraRecovery (cognitive 37) · ×1
  • DriveForegroundService.scheduleCriticalCameraRecovery (cognitive 37) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1169 — DriveForegroundService.scheduleCriticalCameraRecovery has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 6, error handling 2 (4 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 · NativeDriveCameraManager.finalizeVideoSegment (cognitive 37) · ×1
  • NativeDriveCameraManager.finalizeVideoSegment (cognitive 37) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:927 — NativeDriveCameraManager.finalizeVideoSegment has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate.markdown (cognitive 37) · ×1
  • evaluate.markdown (cognitive 37) ml/classifier/evaluate.py:205 — evaluate.markdown has cognitive complexity 37 (threshold 15). Drivers by points: loops 14 (25 pts), ternaries 2 (7 pts), if/else 2 (5 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Area.constructor (cognitive 36) · ×1
  • Area.constructor (cognitive 36) infra/aws-central/tools/build-street-index.mjs:357 — Area.constructor has cognitive complexity 36 (threshold 15). Drivers by points: loops 11 (19 pts), if/else 4 (16 pts), boolean chains 1 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DuplicateDetector.roadEventMatch (cognitive 35) · ×1
  • DuplicateDetector.roadEventMatch (cognitive 35) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DuplicateDetector.kt:131 — DuplicateDetector.roadEventMatch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 9 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeDriveCameraManager.processImageProxy (cognitive 35) · ×1
  • NativeDriveCameraManager.processImageProxy (cognitive 35) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:427 — NativeDriveCameraManager.processImageProxy has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 5, error handling 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 · index.reportCandidate (cognitive 34) · ×1
  • index.reportCandidate (cognitive 34) server/src/index.js:2353 — index.reportCandidate has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, if/else 12, ternaries 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 · exhaustive_video_eval._validate_source_manifest_for_receipt (cognitive 34) · ×1
  • exhaustive_video_eval._validate_source_manifest_for_receipt (cognitive 34) eval/exhaustive_video_eval.py:142 — exhaustive_video_eval._validate_source_manifest_for_receipt has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 11, ternaries 1 (2 pts), error handling 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 · exhaustive_video_eval._accepted_clusters (cognitive 34) · ×1
  • exhaustive_video_eval._accepted_clusters (cognitive 34) eval/exhaustive_video_eval.py:1756 — exhaustive_video_eval._accepted_clusters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (6 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exhaustive_video_eval.main (cognitive 34) · ×1
  • exhaustive_video_eval.main (cognitive 34) eval/exhaustive_video_eval.py:2126 — exhaustive_video_eval.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 12, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createDetector.yolo (cognitive 34) · ×1
  • createDetector.yolo (cognitive 34) infra/aws-central/service/detectors.mjs:391 — createDetector.yolo has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, ternaries 4 (7 pts), error handling 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build-india-localities.loadStates (cognitive 33) · ×1
  • build-india-localities.loadStates (cognitive 33) infra/aws-central/tools/build-india-localities.mjs:56 — build-india-localities.loadStates has cognitive complexity 33 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 20). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · build-street-index.prepare (cognitive 33) · ×1
  • build-street-index.prepare (cognitive 33) infra/aws-central/tools/build-street-index.mjs:1463 — build-street-index.prepare has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveModeService.driveTick (cognitive 33) · ×1
  • DriveModeService.driveTick (cognitive 33) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DriveModeService.kt:560 — DriveModeService.driveTick has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 5, error handling 5, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · detector.load_and_validate_manifest (cognitive 33) · ×1
  • detector.load_and_validate_manifest (cognitive 33) infra/aws-yolo/service/detector.py:111 — detector.load_and_validate_manifest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22, boolean chains 9, error handling 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 · webview-drive-analyse.main (cognitive 33) · ×1
  • webview-drive-analyse.main (cognitive 33) tools/harness/webview-drive-analyse.py:237 — webview-drive-analyse.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 6 (7 pts), boolean chains 4, error handling 2 (4 pts), ternaries 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 · detectors.createDetector.yolo (cognitive 32) · ×1
  • detectors.createDetector.yolo (cognitive 32) infra/aws-central/service/detectors.mjs:391 — detectors.createDetector.yolo has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, ternaries 4 (7 pts), error handling 2 (4 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 · verify-local-address.sample (cognitive 32) · ×1
  • verify-local-address.sample (cognitive 32) infra/aws-central/tools/verify-local-address.mjs:111 — verify-local-address.sample has cognitive complexity 32 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 6 (8 pts), boolean chains 7, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 13). Of this number, 30 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch 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.callOpenAI (cognitive 32) · ×1
  • index.callOpenAI (cognitive 32) server/src/index.js:1324 — index.callOpenAI has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 9, if/else 9, error handling 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 · NativeDeduplicationEngine.checkAndCommitReport (cognitive 32) · ×1
  • NativeDeduplicationEngine.checkAndCommitReport (cognitive 32) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:144 — NativeDeduplicationEngine.checkAndCommitReport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 8, 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 · run_rad_eval.main (cognitive 32) · ×1
  • run_rad_eval.main (cognitive 32) eval/run_rad_eval.py:1225 — run_rad_eval.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 4, loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · averagePostcodes (cognitive 32) · ×1
  • averagePostcodes (cognitive 32) infra/aws-central/tools/build-street-index.mjs:1402 — averagePostcodes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7, ternaries 2 (4 pts), loops 3 (nesting depth added 10). Of this number, 30 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rad_dataset.list_remote_inventory (cognitive 31) · ×1
  • rad_dataset.list_remote_inventory (cognitive 31) REDACTED:298 — rad_dataset.list_remote_inventory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, 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 · buildSnapshot (cognitive 31) · ×1
  • buildSnapshot (cognitive 31) infra/aws-central/tools/snapshot-india-wards.mjs:911 — buildSnapshot has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 7 (10 pts), boolean chains 5, other 3, loops 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 8 belong to 15 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · NativeDuplicateReportOwnership.merge (cognitive 30) · ×1
  • NativeDuplicateReportOwnership.merge (cognitive 30) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:43 — NativeDuplicateReportOwnership.merge has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 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 · createLocalAddress.answer (cognitive 30) · ×1
  • createLocalAddress.answer (cognitive 30) infra/aws-central/service/local-address.mjs:420 — createLocalAddress.answer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 11, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · placeFromFeature (cognitive 30) · ×1
  • placeFromFeature (cognitive 30) infra/aws-central/tools/build-street-index.mjs:220 — placeFromFeature has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 10, ternaries 5 (6 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 · india-wards.createIndiaWards.locate (cognitive 29) · ×1
  • india-wards.createIndiaWards.locate (cognitive 29) infra/aws-central/service/india-wards.mjs:113 — india-wards.createIndiaWards.locate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). 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 · build-street-index.createAddressModel.piecesOf (cognitive 29) · ×1
  • build-street-index.createAddressModel.piecesOf (cognitive 29) infra/aws-central/tools/build-street-index.mjs:1035 — build-street-index.createAddressModel.piecesOf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (8 pts), boolean chains 3, ternaries 1 (nesting depth added 15). 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 · india-ward-coverage.measureStates (cognitive 29) · ×1
  • india-ward-coverage.measureStates (cognitive 29) infra/aws-central/tools/india-ward-coverage.mjs:281 — india-ward-coverage.measureStates has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 4, 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 · createIndiaWards.locate (cognitive 29) · ×1
  • createIndiaWards.locate (cognitive 29) infra/aws-central/service/india-wards.mjs:113 — createIndiaWards.locate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). Of this number, 28 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 · createAddressModel.piecesOf (cognitive 29) · ×1
  • createAddressModel.piecesOf (cognitive 29) infra/aws-central/tools/build-street-index.mjs:1035 — createAddressModel.piecesOf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (8 pts), boolean chains 3, ternaries 1 (nesting depth added 15). Of this number, 28 points are the body's own statements and 1 belongs 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 · DriveForegroundService.startDriveSession (cognitive 28) · ×1
  • DriveForegroundService.startDriveSession (cognitive 28) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:480 — DriveForegroundService.startDriveSession has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 7, match/switch 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 · release.command_release (cognitive 28) · ×1
  • release.command_release (cognitive 28) ml/yolo/release.py:432 — release.command_release has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (26 pts), 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.
D2 · Cognitive Complexity · createDetector.openai (cognitive 28) · ×1
  • createDetector.openai (cognitive 28) infra/aws-central/service/detectors.mjs:270 — createDetector.openai has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 4 (6 pts), error handling 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 · detectors.createDetector.openai (cognitive 27) · ×1
  • detectors.createDetector.openai (cognitive 27) infra/aws-central/service/detectors.mjs:270 — detectors.createDetector.openai has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 4 (6 pts), error handling 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 · materialize_private_eval.release_records (cognitive 27) · ×1
  • materialize_private_eval.release_records (cognitive 27) eval/materialize_private_eval.py:239 — materialize_private_eval.release_records has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (21 pts), loops 3 (6 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 · evaluate.evaluate (cognitive 27) · ×1
  • evaluate.evaluate (cognitive 27) ml/detector/evaluate.py:189 — evaluate.evaluate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 5 (7 pts), boolean chains 4 (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 · prepare.attain (cognitive 27) · ×1
  • prepare.attain (cognitive 27) REDACTED:225 — prepare.attain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare_dataset._coalesce_groups (cognitive 27) · ×1
  • prepare_dataset._coalesce_groups (cognitive 27) ml/yolo/prepare_dataset.py:705 — prepare_dataset._coalesce_groups has cognitive complexity 27 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 4 (10 pts), boolean chains 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · local-address.createLocalAddress.answer (cognitive 26) · ×1
  • local-address.createLocalAddress.answer (cognitive 26) infra/aws-central/service/local-address.mjs:420 — local-address.createLocalAddress.answer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 11, 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 · india-ward-coverage.positionCheck (cognitive 26) · ×1
  • india-ward-coverage.positionCheck (cognitive 26) infra/aws-central/tools/india-ward-coverage.mjs:126 — india-ward-coverage.positionCheck has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeRtspFrameSource.onImageAvailable (cognitive 26) · ×1
  • NativeRtspFrameSource.onImageAvailable (cognitive 26) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:295 — NativeRtspFrameSource.onImageAvailable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, error handling 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 · DriveModePlugin.monitorPendingStart (cognitive 26) · ×1
  • DriveModePlugin.monitorPendingStart (cognitive 26) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:429 — DriveModePlugin.monitorPendingStart has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parity.run_production_onnx (cognitive 26) · ×1
  • parity.run_production_onnx (cognitive 26) ml/yolo/parity.py:351 — parity.run_production_onnx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 3 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build-karnataka-geometry.ownershipBundle (cognitive 25) · ×1
  • build-karnataka-geometry.ownershipBundle (cognitive 25) infra/aws-central/tools/build-karnataka-geometry.mjs:356 — build-karnataka-geometry.ownershipBundle has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 5 (6 pts), boolean chains 2, loops 2 (nesting depth added 6). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to one function item inside it that branches (kgisLayer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · build-street-index.lineMeetsBox (cognitive 25) · ×1
  • build-street-index.lineMeetsBox (cognitive 25) infra/aws-central/tools/build-street-index.mjs:583 — build-street-index.lineMeetsBox has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveModePlugin.startDrive (cognitive 25) · ×1
  • DriveModePlugin.startDrive (cognitive 25) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:263 — DriveModePlugin.startDrive has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20 (24 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · rad_dataset._download_one (cognitive 25) · ×1
  • rad_dataset._download_one (cognitive 25) REDACTED:414 — rad_dataset._download_one has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, error handling 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 · datasets.main (cognitive 25) · ×1
  • datasets.main (cognitive 25) ml/classifier/datasets.py:384 — datasets.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (8 pts), boolean chains 3, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finetune.main (cognitive 25) · ×1
  • finetune.main (cognitive 25) ml/classifier/finetune.py:141 — finetune.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (5 pts), ternaries 2 (4 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 · prepare_dataset._parse_audit (cognitive 25) · ×1
  • prepare_dataset._parse_audit (cognitive 25) ml/yolo/prepare_dataset.py:145 — prepare_dataset._parse_audit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release.verify_prediction_split_coverage (cognitive 25) · ×1
  • release.verify_prediction_split_coverage (cognitive 25) ml/yolo/release.py:112 — release.verify_prediction_split_coverage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 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 · india-ward-tenders.namedWards (cognitive 24) · ×1
  • india-ward-tenders.namedWards (cognitive 24) infra/aws-central/service/india-ward-tenders.mjs:169 — india-ward-tenders.namedWards has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (10 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 · rules.reportShadowScreen (cognitive 24) · ×1
  • rules.reportShadowScreen (cognitive 24) infra/aws-central/service/health/rules.mjs:128 — rules.reportShadowScreen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 5 (7 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.dispatchStatus (cognitive 24) · ×1
  • DriveForegroundService.dispatchStatus (cognitive 24) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:2842 — DriveForegroundService.dispatchStatus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8 (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 · detector.validate_release_bundle (cognitive 24) · ×1
  • detector.validate_release_bundle (cognitive 24) infra/aws-yolo/service/detector.py:254 — detector.validate_release_bundle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, error handling 3 (4 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · prepare_dataset.build_dataset (cognitive 24) · ×1
  • prepare_dataset.build_dataset (cognitive 24) ml/yolo/prepare_dataset.py:773 — prepare_dataset.build_dataset has cognitive complexity 24 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 5 (8 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCachedGeolocator.resolve (cognitive 24) · ×1
  • createCachedGeolocator.resolve (cognitive 24) infra/aws-central/service/geo-cache.mjs:54 — createCachedGeolocator.resolve has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (7 pts), boolean chains 6, error handling 2 (4 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 · noticesOfBody (cognitive 24) · ×1
  • noticesOfBody (cognitive 24) infra/aws-central/service/india-ward-tenders.mjs:203 — noticesOfBody has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), ternaries 2 (6 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 · parseRequest (cognitive 24) · ×1
  • parseRequest (cognitive 24) ml/classifier/lambda/service.mjs:121 — parseRequest has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 11, error handling 1, ternaries 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 · Area.distanceTo (cognitive 23) · ×1
  • Area.distanceTo (cognitive 23) infra/aws-central/tools/build-street-index.mjs:446 — Area.distanceTo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CellIndex.query (cognitive 23) · ×1
  • CellIndex.query (cognitive 23) infra/aws-central/tools/build-street-index.mjs:740 — CellIndex.query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveForegroundService.persistSelectedBurst (cognitive 23) · ×1
  • DriveForegroundService.persistSelectedBurst (cognitive 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:1502 — DriveForegroundService.persistSelectedBurst has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, error handling 3 (4 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, 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 · NativeRepairCandidateMatcher.selectCandidate (cognitive 23) · ×1
  • NativeRepairCandidateMatcher.selectCandidate (cognitive 23) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRepairStatusEngine.kt:57 — NativeRepairCandidateMatcher.selectCandidate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · handler.parse_request (cognitive 23) · ×1
  • handler.parse_request (cognitive 23) infra/aws-yolo/service/handler.py:422 — handler.parse_request has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 11, 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 · coverage (cognitive 23) · ×1
  • coverage (cognitive 23) infra/aws-central/tools/india-ward-runtime.mjs:242 — coverage has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (12 pts), ternaries 3 (5 pts), if/else 1 (3 pts), other 3 (nesting depth added 11). Of this number, 16 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · overlapPairs (cognitive 23) · ×1
  • overlapPairs (cognitive 23) infra/aws-central/tools/snapshot-india-wards.mjs:876 — overlapPairs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (8 pts), boolean chains 2, ternaries 1 (nesting depth added 12). 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 · service.createHandler.handle (cognitive 22) · ×1
  • service.createHandler.handle (cognitive 22) ml/classifier/lambda/service.mjs:186 — service.createHandler.handle has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 6, if/else 3 (5 pts), error handling 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 · index.handleImpact (cognitive 22) · ×1
  • index.handleImpact (cognitive 22) server/src/index.js:3582 — index.handleImpact has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 21, if/else 1. Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.dispatch (cognitive 22) · ×1
  • index.dispatch (cognitive 22) server/src/index.js:3788 — index.dispatch has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 11. To reduce it, name the conditions: bind each compound test to a 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 · VideoImportStore.loadAndCleanup (cognitive 22) · ×1
  • VideoImportStore.loadAndCleanup (cognitive 22) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:780 — VideoImportStore.loadAndCleanup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, 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 · NativeDriveLocationProvider.replaceRegistration (cognitive 22) · ×1
  • NativeDriveLocationProvider.replaceRegistration (cognitive 22) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveLocationProvider.kt:190 — NativeDriveLocationProvider.replaceRegistration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 4, error handling 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 · NativeInferenceTransport.readSse (cognitive 22) · ×1
  • NativeInferenceTransport.readSse (cognitive 22) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:150 — NativeInferenceTransport.readSse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 3 (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 · exhaustive_video_eval.validate_results_receipt (cognitive 22) · ×1
  • exhaustive_video_eval.validate_results_receipt (cognitive 22) eval/exhaustive_video_eval.py:1575 — exhaustive_video_eval.validate_results_receipt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · materialize_private_eval.validate_ground_truth_manifest (cognitive 22) · ×1
  • materialize_private_eval.validate_ground_truth_manifest (cognitive 22) eval/materialize_private_eval.py:55 — materialize_private_eval.validate_ground_truth_manifest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, loops 3 (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 · private_drive_corpus.validate_phase (cognitive 22) · ×1
  • private_drive_corpus.validate_phase (cognitive 22) eval/private_drive_corpus.py:543 — private_drive_corpus.validate_phase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 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 · recordMetrics (cognitive 22) · ×1
  • recordMetrics (cognitive 22) server/src/index.js:996 — recordMetrics has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 18, if/else 2, error handling 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · createHandler · ×1
  • createHandler::handle (cognitive 22) ml/classifier/lambda/service.mjs:186 — createHandler::handle has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8, boolean chains 6, if/else 3 (5 pts), error handling 2, other 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 · india-ward-coverage-report.packGeometry (cognitive 21) · ×1
  • india-ward-coverage-report.packGeometry (cognitive 21) infra/aws-central/tools/india-ward-coverage-report.mjs:124 — india-ward-coverage-report.packGeometry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (walk, a function literal at line 127). 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 · DriveForegroundService.onStartCommand (cognitive 21) · ×1
  • DriveForegroundService.onStartCommand (cognitive 21) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:327 — DriveForegroundService.onStartCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 1 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeRtspFrameSource.playerListener (cognitive 21) · ×1
  • NativeRtspFrameSource.playerListener (cognitive 21) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:244 — NativeRtspFrameSource.playerListener has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · materialize_private_eval.validate_dataset (cognitive 21) · ×1
  • materialize_private_eval.validate_dataset (cognitive 21) eval/materialize_private_eval.py:606 — materialize_private_eval.validate_dataset has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, error handling 2 (3 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 · rad_dataset._signed_file_url (cognitive 21) · ×1
  • rad_dataset._signed_file_url (cognitive 21) REDACTED:230 — rad_dataset._signed_file_url has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (3 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 · rad_dataset.parse_yolo_labels (cognitive 21) · ×1
  • rad_dataset.parse_yolo_labels (cognitive 21) REDACTED:578 — rad_dataset.parse_yolo_labels has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_eval.native_decision (cognitive 21) · ×1
  • run_eval.native_decision (cognitive 21) REDACTED:312 — run_eval.native_decision has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · run_eval.parse_api_response (cognitive 21) · ×1
  • run_eval.parse_api_response (cognitive 21) REDACTED:432 — run_eval.parse_api_response has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_rad_eval._verify_frame (cognitive 21) · ×1
  • run_rad_eval._verify_frame (cognitive 21) eval/run_rad_eval.py:186 — run_rad_eval._verify_frame has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, error handling 1, loops 1, ternaries 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 · verifySharedDetectionReceipt (cognitive 21) · ×1
  • verifySharedDetectionReceipt (cognitive 21) server/src/index.js:1904 — verifySharedDetectionReceipt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, 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.
D2 · Cognitive Complexity · matchIndiaWardTenders (cognitive 21) · ×1
  • matchIndiaWardTenders (cognitive 21) infra/aws-central/service/india-ward-tenders.mjs:262 — matchIndiaWardTenders has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 4 (6 pts), loops 1 (nesting depth added 4). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseTile (cognitive 21) · ×1
  • parseTile (cognitive 21) infra/aws-central/service/local-address.mjs:62 — parseTile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 5 (7 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 · main (cognitive 21) · ×1
  • main (cognitive 21) infra/aws-central/tools/seed-tenders.mjs:36 — main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (5 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ward-tenders.localityKeys (cognitive 20) · ×1
  • ward-tenders.localityKeys (cognitive 20) infra/aws-central/service/ward-tenders.mjs:197 — ward-tenders.localityKeys has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). 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 · geo-cache.createCachedGeolocator.resolve (cognitive 20) · ×1
  • geo-cache.createCachedGeolocator.resolve (cognitive 20) infra/aws-central/service/geo-cache.mjs:54 — geo-cache.createCachedGeolocator.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (7 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshot-india-wards.main (cognitive 20) · ×1
  • snapshot-india-wards.main (cognitive 20) infra/aws-central/tools/snapshot-india-wards.mjs:1170 — snapshot-india-wards.main has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 6 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). Of this number, 18 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 · VideoImportStore.import (cognitive 20) · ×1
  • VideoImportStore.import (cognitive 20) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:197 — VideoImportStore.import has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 3, 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 · exhaustive_video_eval.materialize (cognitive 20) · ×1
  • exhaustive_video_eval.materialize (cognitive 20) eval/exhaustive_video_eval.py:834 — exhaustive_video_eval.materialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare.bharat (cognitive 20) · ×1
  • prepare.bharat (cognitive 20) REDACTED:283 — prepare.bharat has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate.group_bootstrap_confidence_intervals (cognitive 20) · ×1
  • evaluate.group_bootstrap_confidence_intervals (cognitive 20) ml/yolo/evaluate.py:377 — evaluate.group_bootstrap_confidence_intervals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 5 (7 pts), ternaries 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 · evaluate.command_predict (cognitive 20) · ×1
  • evaluate.command_predict (cognitive 20) ml/yolo/evaluate.py:555 — evaluate.command_predict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), error handling 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 · measure (cognitive 20) · ×1
  • measure (cognitive 20) infra/aws-central/service/local-address.mjs:218 — measure has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 6 (7 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · india-ward-tenders.bodiesOf (cognitive 19) · ×1
  • india-ward-tenders.bodiesOf (cognitive 19) infra/aws-central/service/india-ward-tenders.mjs:298 — india-ward-tenders.bodiesOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, ternaries 1 (3 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 · rules.estimateLiveRecall (cognitive 19) · ×1
  • rules.estimateLiveRecall (cognitive 19) infra/aws-central/service/health/rules.mjs:313 — rules.estimateLiveRecall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshot-india-wards.assembleRings (cognitive 19) · ×1
  • snapshot-india-wards.assembleRings (cognitive 19) infra/aws-central/tools/snapshot-india-wards.mjs:689 — snapshot-india-wards.assembleRings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 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 · build-street-index.simplify (cognitive 19) · ×1
  • build-street-index.simplify (cognitive 19) infra/aws-central/tools/build-street-index.mjs:623 — build-street-index.simplify has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameQualityEvaluator.bitmapToBoundedJpegBytes (cognitive 19) · ×1
  • FrameQualityEvaluator.bitmapToBoundedJpegBytes (cognitive 19) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/FrameQualityEvaluator.kt:306 — FrameQualityEvaluator.bitmapToBoundedJpegBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · build_tender_cases.build (cognitive 19) · ×1
  • build_tender_cases.build (cognitive 19) eval/build_tender_cases.py:57 — build_tender_cases.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rad_dataset._get_json (cognitive 19) · ×1
  • rad_dataset._get_json (cognitive 19) REDACTED:192 — rad_dataset._get_json has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 3 (5 pts), ternaries 1 (3 pts), boolean chains 2, 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 · YoloOnnxDetector._postprocess (cognitive 19) · ×1
  • YoloOnnxDetector._postprocess (cognitive 19) infra/aws-yolo/service/detector.py:582 — YoloOnnxDetector._postprocess has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 1 (2 pts), 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 · evaluate.judge (cognitive 19) · ×1
  • evaluate.judge (cognitive 19) ml/classifier/evaluate.py:74 — evaluate.judge has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate.markdown (cognitive 19) · ×1
  • evaluate.markdown (cognitive 19) ml/detector/evaluate.py:235 — evaluate.markdown has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (7 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · prepare.alvaro (cognitive 19) · ×1
  • prepare.alvaro (cognitive 19) REDACTED:312 — prepare.alvaro has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (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 · crossingTurns (cognitive 19) · ×1
  • crossingTurns (cognitive 19) infra/aws-central/tools/build-street-index.mjs:489 — crossingTurns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createAddressModel.readBack (cognitive 19) · ×1
  • createAddressModel.readBack (cognitive 19) infra/aws-central/tools/build-street-index.mjs:997 — createAddressModel.readBack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 5). Of this number, 18 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · returnedPairs (cognitive 19) · ×1
  • returnedPairs (cognitive 19) infra/aws-central/tools/india-ward-runtime.mjs:198 — returnedPairs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshotOne (cognitive 19) · ×1
  • snapshotOne (cognitive 19) infra/aws-central/tools/snapshot-india-wards.mjs:1049 — snapshotOne has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 3, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shadowScreenCurve (cognitive 19) · ×1
  • shadowScreenCurve (cognitive 19) infra/aws-central/service/health/rules.mjs:169 — shadowScreenCurve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 5 (7 pts), boolean chains 3, loops 2 (nesting depth added 5). Of this number, 18 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ward-tenders.spellingDistance (cognitive 18) · ×1
  • ward-tenders.spellingDistance (cognitive 18) infra/aws-central/service/ward-tenders.mjs:138 — ward-tenders.spellingDistance has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ward-tenders.placesOf (cognitive 18) · ×1
  • ward-tenders.placesOf (cognitive 18) infra/aws-central/service/ward-tenders.mjs:452 — ward-tenders.placesOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dynamo-repository.createDynamoRepository.takeVisionQuota (cognitive 18) · ×1
  • dynamo-repository.createDynamoRepository.takeVisionQuota (cognitive 18) infra/aws-central/service/dynamo-repository.mjs:218 — dynamo-repository.createDynamoRepository.takeVisionQuota has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local-address.search · ×1
  • local-address.search::visit (cognitive 18) infra/aws-central/service/local-address.mjs:277 — local-address.search::visit has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (local-address.search) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · snapshot-india-wards.download (cognitive 18) · ×1
  • snapshot-india-wards.download (cognitive 18) infra/aws-central/tools/snapshot-india-wards.mjs:582 — snapshot-india-wards.download has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshot-india-wards.boxOfRings (cognitive 18) · ×1
  • snapshot-india-wards.boxOfRings (cognitive 18) infra/aws-central/tools/snapshot-india-wards.mjs:787 — snapshot-india-wards.boxOfRings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshot-india-wards.stateBox (cognitive 18) · ×1
  • snapshot-india-wards.stateBox (cognitive 18) infra/aws-central/tools/snapshot-india-wards.mjs:809 — snapshot-india-wards.stateBox has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.prepareSharedDetection (cognitive 18) · ×1
  • index.prepareSharedDetection (cognitive 18) server/src/index.js:1625 — index.prepareSharedDetection has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 6, boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.addressTokens (cognitive 18) · ×1
  • index.addressTokens (cognitive 18) server/src/index.js:2946 — index.addressTokens has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 2 (7 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 · index.candidateHasSpecificRoadIdentity (cognitive 18) · ×1
  • index.candidateHasSpecificRoadIdentity (cognitive 18) server/src/index.js:3231 — index.candidateHasSpecificRoadIdentity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, 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 · NativeCaptureInterlock.evaluate (cognitive 18) · ×1
  • NativeCaptureInterlock.evaluate (cognitive 18) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeCaptureInterlock.kt:38 — NativeCaptureInterlock.evaluate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 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 · NativeOutboxKeysetPager.collect (cognitive 18) · ×1
  • NativeOutboxKeysetPager.collect (cognitive 18) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/NativeOutboxKeysetPager.kt:24 — NativeOutboxKeysetPager.collect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · exhaustive_video_eval.require_private_artifact_root (cognitive 18) · ×1
  • exhaustive_video_eval.require_private_artifact_root (cognitive 18) eval/exhaustive_video_eval.py:564 — exhaustive_video_eval.require_private_artifact_root has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 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 · rad_dataset.parse_data_yaml (cognitive 18) · ×1
  • rad_dataset.parse_data_yaml (cognitive 18) REDACTED:545 — rad_dataset.parse_data_yaml has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, error handling 2, 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 · extract_frames.main (cognitive 18) · ×1
  • extract_frames.main (cognitive 18) ml/classifier/extract_frames.py:68 — extract_frames.main has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (6 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · prepare.rome (cognitive 18) · ×1
  • prepare.rome (cognitive 18) REDACTED:260 — prepare.rome has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parity.validate_runtime_verdict (cognitive 18) · ×1
  • parity.validate_runtime_verdict (cognitive 18) ml/yolo/parity.py:151 — parity.validate_runtime_verdict has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 9. To reduce it, name the conditions: bind each compound test to a 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 · createDynamoRepository.takeVisionQuota (cognitive 18) · ×1
  • createDynamoRepository.takeVisionQuota (cognitive 18) infra/aws-central/service/dynamo-repository.mjs:218 — createDynamoRepository.takeVisionQuota has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dynamo-repository.createDynamoRepository.impact (cognitive 17) · ×1
  • dynamo-repository.createDynamoRepository.impact (cognitive 17) infra/aws-central/service/dynamo-repository.mjs:644 — dynamo-repository.createDynamoRepository.impact has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 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 · local-ownership.openOwnershipBundle (cognitive 17) · ×1
  • local-ownership.openOwnershipBundle (cognitive 17) infra/aws-central/service/local-ownership.mjs:49 — local-ownership.openOwnershipBundle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, loops 2, ternaries 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 · local-address.indexStreets · ×1
  • local-address.indexStreets::file (cognitive 17) infra/aws-central/service/local-address.mjs:143 — local-address.indexStreets::file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local-address.createLocalAddress.tileOf (cognitive 17) · ×1
  • local-address.createLocalAddress.tileOf (cognitive 17) infra/aws-central/service/local-address.mjs:384 — local-address.createLocalAddress.tileOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 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 · snapshot-india-wards.parseKml (cognitive 17) · ×1
  • snapshot-india-wards.parseKml (cognitive 17) infra/aws-central/tools/snapshot-india-wards.mjs:664 — snapshot-india-wards.parseKml has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (7 pts) (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 · ownership-bundle-writer.createOwnershipWriter.finish (cognitive 17) · ×1
  • ownership-bundle-writer.createOwnershipWriter.finish (cognitive 17) infra/aws-central/tools/ownership-bundle-writer.mjs:279 — ownership-bundle-writer.createOwnershipWriter.finish has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · build-street-index.streetFromFeature (cognitive 17) · ×1
  • build-street-index.streetFromFeature (cognitive 17) infra/aws-central/tools/build-street-index.mjs:189 — build-street-index.streetFromFeature has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 4 (5 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 · build-street-index.createAddressModel.nearestPostcode (cognitive 17) · ×1
  • build-street-index.createAddressModel.nearestPostcode (cognitive 17) infra/aws-central/tools/build-street-index.mjs:908 — build-street-index.createAddressModel.nearestPostcode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-local-address.tenders · ×1
  • verify-local-address.tenders::outcome (cognitive 17) infra/aws-central/tools/verify-local-address.mjs:294 — verify-local-address.tenders::outcome has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (9 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.
D2 · Cognitive Complexity · index.captureProvenance (cognitive 17) · ×1
  • index.captureProvenance (cognitive 17) server/src/index.js:158 — index.captureProvenance has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 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 · index.callHttpYolo (cognitive 17) · ×1
  • index.callHttpYolo (cognitive 17) server/src/index.js:1419 — index.callHttpYolo has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 2 (3 pts), error handling 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 · index.tenderResult (cognitive 17) · ×1
  • index.tenderResult (cognitive 17) server/src/index.js:3364 — index.tenderResult has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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 · CentralServiceClient.resolveTender (cognitive 17) · ×1
  • CentralServiceClient.resolveTender (cognitive 17) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/CentralServiceClient.kt:177 — CentralServiceClient.resolveTender has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, match/switch 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 · FrameQualityEvaluator.scoreRoadPixels (cognitive 17) · ×1
  • FrameQualityEvaluator.scoreRoadPixels (cognitive 17) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/FrameQualityEvaluator.kt:156 — FrameQualityEvaluator.scoreRoadPixels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (4 pts), boolean chains 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 · run_eval.grouped_metrics (cognitive 17) · ×1
  • run_eval.grouped_metrics (cognitive 17) REDACTED:517 — run_eval.grouped_metrics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (5 pts), boolean chains 4, 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 · prepare.irdd (cognitive 17) · ×1
  • prepare.irdd (cognitive 17) REDACTED:152 — prepare.irdd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 1 (4 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 · evaluate._load_predictions (cognitive 17) · ×1
  • evaluate._load_predictions (cognitive 17) ml/yolo/evaluate.py:518 — evaluate._load_predictions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · nearbyPothole (cognitive 17) · ×1
  • nearbyPothole (cognitive 17) server/src/index.js:1972 — nearbyPothole has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4, boolean chains 3, 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 · handleMap (cognitive 17) · ×1
  • handleMap (cognitive 17) server/src/index.js:3506 — handleMap has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (4 pts), ternaries 2 (nesting depth added 1). 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.
D2 · Cognitive Complexity · createKgisClient.verdict (cognitive 17) · ×1
  • createKgisClient.verdict (cognitive 17) infra/aws-central/service/geolocation.mjs:328 — createKgisClient.verdict has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 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 · createLocalAddress.tileOf (cognitive 17) · ×1
  • createLocalAddress.tileOf (cognitive 17) infra/aws-central/service/local-address.mjs:384 — createLocalAddress.tileOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 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 · createAddressModel.nearestPostcode (cognitive 17) · ×1
  • createAddressModel.nearestPostcode (cognitive 17) infra/aws-central/tools/build-street-index.mjs:908 — createAddressModel.nearestPostcode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOwnershipWriter.finish (cognitive 17) · ×1
  • createOwnershipWriter.finish (cognitive 17) infra/aws-central/tools/ownership-bundle-writer.mjs:279 — createOwnershipWriter.finish has cognitive complexity 17 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · judgeIndiaWardCanary (cognitive 17) · ×1
  • judgeIndiaWardCanary (cognitive 17) infra/aws-central/service/health/rules.mjs:478 — judgeIndiaWardCanary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 2). 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: 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 · india-ward-coverage.gazetteerOf (cognitive 16) · ×1
  • india-ward-coverage.gazetteerOf (cognitive 16) infra/aws-central/tools/india-ward-coverage.mjs:89 — india-ward-coverage.gazetteerOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-local-address.read (cognitive 16) · ×1
  • verify-local-address.read (cognitive 16) infra/aws-central/tools/verify-local-address.mjs:179 — verify-local-address.read has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a 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 · check-i18n.sliceObject (cognitive 16) · ×1
  • check-i18n.sliceObject (cognitive 16) tools/harness/check-i18n.mjs:19 — check-i18n.sliceObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveModePlugin.getStatus (cognitive 16) · ×1
  • DriveModePlugin.getStatus (cognitive 16) android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/DriveModePlugin.kt:309 — DriveModePlugin.getStatus has cognitive complexity 16 (threshold 15). Drivers by points: loops 2 (6 pts), match/switch 2 (5 pts), if/else 4, 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 · DriveModePlugin.deleteFootage (cognitive 16) · ×1
  • DriveModePlugin.deleteFootage (cognitive 16) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1548 — DriveModePlugin.deleteFootage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, error handling 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 · materialize_private_eval.copy_verified_frames (cognitive 16) · ×1
  • materialize_private_eval.copy_verified_frames (cognitive 16) eval/materialize_private_eval.py:552 — materialize_private_eval.copy_verified_frames has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 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 · private_drive_corpus.discover_sources (cognitive 16) · ×1
  • private_drive_corpus.discover_sources (cognitive 16) eval/private_drive_corpus.py:467 — private_drive_corpus.discover_sources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · datasets.attain (cognitive 16) · ×1
  • datasets.attain (cognitive 16) ml/classifier/datasets.py:226 — datasets.attain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · permission-button.main (cognitive 16) · ×1
  • permission-button.main (cognitive 16) tools/harness/permission-button.py:29 — permission-button.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 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 · snapshotWards (cognitive 16) · ×1
  • snapshotWards (cognitive 16) infra/aws-central/tools/build-karnataka-geometry.mjs:196 — snapshotWards has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 3, other 3, ternaries 3. None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 200, 223, 207). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:785 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:785-837 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1099-1145 — These two members are one piece of code written twice and then edited apart: 47 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 (61 corresponding lines) · ×1
  • Edited copy of a member (61 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:552 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveCameraManager.kt:552-626 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRtspFrameSource.kt:453-513 — These two members are one piece of code written twice and then edited apart: 61 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 (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:41 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:41-98 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt:100-148 — These two members are one piece of code written twice and then edited apart: 49 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 (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) REDACTED:461 — REDACTED:461-481 | REDACTED:195-223 — These two members are one piece of code written twice and then edited apart: 21 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 (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:745 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:745-782 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1066-1096 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) REDACTED:178 — REDACTED:178-197 | REDACTED:261-279 | REDACTED:284-308 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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 (88 corresponding lines) · ×1
  • Edited copy of a member (88 corresponding lines) eval/materialize_private_eval.py:149 — eval/materialize_private_eval.py:149-236 | eval/materialize_private_eval.py:241-336 — These two members are one piece of code written twice and then edited apart: 88 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 (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) eval/historical_detection_contracts.py:126 — eval/historical_detection_contracts.py:126-150 | REDACTED:313-346 — These two members are one piece of code written twice and then edited apart: 25 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) infra/aws-yolo/service/detector.py:374 — infra/aws-yolo/service/detector.py:374-397 | ml/yolo/common.py:230-256 — 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 copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:377 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:377-405 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/DriveForegroundService.kt:407-445 — These two members are one piece of code written twice and then edited apart: 29 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 (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) ml/classifier/evaluate.py:42 — ml/classifier/evaluate.py:42-47 | ml/classifier/train_probe.py:31-36 — These two members are one piece of code written twice and then edited apart: 6 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 (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) ml/yolo/evaluate.py:108 — ml/yolo/evaluate.py:108-120 | ml/yolo/parity.py:327-341 — 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 · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) eval/private_release_gate.py:458 — eval/private_release_gate.py:458-468 | REDACTED:54-62 | eval/run_rad_eval.py:1103-1113 | REDACTED:37-47 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:361 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDeduplicationEngine.kt:361-371 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:1630-1639 — These two members are one piece of code written twice and then edited apart: 10 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 (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:214 — android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:214-244 | android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:2195-2226 — 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 (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:287 — android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:287-306 | android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:329-348 — 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 `android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/UploadWorker.kt:287` 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 (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) eval/historical_detection_contracts.py:140 — eval/historical_detection_contracts.py:140-150 | REDACTED:334-346 — 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 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 (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) ml/yolo/release.py:70 — ml/yolo/release.py:70-82 | ml/yolo/release.py:178-189 — 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 · Near-duplicate member pair (47 shared lines) · ×1
  • Near-duplicate member pair (47 shared lines) tools/pull-bihar-road-tenders.py:334 — tools/pull-bihar-road-tenders.py:334-507 | tools/pull-telangana-road-tenders.py:409-511 — These two members are variants of one another: 47 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 · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) tools/state_pack_tools.py:1079 — tools/state_pack_tools.py:1079-1149 | tools/state_pack_tools.py:1158-1269 | tools/state_pack_tools.py:1278-1348 | tools/state_pack_tools.py:1357-1443 | tools/state_pack_tools.py:1452-1539 | tools/state_pack_tools.py:1548-1636 | tools/state_pack_tools.py:1976-2140 — These 7 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 7 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 7 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) tools/build-andhra-pradesh-coverage.py:99 — tools/build-andhra-pradesh-coverage.py:99-124 | tools/build-metro-coverage.py:57-79 | tools/build-punjab-coverage.py:94-119 | tools/build-tamil-nadu-coverage.py:107-132 | tools/build-telangana-coverage.py:100-125 | tools/statewide_boundary_builder.py:78-107 — These 6 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 6 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 6 times.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) tools/build-gepnic-road-notice-packs.py:235 — tools/build-gepnic-road-notice-packs.py:235-294 | tools/build-gepnic-road-notice-packs.py:395-449 — These two members are one piece of code written twice and then edited apart: 55 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 (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) tools/build-maharashtra-coverage.py:70 — tools/build-maharashtra-coverage.py:70-110 | tools/build-west-bengal-coverage.py:81-130 — These two members are one piece of code written twice and then edited apart: 41 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, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) tools/pull-chhattisgarh-chips-road-tenders.py:425 — tools/pull-chhattisgarh-chips-road-tenders.py:425-457 | tools/pull-gujarat-nprocure-road-tenders.py:305-328 | tools/pull-lakshadweep-road-tenders.py:213-241 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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 (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) tools/cloud/ci.py:85 — tools/cloud/ci.py:85-104 | tools/cloud/eval_prompt.py:77-103 — 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 copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) tools/build-gepnic-road-notice-packs.py:1027 — tools/build-gepnic-road-notice-packs.py:1027-1042 | tools/build-highway-contract-packs.py:481-496 | tools/build-pmgsy-road-agreement-packs.py:545-559 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 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 copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) tools/build-gepnic-road-notice-packs.py:1046 — tools/build-gepnic-road-notice-packs.py:1046-1066 | tools/build-highway-contract-packs.py:500-516 | tools/build-pmgsy-road-agreement-packs.py:563-580 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 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 (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) tools/build-gepnic-road-notice-packs.py:1070 — tools/build-gepnic-road-notice-packs.py:1070-1087 | tools/build-pmgsy-road-agreement-packs.py:584-597 — 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 (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) tools/build-top50-coverage.py:241 — tools/build-top50-coverage.py:241-249 | tools/statewide_boundary_builder.py:60-74 — 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.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) tools/pull-gujarat-nprocure-road-tenders.py:103 — tools/pull-gujarat-nprocure-road-tenders.py:103-110 | tools/pull-kppp.py:104-112 — 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 copies of one member (7 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 4+ corresponding lines) tools/build-andhra-pradesh-coverage.py:128 — tools/build-andhra-pradesh-coverage.py:128-132 | tools/build-delhi-coverage.py:124-127 | tools/build-metro-coverage.py:125-128 | tools/build-punjab-coverage.py:123-127 | tools/build-tamil-nadu-coverage.py:136-140 | tools/build-telangana-coverage.py:129-133 | tools/statewide_boundary_builder.py:111-115 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 4 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (37–38 lines × 3) · ×1
  • Duplicated block (37–38 lines × 3) tools/state_pack_tools.py:1372 — tools/state_pack_tools.py:1372-1409 | tools/state_pack_tools.py:1467-1504 | tools/state_pack_tools.py:1563-1599 — 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 `tools/state_pack_tools.py:1372` 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 (29–33 lines × 2) · ×1
  • Duplicated block (29–33 lines × 2) tools/build-gepnic-road-notice-packs.py:266 — tools/build-gepnic-road-notice-packs.py:266-294 | tools/build-gepnic-road-notice-packs.py:417-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (28 lines × 4) · ×1
  • Duplicated block (28 lines × 4) tools/build-andhra-pradesh-coverage.py:182 — tools/build-andhra-pradesh-coverage.py:182-209 | tools/build-punjab-coverage.py:177-204 | tools/build-tamil-nadu-coverage.py:190-217 | tools/build-telangana-coverage.py:183-210 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23–26 lines × 3) · ×1
  • Duplicated block (23–26 lines × 3) tools/state_pack_tools.py:1117 — tools/state_pack_tools.py:1117-1140 | tools/state_pack_tools.py:1228-1253 | tools/state_pack_tools.py:1309-1331 — 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 `tools/state_pack_tools.py:1117` 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 (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) tools/build-andhra-pradesh-coverage.py:260 — tools/build-andhra-pradesh-coverage.py:260-280 | tools/build-tamil-nadu-coverage.py:269-289 | tools/build-telangana-coverage.py:263-283 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-tamil-nadu-coverage.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) tools/build-maharashtra-coverage.py:70 — tools/build-maharashtra-coverage.py:70-90 | tools/build-west-bengal-coverage.py:81-101 — before extracting anything, compare `tools/build-maharashtra-coverage.py` and `tools/build-west-bengal-coverage.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) tools/pull-bihar-road-tenders.py:421 — tools/pull-bihar-road-tenders.py:421-440 | tools/pull-telangana-road-tenders.py:444-464 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-bihar-road-tenders.py:421` 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 (23 lines × 4) · ×1
  • Duplicated block (23 lines × 4) tools/build-andhra-pradesh-coverage.py:102 — tools/build-andhra-pradesh-coverage.py:102-124 | tools/build-punjab-coverage.py:97-119 | tools/build-tamil-nadu-coverage.py:110-132 | tools/build-telangana-coverage.py:103-125 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) tools/build-delhi-coverage.py:82 — tools/build-delhi-coverage.py:82-118 | tools/build-metro-coverage.py:83-119 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-delhi-coverage.py:82` 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 first that the copies are not typed on the same thing: the declarations holding them bind `geometry` to `dict` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) tools/state_pack_tools.py:1815 — tools/state_pack_tools.py:1815-1829 | tools/state_pack_tools.py:1894-1910 — 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 `tools/state_pack_tools.py:1815` 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 (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) tools/build-andhra-pradesh-coverage.py:80 — tools/build-andhra-pradesh-coverage.py:80-95 | tools/build-punjab-coverage.py:76-90 | tools/build-tamil-nadu-coverage.py:88-103 | tools/build-telangana-coverage.py:81-96 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) tools/state_pack_tools.py:1411 — tools/state_pack_tools.py:1411-1426 | tools/state_pack_tools.py:1506-1521 | tools/state_pack_tools.py:1602-1617 — 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 `tools/state_pack_tools.py:1411` 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 (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) tools/build-gepnic-road-notice-packs.py:153 — tools/build-gepnic-road-notice-packs.py:153-167 | tools/build-highway-contract-packs.py:149-163 | tools/build-pmgsy-road-agreement-packs.py:176-190 | tools/pull-pmgsy-road-agreements.py:460-474 — 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 all 4 call sites, so a change lands once. 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 (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) tools/build-gepnic-road-notice-packs.py:1070 — tools/build-gepnic-road-notice-packs.py:1070-1084 | tools/build-highway-contract-packs.py:520-534 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) tools/build-maharashtra-coverage.py:154 — tools/build-maharashtra-coverage.py:154-169 | tools/build-west-bengal-coverage.py:169-184 — before extracting anything, compare `tools/build-maharashtra-coverage.py` and `tools/build-west-bengal-coverage.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 6) · ×1
  • Duplicated block (13–14 lines × 6) tools/state_pack_tools.py:1079 — tools/state_pack_tools.py:1079-1091 | tools/state_pack_tools.py:1158-1170 | tools/state_pack_tools.py:1278-1290 | tools/state_pack_tools.py:1357-1370 | tools/state_pack_tools.py:1452-1465 | tools/state_pack_tools.py:1548-1561 — all 6 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 `tools/state_pack_tools.py:1079` 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 (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) tools/build-andhra-pradesh-coverage.py:259 — tools/build-andhra-pradesh-coverage.py:259-272 | tools/build-punjab-coverage.py:256-269 | tools/build-tamil-nadu-coverage.py:268-281 | tools/build-telangana-coverage.py:262-275 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) tools/pull-chhattisgarh-chips-road-tenders.py:444 — tools/pull-chhattisgarh-chips-road-tenders.py:444-457 | tools/pull-gujarat-nprocure-road-tenders.py:316-328 | tools/pull-lakshadweep-road-tenders.py:228-241 — before extracting anything, compare `tools/pull-chhattisgarh-chips-road-tenders.py` and `tools/pull-gujarat-nprocure-road-tenders.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-chhattisgarh-chips-road-tenders.py:444` 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 `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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) tools/build-gepnic-road-notice-packs.py:1074 — tools/build-gepnic-road-notice-packs.py:1074-1087 | tools/build-pmgsy-road-agreement-packs.py:586-597 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-gepnic-road-notice-packs.py:1074` 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–14 lines × 2) · ×1
  • Duplicated block (9–14 lines × 2) tools/build-maharashtra-coverage.py:90 — tools/build-maharashtra-coverage.py:90-98 | tools/build-west-bengal-coverage.py:104-117 — before extracting anything, compare `tools/build-maharashtra-coverage.py` and `tools/build-west-bengal-coverage.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-maharashtra-coverage.py:90` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/build-west-bengal-coverage.py:102` calls `geometry_digest`, `BuildError` and `tools/build-maharashtra-coverage.py:90` 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 (11–12 lines × 7) · ×1
  • Duplicated block (11–12 lines × 7) tools/state_pack_tools.py:1081 — tools/state_pack_tools.py:1081-1091 | tools/state_pack_tools.py:1160-1170 | tools/state_pack_tools.py:1280-1290 | tools/state_pack_tools.py:1359-1370 | tools/state_pack_tools.py:1454-1465 | tools/state_pack_tools.py:1550-1561 | tools/state_pack_tools.py:1978-1988 — all 7 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 `tools/state_pack_tools.py:1081` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) tools/build-andhra-pradesh-coverage.py:148 — tools/build-andhra-pradesh-coverage.py:148-159 | tools/build-punjab-coverage.py:143-154 | tools/build-tamil-nadu-coverage.py:156-167 | tools/build-telangana-coverage.py:149-160 | tools/statewide_boundary_builder.py:131-142 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) tools/pull-emarg-road-contracts.py:422 — tools/pull-emarg-road-contracts.py:422-433 | tools/pull-pmgsy-road-agreements.py:573-584 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×1
  • Duplicated block (11 lines × 2) tools/build-gepnic-road-notice-packs.py:1032 — tools/build-gepnic-road-notice-packs.py:1032-1042 | tools/build-pmgsy-road-agreement-packs.py:549-559 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) tools/build-gepnic-road-notice-packs.py:159 — tools/build-gepnic-road-notice-packs.py:159-168 | tools/build-highway-contract-packs.py:155-164 | tools/build-pmgsy-road-agreement-packs.py:182-191 | tools/pull-pmgsy-road-agreements.py:466-475 | tools/state_pack_tools.py:867-876 — 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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-gepnic-road-notice-packs.py:159` 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 (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) tools/build-andhra-pradesh-coverage.py:277 — tools/build-andhra-pradesh-coverage.py:277-286 | tools/build-punjab-coverage.py:275-284 | tools/build-tamil-nadu-coverage.py:286-295 | tools/build-telangana-coverage.py:280-289 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) tools/build-gepnic-road-notice-packs.py:1072 — tools/build-gepnic-road-notice-packs.py:1072-1084 | tools/build-highway-contract-packs.py:522-534 | tools/build-pmgsy-road-agreement-packs.py:585-594 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-gepnic-road-notice-packs.py:1072` 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 (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) tools/pull-bihar-road-tenders.py:373 — tools/pull-bihar-road-tenders.py:373-382 | tools/pull-telangana-road-tenders.py:431-437 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-bihar-road-tenders.py:373` 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 (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) tools/build-gepnic-road-notice-packs.py:152 — tools/build-gepnic-road-notice-packs.py:152-158 | tools/build-highway-contract-packs.py:148-154 | tools/build-pmgsy-road-agreement-packs.py:175-181 | tools/state_pack_tools.py:857-865 — 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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/build-gepnic-road-notice-packs.py:152` 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/build-gepnic-road-notice-packs.py:147` calls `_report_json`, `_manifest_json` and `tools/build-highway-contract-packs.py:144` 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 (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) tools/prune-catalog-packs.py:403 — tools/prune-catalog-packs.py:403-409 | tools/prune-catalog-packs.py:423-431 — 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 × 5) · ×1
  • Duplicated block (8 lines × 5) tools/build-andhra-pradesh-coverage.py:274 — tools/build-andhra-pradesh-coverage.py:274-281 | tools/build-punjab-coverage.py:272-279 | tools/build-tamil-nadu-coverage.py:283-290 | tools/build-telangana-coverage.py:277-284 | tools/build-top50-coverage.py:525-532 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) tools/pull-chhattisgarh-chips-road-tenders.py:446 — tools/pull-chhattisgarh-chips-road-tenders.py:446-452 | tools/pull-emarg-road-contracts.py:420-427 | tools/pull-gujarat-nprocure-road-tenders.py:317-323 | tools/pull-lakshadweep-road-tenders.py:230-236 — before extracting anything, compare `tools/pull-chhattisgarh-chips-road-tenders.py` and `tools/pull-gujarat-nprocure-road-tenders.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/pull-chhattisgarh-chips-road-tenders.py:446` 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 lines × 5) · ×1
  • Duplicated block (7 lines × 5) tools/build-andhra-pradesh-coverage.py:163 — tools/build-andhra-pradesh-coverage.py:163-169 | tools/build-punjab-coverage.py:158-164 | tools/build-tamil-nadu-coverage.py:171-177 | tools/build-telangana-coverage.py:164-170 | tools/statewide_boundary_builder.py:146-152 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (2–7 lines × 6) · ×1
  • Duplicated block (2–7 lines × 6) tools/build-andhra-pradesh-coverage.py:99 — tools/build-andhra-pradesh-coverage.py:99-105 | tools/build-metro-coverage.py:60-61 | tools/build-punjab-coverage.py:94-100 | tools/build-tamil-nadu-coverage.py:107-113 | tools/build-telangana-coverage.py:100-106 | tools/statewide_boundary_builder.py:83-84 — before extracting anything, compare `tools/build-andhra-pradesh-coverage.py` and `tools/build-punjab-coverage.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) tools/state_pack_tools.py:1594 — tools/state_pack_tools.py:1594-1600 | tools/state_pack_tools.py:1859-1864 | tools/state_pack_tools.py:1945-1950 — 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 `tools/state_pack_tools.py:1594` 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 (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) tools/build-gepnic-road-notice-packs.py:1030 — tools/build-gepnic-road-notice-packs.py:1030-1036 | tools/build-highway-contract-packs.py:484-490 | tools/build-pmgsy-road-agreement-packs.py:547-553 — 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 all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) tools/build-bihar-coverage.py:51 — tools/build-bihar-coverage.py:51-55 | tools/build-chhattisgarh-coverage.py:51-55 | tools/build-goa-coverage.py:49-53 | tools/build-karnataka-state-coverage.py:50-54 | tools/build-kerala-coverage.py:50-54 | tools/build-madhya-pradesh-coverage.py:51-55 | tools/build-odisha-coverage.py:51-55 | tools/build-rajasthan-coverage.py:51-55 | tools/build-uttar-pradesh-coverage.py:51-55 — 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 all 9 call sites, so a change lands once.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 141 plain JS — the untyped files are android-app/www/standalone.js, eval/audit_tender_coverage.mjs, eval/tender_coverage_gate.mjs, infra/aws-central/service/auth.mjs, infra/aws-central/service/canary-install.mjs, infra/aws-central/service/core.mjs (+135 more).
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (81 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (81 clone groups) android-app/www/standalone.js:8399 — 81 duplicated blocks under the repository root have copies in at least two of the sibling directories android-app, infra, ml, server, static, tools — 75 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 81 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 81 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 81 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block (1246 lines × 2 locations) · ×1
  • Duplicated block (1246 lines × 2 locations) android-app/www/standalone.js:8399 — android-app/www/standalone.js:8399 · static/standalone.js:8399 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (586 lines × 2 locations) · ×1
  • Duplicated block (586 lines × 2 locations) android-app/www/standalone.js:569 — android-app/www/standalone.js:569 · static/standalone.js:569 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (579 lines × 2 locations) · ×1
  • Duplicated block (579 lines × 2 locations) android-app/www/standalone.js:4870 — android-app/www/standalone.js:4870 · static/standalone.js:4870 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (471 lines × 2 locations) · ×1
  • Duplicated block (471 lines × 2 locations) android-app/www/standalone.js:7197 — android-app/www/standalone.js:7197 · static/standalone.js:7197 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (457 lines × 2 locations) · ×1
  • Duplicated block (457 lines × 2 locations) android-app/www/standalone.js:9964 — android-app/www/standalone.js:9964 · static/standalone.js:9964 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (411 lines × 2 locations) · ×1
  • Duplicated block (411 lines × 2 locations) android-app/www/standalone.js:6696 — android-app/www/standalone.js:6696 · static/standalone.js:6696 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (362 lines × 2 locations) · ×1
  • Duplicated block (362 lines × 2 locations) android-app/www/standalone.js:10908 — android-app/www/standalone.js:10908 · static/standalone.js:10908 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (340 lines × 2 locations) · ×1
  • Duplicated block (340 lines × 2 locations) android-app/www/standalone.js:7987 — android-app/www/standalone.js:7987 · static/standalone.js:7987 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (337 lines × 2 locations) · ×1
  • Duplicated block (337 lines × 2 locations) android-app/www/standalone.js:5946 — android-app/www/standalone.js:5946 · static/standalone.js:5946 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (329 lines × 2 locations) · ×1
  • Duplicated block (329 lines × 2 locations) android-app/www/standalone.js:11555 — android-app/www/standalone.js:11555 · static/standalone.js:11555 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (290 lines × 2 locations) · ×1
  • Duplicated block (290 lines × 2 locations) android-app/www/standalone.js:13182 — android-app/www/standalone.js:13182 · static/standalone.js:13182 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (217 lines × 2 locations) · ×1
  • Duplicated block (217 lines × 2 locations) android-app/www/standalone.js:11930 — android-app/www/standalone.js:11930 · static/standalone.js:11930 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (213 lines × 2 locations) · ×1
  • Duplicated block (213 lines × 2 locations) android-app/www/standalone.js:279 — android-app/www/standalone.js:279 · static/standalone.js:279 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (210 lines × 2 locations) · ×1
  • Duplicated block (210 lines × 2 locations) android-app/www/standalone.js:10647 — android-app/www/standalone.js:10647 · static/standalone.js:10647 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (208 lines × 2 locations) · ×1
  • Duplicated block (208 lines × 2 locations) android-app/www/standalone.js:12644 — android-app/www/standalone.js:12644 · static/standalone.js:12644 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (200 lines × 2 locations) · ×1
  • Duplicated block (200 lines × 2 locations) android-app/www/standalone.js:4143 — android-app/www/standalone.js:4143 · static/standalone.js:4143 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (173 lines × 2 locations) · ×1
  • Duplicated block (173 lines × 2 locations) android-app/www/standalone.js:1713 — android-app/www/standalone.js:1713 · static/standalone.js:1713 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (168 lines × 2 locations) · ×1
  • Duplicated block (168 lines × 2 locations) android-app/www/standalone.js:12222 — android-app/www/standalone.js:12222 · static/standalone.js:12222 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (167 lines × 2 locations) · ×1
  • Duplicated block (167 lines × 2 locations) android-app/www/standalone.js:5623 — android-app/www/standalone.js:5623 · static/standalone.js:5623 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (143 lines × 2 locations) · ×1
  • Duplicated block (143 lines × 2 locations) android-app/www/standalone.js:1907 — android-app/www/standalone.js:1907 · static/standalone.js:1907 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (140 lines × 2 locations) · ×1
  • Duplicated block (140 lines × 2 locations) android-app/www/standalone.js:3585 — android-app/www/standalone.js:3585 · static/standalone.js:3585 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (138 lines × 2 locations) · ×1
  • Duplicated block (138 lines × 2 locations) android-app/www/standalone.js:6445 — android-app/www/standalone.js:6445 · static/standalone.js:6445 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (116 lines × 2 locations) · ×1
  • Duplicated block (116 lines × 2 locations) android-app/www/standalone.js:10509 — android-app/www/standalone.js:10509 · static/standalone.js:10509 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (113 lines × 2 locations) · ×1
  • Duplicated block (113 lines × 2 locations) android-app/www/standalone.js:2415 — android-app/www/standalone.js:2415 · static/standalone.js:2415 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (103 lines × 2 locations) · ×1
  • Duplicated block (103 lines × 2 locations) android-app/www/standalone.js:2539 — android-app/www/standalone.js:2539 · static/standalone.js:2539 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (98 lines × 2 locations) · ×1
  • Duplicated block (98 lines × 2 locations) android-app/www/standalone.js:4426 — android-app/www/standalone.js:4426 · static/standalone.js:4426 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (95 lines × 2 locations) · ×1
  • Duplicated block (95 lines × 2 locations) android-app/www/standalone.js:2110 — android-app/www/standalone.js:2110 · static/standalone.js:2110 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (82 lines × 2 locations) · ×1
  • Duplicated block (82 lines × 2 locations) android-app/www/standalone.js:12469 — android-app/www/standalone.js:12469 · static/standalone.js:12469 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (80 lines × 2 locations) · ×1
  • Duplicated block (80 lines × 2 locations) android-app/www/standalone.js:4027 — android-app/www/standalone.js:4027 · static/standalone.js:4027 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (73 lines × 2 locations) · ×1
  • Duplicated block (73 lines × 2 locations) android-app/www/standalone.js:1629 — android-app/www/standalone.js:1629 · static/standalone.js:1629 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function createAddressModel (cyclomatic 107, cognitive 158) · ×1
  • Complex function createAddressModel (cyclomatic 107, cognitive 158) infra/aws-central/tools/build-street-index.mjs:776 — createAddressModel has cyclomatic complexity 107 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolve (cyclomatic 71, cognitive 95) · ×1
  • Complex function resolve (cyclomatic 71, cognitive 95) infra/aws-central/service/geolocation.mjs:410 — resolve has cyclomatic complexity 71 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildRegion (cyclomatic 67, cognitive 128) · ×1
  • Complex function buildRegion (cyclomatic 67, cognitive 128) infra/aws-central/tools/build-street-index.mjs:1155 — buildRegion has cyclomatic complexity 67 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function wardMarkersIn (cyclomatic 63, cognitive 81) · ×1
  • Complex function wardMarkersIn (cyclomatic 63, cognitive 81) infra/aws-central/service/india-ward-tenders.mjs:95 — wardMarkersIn has cyclomatic complexity 63 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this 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 · android-app/www/standalone.js · ×1
  • android-app/www/standalone.js: 12980 lines of code android-app/www/standalone.js:1 — android-app/www/standalone.js has 12980 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 · static/standalone.js · ×1
  • static/standalone.js: 12980 lines of code static/standalone.js:1 — static/standalone.js has 12980 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 · server/src/index.js · ×1
  • server/src/index.js: 3802 lines of code server/src/index.js:1 — server/src/index.js has 3802 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 · infra/aws-central/tools/build-street-index.mjs · ×1
  • infra/aws-central/tools/build-street-index.mjs: 1531 lines of code infra/aws-central/tools/build-street-index.mjs:1 — infra/aws-central/tools/build-street-index.mjs has 1531 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 · infra/aws-central/service/core.mjs · ×1
  • infra/aws-central/service/core.mjs: 1325 lines of code infra/aws-central/service/core.mjs:1 — infra/aws-central/service/core.mjs has 1325 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 · infra/aws-central/tools/snapshot-india-wards.mjs · ×1
  • infra/aws-central/tools/snapshot-india-wards.mjs: 1159 lines of code infra/aws-central/tools/snapshot-india-wards.mjs:1 — infra/aws-central/tools/snapshot-india-wards.mjs has 1159 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 · infra/aws-central/service/detectors.mjs · ×1
  • infra/aws-central/service/detectors.mjs: 725 lines of code infra/aws-central/service/detectors.mjs:1 — infra/aws-central/service/detectors.mjs has 725 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 · infra/aws-central/service/dynamo-repository.mjs · ×1
  • infra/aws-central/service/dynamo-repository.mjs: 653 lines of code infra/aws-central/service/dynamo-repository.mjs:1 — infra/aws-central/service/dynamo-repository.mjs has 653 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 · infra/aws-central/service/ward-tenders.mjs · ×1
  • infra/aws-central/service/ward-tenders.mjs: 653 lines of code infra/aws-central/service/ward-tenders.mjs:1 — infra/aws-central/service/ward-tenders.mjs has 653 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 · infra/aws-central/service/geolocation.mjs · ×1
  • infra/aws-central/service/geolocation.mjs: 573 lines of code infra/aws-central/service/geolocation.mjs:1 — infra/aws-central/service/geolocation.mjs has 573 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 · infra/aws-central/tools/india-ward-coverage-report.mjs · ×1
  • infra/aws-central/tools/india-ward-coverage-report.mjs: 571 lines of code infra/aws-central/tools/india-ward-coverage-report.mjs:1 — infra/aws-central/tools/india-ward-coverage-report.mjs has 571 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 · infra/aws-central/service/local-address.mjs · ×1
  • infra/aws-central/service/local-address.mjs: 491 lines of code infra/aws-central/service/local-address.mjs:1 — infra/aws-central/service/local-address.mjs has 491 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · infra/aws-central/service/health/rules.mjs · ×1
  • infra/aws-central/service/health/rules.mjs: 487 lines of code infra/aws-central/service/health/rules.mjs:1 — infra/aws-central/service/health/rules.mjs has 487 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 · infra/aws-central/tools/build-karnataka-geometry.mjs · ×1
  • infra/aws-central/tools/build-karnataka-geometry.mjs: 444 lines of code infra/aws-central/tools/build-karnataka-geometry.mjs:1 — infra/aws-central/tools/build-karnataka-geometry.mjs has 444 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 · infra/aws-central/tools/verify-local-ownership.mjs · ×1
  • infra/aws-central/tools/verify-local-ownership.mjs: 405 lines of code infra/aws-central/tools/verify-local-ownership.mjs:1 — infra/aws-central/tools/verify-local-ownership.mjs has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint or typecheck script · ×1
  • No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~413 LoC) · ×1
  • Dead file (~413 LoC) tools/cloud/eval/prompt_eval.mjs — no import path from any entry point (65 application, 32 tooling, 60 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~25 LoC) · ×1
  • Dead file (~25 LoC) ml/detector/lambda/handler.mjs — no import path from any entry point (65 application, 32 tooling, 60 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~24 LoC) · ×1
  • Dead file (~24 LoC) ml/classifier/lambda/handler.mjs — no import path from any entry point (65 application, 32 tooling, 60 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked server/package.json:16 — server/package.json declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Minor — 123 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate infra/aws-central/service/core.mjs:507 — `!Array.isArray(body.images) || body.images.length !== 1` appears character-identically in 2 files — infra/aws-central/service/core.mjs, ml/classifier/lambda/service.mjs. 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 infra/aws-central/service/geolocation.mjs:89 — `!data || typeof data !== "object" || data.error` appears character-identically in 2 files — infra/aws-central/service/geolocation.mjs, infra/aws-central/tools/kgis-layers.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/harness/run.mjs:81 — `!file.startsWith(root) || !existsSync(file)` appears character-identically in 2 files — tools/harness/run.mjs, tools/harness/serve-docs.mjs. 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 infra/aws-central/tools/build-india-localities.mjs:59 — `Number(left[1]) - Number(right[1]) || Number(left[2]) - Number(right[2])` appears character-identically in 4 files — infra/aws-central/tools/build-india-localities.mjs, infra/aws-central/tools/build-karnataka-geometry.mjs, REDACTED, infra/aws-central/tools/snapshot-india-wards.mjs. 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 infra/aws-central/service/core.mjs:1054 — `Number.isFinite(lat) && Number.isFinite(lng)` appears character-identically in 2 files — infra/aws-central/service/core.mjs, infra/aws-central/service/geo-cache.mjs. 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 infra/aws-central/service/geolocation.mjs:106 — `address.city || address.town || address.municipality` appears character-identically in 2 files — infra/aws-central/service/geolocation.mjs, infra/aws-central/tools/verify-local-address.mjs. 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 infra/aws-central/service/geolocation.mjs:103 — `address.road || address.pedestrian || address.residential || address.footway` appears character-identically in 2 files — infra/aws-central/service/geolocation.mjs, infra/aws-central/tools/verify-local-address.mjs. 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 infra/aws-central/tools/build-karnataka-geometry.mjs:75 — `fs.existsSync(file) && fs.readFileSync(file).equals(bytes)` appears character-identically in 2 files — infra/aws-central/tools/build-karnataka-geometry.mjs, infra/aws-central/tools/snapshot-india-wards.mjs. 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 infra/aws-central/service/core.mjs:757 — `jurisdiction.address_parts?.localities || []` appears character-identically in 3 files — infra/aws-central/service/core.mjs, infra/aws-central/tools/verify-local-address.mjs, infra/aws-central/tools/ward-tender-experiment.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/harness/run.mjs:77 — `path === "/web-app" || path.startsWith("/web-app/")` appears character-identically in 2 files — tools/harness/run.mjs, tools/harness/serve-docs.mjs. 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 infra/aws-central/tools/production-health.mjs:36 — `process.env.API_URL || "https://ffjvg34k07.execute-api.ap-south-1.amazonaws.com"` appears character-identically in 2 files — infra/aws-central/tools/production-health.mjs, infra/aws-central/tools/ward-tender-experiment.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/harness/run.mjs:86 — `types[extension] || "application/octet-stream"` appears character-identically in 2 files — tools/harness/run.mjs, tools/harness/serve-docs.mjs. 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 infra/aws-central/service/detectors.mjs:219 — `value.openai_api_key || value.OPENAI_API_KEY || ""` appears character-identically in 2 files — infra/aws-central/service/detectors.mjs, tools/cloud/eval/prompt_eval.mjs. 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 infra/aws-central/tools/build-street-index.mjs:919 — `x < box[0] || x > box[2] || y < box[1] || y > box[3]` appears character-identically in 2 files — infra/aws-central/tools/build-street-index.mjs, infra/aws-central/tools/india-ward-coverage.mjs. 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 android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt:54 — `Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) =…` appears character-identically in 2 files — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt, android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt. 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 android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeMediaStorageQuota.kt:71 — `right > 0L && Long.MAX_VALUE - left < right` appears character-identically in 3 files — android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeMediaStorageQuota.kt, android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeReportEvidenceStorage.kt, android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeRetryableFileCleanup.kt. 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 ml/classifier/datasets.py:106 — `"/train/images/" in info.filename and info.filename.lower().endswith(".jpg")` appears character-identically in 2 files — ml/classifier/datasets.py, 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 tools/build-delhi-coverage.py:104 — `abs(ab_c) <= epsilon and on_segment(a, b, c)` appears character-identically in 2 files — tools/build-delhi-coverage.py, tools/build-metro-coverage.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/build-delhi-coverage.py:105 — `abs(ab_d) <= epsilon and on_segment(a, b, d)` appears character-identically in 2 files — tools/build-delhi-coverage.py, tools/build-metro-coverage.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/build-delhi-coverage.py:106 — `abs(cd_a) <= epsilon and on_segment(c, d, a)` appears character-identically in 2 files — tools/build-delhi-coverage.py, tools/build-metro-coverage.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/build-delhi-coverage.py:107 — `abs(cd_b) <= epsilon and on_segment(c, d, b)` appears character-identically in 2 files — tools/build-delhi-coverage.py, tools/build-metro-coverage.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/build-andhra-pradesh-coverage.py:153 — `crosses and lng < ( (previous_lng - current_lng) * (lat - current_lat) / (previous_lat - current_lat) + current_lng )` appears character-identically in 5 files — tools/build-andhra-pradesh-coverage.py, tools/build-punjab-coverage.py, tools/build-tamil-nadu-coverage.py, tools/build-telangana-coverage.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tools/build-delhi-coverage.py:115 — `first == 0 and second == segment_count - 1` appears character-identically in 2 files — tools/build-delhi-coverage.py, tools/build-metro-coverage.py. 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 eval/materialize_private_eval.py:566 — `image_format != "JPEG" or size != expected_size` appears character-identically in 2 files — eval/materialize_private_eval.py, eval/private_drive_corpus.py. 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 eval/exhaustive_video_eval.py:223 — `isinstance(source[field], str) and source[field]` appears character-identically in 2 files — eval/exhaustive_video_eval.py, eval/private_drive_corpus.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×26
  • Hand-rolled JSON/XML parsing via regex static/standalone.js:843 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex static/standalone.js:844 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex static/standalone.js:845 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex static/standalone.js:846 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex ml/classifier/build_manifest.py:64 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex ml/classifier/datasets.py:114 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex ml/classifier/datasets.py:247 — 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 Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/standalone.js:843 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/standalone.js:844 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/standalone.js:845 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex docs/standalone.js:846 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/www/standalone.js:843 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/www/standalone.js:844 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/www/standalone.js:845 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/www/standalone.js:846 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:214 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:216 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:218 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:220 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:222 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:224 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDetectionVerdict.kt:226 — 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.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/assets/public/standalone.js:843 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/assets/public/standalone.js:844 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex android-app/android/app/src/main/assets/public/standalone.js:845 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • + 1 more in this group — see findings.md.
D31 · IaC & Container Security · Low IaC · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default in catch · ×10
  • Silent fallback default in catch android-app/android/app/src/main/java/com/gauravsen/potholereporter/bridge/VideoImportStore.kt:850 — `availableBytes` swallows every exception into `0L` — 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 android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DuplicateDetector.kt:113 — `stringArray` swallows every exception into `mutableListOf()` — 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 android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeDriveEndSummaryStore.kt:122 — `readIndex` swallows every exception into `emptyList()` — 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 android-app/android/app/src/main/java/dev/aiengg/potholereporter/plugin/DriveModePlugin.kt:2244 — `nearbyVideoFrameDataUrls` swallows every exception into `emptyList()` — 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 android-app/android/app/src/main/assets/public/standalone.js:10588 — `readFeedbackQueue` 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 android-app/www/standalone.js:10588 — `readFeedbackQueue` 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 docs/standalone.js:10588 — `readFeedbackQueue` 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 infra/aws-central/service/auth.mjs:107 — `verifyInstallationSignature` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch static/standalone.js:10588 — `readFeedbackQueue` 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 tools/harness/run.mjs:262 — `loadTimings` 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.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Empty method body · ×5
  • Empty method body infra/aws-central/tools/check-package.mjs:27 — `warn` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body infra/aws-central/tools/check-package.mjs:27 — `log` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body infra/aws-central/tools/check-package.mjs:27 — `info` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body infra/aws-central/tools/verify-local-address.mjs:49 — `error` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body infra/aws-central/tools/verify-local-address.mjs:49 — `log` has an empty body — confirm it's an intentional no-op and not an unfinished method.
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: ReportDao (18 abstract methods) android-app/android/app/src/main/java/com/gauravsen/potholereporter/db/dao/ReportDao.kt:128 — `ReportDao` declares 18 abstract methods: `insert`, `update`, `getAll`, `getAllIds`, `listForHome`, `getById`, `getThumbnail`, `getFullPhoto`, `exists`, `getByServerPotholeId`, `centralWorkIds`, `deleteById`, `getByDriveId`, `findInLatBand`, `findAcceptedByDriveId`, `findBySightingDriveId`, `count`, `deleteAll`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ReportDao (17 abstract methods) android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/Daos.kt:97 — `ReportDao` declares 17 abstract methods: `insertReport`, `updateReport`, `getAllReports`, `getReportById`, `getAllReportMediaRefs`, `getReportMediaRefs`, `getNewestReportMediaId`, `getReportMediaRefPage`, `getUnsyncedReportCandidatesAfter`, `getUnsyncedReportPhotoDataUrl`, `countUnsyncedReports`, `markReportsSynced`, `acknowledgeAndReleasePhotos`, `getCandidateReportsInLatitudeBand`, `getReportsForDrive`, `clearAll`, `deleteReport`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: DriveKeyframeDao (17 abstract methods) android-app/android/app/src/main/java/dev/aiengg/potholereporter/db/Daos.kt:312 — `DriveKeyframeDao` declares 17 abstract methods: `insertKeyframe`, `getKeyframe`, `getBySessionAndCaptureSeq`, `getForSession`, `getPendingForSession`, `countPendingForSession`, `getSummaries`, `getNewestOwnershipId`, `getOwnershipPage`, `getOwnershipPageForSession`, `getPendingSessionPage`, `getMissingSessionPage`, `markAnalyzed`, `markPending`, `deleteKeyframe`, `deleteForSession`, `clearAll`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion REDACTED:1 — `(repository root)` (56353 LoC, 163 module-visible types across 13 directories) overshoots its size bounds. 2 of 11 build unit(s) (Gradle, Python, npm) overshoot their size bounds, lowering Project Cohesion to 6.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion android-app/android/app/build.gradle:1 — `android-app/android/app` (32913 LoC, 300 module-visible types across 12 directories) overshoots its size bounds. 2 of 11 build unit(s) (Gradle, Python, npm) overshoot their size bounds, lowering Project Cohesion to 6.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found android-app/android/app/build.gradle:1 — 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 `android-app/android/app/build.gradle` makes this repository a deployable product (line 1).
D24 · Comment Value · redundant comment · ×1
  • redundant comment infra/aws-central/test/india-ward-tenders.test.mjs:90 — ""Ward No.256, Moosapet Circle-53": Moosapet is the circle, the ward is Mothi Nagar." repeats the code it sits on: 8 of its 8 words (ward, no, 256, moosapet, circle, 53, mothi, nagar) are already in `assert.deepEqual(names("Recarpeting of BT Road from Babbuguda Culvert to Neelima Hospital in Mothi Nagar, Ward No.256, M …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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: `.`.
P2 · Observability · Console output used as the logging channel · ×1
  • Console output used as the logging channel infra/aws-central/service/health/handler.mjs:33 — `infra/aws-central/service/health/handler.mjs` reports through `console.*` at line 33 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation android-app/package.json:14 — `android-app/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'KGIS_TOWN_LAYER_URL' · ×1
  • Unused export 'KGIS_TOWN_LAYER_URL' infra/aws-central/tools/kgis-layers.mjs:36 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all functions that make a request accept an AbortSignal or the coroutine's cancellation · ×1
  • Not all functions that make a request accept an AbortSignal or the coroutine's cancellation — Only 44/66 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure tools/build-gepnic-road-notice-packs.py:566 — `_ledger_source_ids` returns `set()` when `(OSError, UnicodeDecodeError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.

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-f6eecf1bb0e94eb59b21677701cabae6/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=257" --report-format json --report-path /tmp/watchdog-gitleaks-f6eecf1bb0e94eb59b21677701cabae6/history-1.json --exit-code 0 --source .0artifacts/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=457 --max-count=23" --report-format json --report-path /tmp/watchdog-gitleaks-f6eecf1bb0e94eb59b21677701cabae6/history-2.json --exit-code 0 --source .0artifacts/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-f6eecf1bb0e94eb59b21677701cabae6/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .13artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .12artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .40artifacts/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. semgrep could not parse 9 file(s) — `android-app/android/app/src/main/assets/public/standalone.js`, `android-app/android/app/src/main/java/com/gauravsen/potholereporter/drivemode/DetectionDispatcher.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeFrameSource.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NativeInferenceTransport.kt`, `android-app/android/app/src/main/java/dev/aiengg/potholereporter/drive/NotificationHelper.kt`, … (+4 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1ea98-3b35-70aa-8357-f5e27c3e9c46 · 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