Public report of yairm210/Unciv, published 24 October 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.10.5). Watchdog 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, 24 October 2026, 19:36 UTC · Survey ID cd_dcc8da401d0c406291fe79c5a400e15d

yairm210/Unciv

Measured 24 October 2026, 19:32 UTC, at code version 855eee4

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 45out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey

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

A large codebase: 123,721 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Production Readiness, 21

Findings by how serious they are

107 critical 1052 serious 84 minor

12 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 19:32 UTC

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

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

57of 62 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1227of 1243 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
62dimensions across 6 lenses, read from 123,721 lines of product code in 6 projects.
Chapters

Executive summary

yairm210/Unciv scores 45 out of 100 and is rated Weak, while five of its six lenses score higher still: Architecture at 96, rated Exemplary, Maturity at 87, rated Strong, and Code Health at 71, Performance at 66 and Security and Compliance at 57, all rated Adequate.

The score is lower than those five because the weakest lens counts most, and here that is Production Readiness, which scores 21 and is rated Critical. Its REDACTED Scanning dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 2 Leaked secret finding(s) in REDACTED Scanning and to add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing, and if Production Readiness rose to 70, the score would rise from 45 to about 64.

107 findings are critical: 96 in Static Analysis (SAST), four in Secrets (history), three in Supply-chain Provenance & Signing, two in REDACTED Scanning, one in Async correctness and one in Knowledge Freshness.

Watchdog couldn't measure 12 dimensions in this code, among them Code Coverage, Test Reliability and Dependency Hygiene, so they are left out of the score. The product code is 123,721 lines, which would take an estimated 0.9 person-years, around €120,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.
Production Readiness 21 · counts for 46%Security and Compliance 57 · counts for 25%Performance 66 · counts for 14%Code Health 71 · counts for 8%Maturity 87 · counts for 4%Architecture 96 · counts for 2%

If Production Readiness rose from 21 to 70, the lowest score rated Strong, the score would rise from 45 to about 64.

Code composition: what the lines of code are
Product code 88%Tests 12%
New since the last survey: 33 findings

These 33 critical or serious findings weren't in the previous survey, on 10 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 21 findings

These 21 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one.

  • Cyclomatic Complexity · Automation.rankTileForExpansion (cyclomatic 19) core/src/com/unciv/logic/automation/Automation.kt
  • Cyclomatic Complexity · MapUnit.rankTileForHealing (cyclomatic 19) core/src/com/unciv/logic/map/mapunit/MapUnit.kt
  • Cyclomatic Complexity · UnitActionsUpgrade.getUpgradeActions (cyclomatic 16) core/src/com/unciv/logic/map/mapunit/actions/UnitActionsUpgrade.kt
  • Cognitive Complexity · Automation.rankTileForExpansion (cognitive 27) core/src/com/unciv/logic/automation/Automation.kt
  • Cognitive Complexity · ThreatManager.getDistanceToClosestEnemyUnit (cognitive 27) core/src/com/unciv/logic/civilization/managers/ThreatManager.kt
  • Cognitive Complexity · UnitActionsUpgrade.getUpgradeActions (cognitive 25) core/src/com/unciv/logic/map/mapunit/actions/UnitActionsUpgrade.kt
  • Cognitive Complexity · CityScreenTileTable.update (cognitive 21) core/src/com/unciv/ui/screens/cityscreen/CityScreenTileTable.kt
  • Cognitive Complexity · ThreatManager.getTilesWithEnemyUnitsInDistance (cognitive 19) core/src/com/unciv/logic/civilization/managers/ThreatManager.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/logic/map/tile/Tile.kt core/src/com/unciv/logic/map/tile/Tile.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/models/ruleset/Ruleset.kt core/src/com/unciv/models/ruleset/Ruleset.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/logic/trade/TradeLogic.kt core/src/com/unciv/logic/trade/TradeLogic.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/logic/map/mapgenerator/NaturalWonderGenerator.kt core/src/com/unciv/logic/map/mapgenerator/NaturalWonderGenerator.kt
  • Churn × Complexity Hotspots · Hotspot: core/src/com/unciv/logic/map/mapgenerator/mapregions/RegionStartFinder.kt core/src/com/unciv/logic/map/mapgenerator/mapregions/RegionStartFinder.kt
  • Explicit Debt · TodoComment core/src/com/unciv/logic/automation/unit/UnitAutomation.kt
  • Explicit Debt · TodoComment core/src/com/unciv/ui/screens/overviewscreen/UnitOverviewTabColumn.kt
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) core/src/com/unciv/ui/popups/options/DisplayTab.kt
Rebuild cost: about €120,000 · Estimate
Cost to rebuild€41,000 to €210,000, for 687 to 2,179 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 45. 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: 123,721 lines of product code

How the estimate is made: Watchdog prices 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 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Raises the score by about 21 points · Low effort · REDACTED Scanning
2
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5 points · Medium effort · Security & performance tooling
3
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
Raises the score by about 5 points · Medium effort · DR & Backup

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 €120,000 to build again, about 0.9 person-years of work. Its weakest lens is Production Readiness, at 21 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 21 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.7 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 8% on every change. The history of the code shows how much it changes: about 65,708 lines over the last 90 days, which is about 266,482 lines a year. At that pace, the extra work comes to an estimated 22.5 to 134.8 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 Watchdog's 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; 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.

533 modules, with 1378 dependencies between them. 4 loops run through 160 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 493 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 models.stats2 models.ruleset.unique3 models.ruleset.nation4 logic.civilization.diplomacy5 ui.screens.worldscreen6 ui.screens.pickerscreens7 ui.screens.victoryscreen8 view9 ui.images10 ui.popups11 ui.popups.options12 ui.screens.basescreen13 ui.screens.overviewscreen14 models.metadata15 ui.components.tilegroups16 ui.components17 ui.components.widgets18 ui.components.input19 ui.screens.civilopediascreen20 models.ruleset.unit21 models.ruleset.tile22 logic.civilization.managers23 models24 models.ruleset25 logic.map.tile26 logic.map.mapunit27 logic.map28 logic.battle29 logic.automation.unit30 logic.civilization31 logic.city32 logic.automation.civilization33 ui.screens.cityscreen34 logic35 logic.files36 ui.screens.devconsole37 ui.screens.newgamescreen38 com.unciv39 ui.screens.mapeditorscreen.tabs40 ui.screens.mapeditorscreen
1 models.stats1
2 models.ruleset.unique34222533
3 models.ruleset.nation16317
4 logic.civilization.diplomacy1412192
5 ui.screens.worldscreen1221212415151
6 ui.screens.pickerscreens1177154132132102
7 ui.screens.victoryscreen81210323105
8 view67231115111113776220101
9 ui.images1111213
10 ui.popups3161131111
11 ui.popups.options12312212
12 ui.screens.basescreen11321
13 ui.screens.overviewscreen31621310121317211
14 models.metadata12111113
15 ui.components.tilegroups191111
16 ui.components111111
17 ui.components.widgets522141
18 ui.components.input14
19 ui.screens.civilopediascreen1212131151
20 models.ruleset.unit2941101231
21 models.ruleset.tile263117111
22 logic.civilization.managers442596411039
23 models1311211214
24 models.ruleset1232411344811473
25 logic.map.tile257322323
26 logic.map.mapunit61613111112
27 logic.map111126435
28 logic.battle15341364843
29 logic.automation.unit116222862584
30 logic.civilization454415111139351371212
31 logic.city11411253842213
32 logic.automation.civilization2131123131144
33 ui.screens.cityscreen313222112922112
34 logic1114111522621
35 logic.files112126
36 ui.screens.devconsole11111111222
37 ui.screens.newgamescreen421461010731
38 com.unciv222111
39 ui.screens.mapeditorscreen.tabs1111266111211110
40 ui.screens.mapeditorscreen13333277
Uses a module listed above itPart of a loopThe module itself
1 models.stats2 models.ruleset.unique3 models.ruleset.nation4 logic.civilization.diplomacy5 ui.screens.worldscreen6 ui.screens.pickerscreens7 ui.screens.victoryscreen8 view9 ui.images10 ui.popups11 ui.popups.options12 ui.screens.basescreen13 ui.screens.overviewscreen14 models.metadata15 ui.components.tilegroups16 ui.components17 ui.components.widgets18 ui.components.input19 ui.screens.civilopediascreen20 models.ruleset.unit21 models.ruleset.tile22 logic.civilization.managers23 models24 models.ruleset25 logic.map.tile26 logic.map.mapunit27 logic.map28 logic.battle29 logic.automation.unit30 logic.civilization31 logic.city32 logic.automation.civilization33 ui.screens.cityscreen34 logic35 logic.files36 ui.screens.devconsole37 ui.screens.newgamescreen38 com.unciv39 ui.screens.mapeditorscreen.tabs40 ui.screens.mapeditorscreenmodels.stats1models.ruleset.unique2models.ruleset.nation3logic.civilization.diplomacy4ui.screens.worldscreen5ui.screens.pickerscreens6ui.screens.victoryscreen7view8ui.images9ui.popups10ui.popups.options11ui.screens.basescreen12ui.screens.overviewscreen13models.metadata14ui.components.tilegroups15ui.components16ui.components.widgets17ui.components.input18ui.screens.civilopediascreen19models.ruleset.unit20models.ruleset.tile21logic.civilization.managers22models23models.ruleset24logic.map.tile25logic.map.mapunit26logic.map27logic.battle28logic.automation.unit29logic.civilization30logic.city31logic.automation.civilization32ui.screens.cityscreen33logic34logic.files35ui.screens.devconsole36ui.screens.newgamescreen37com.unciv38ui.screens.mapeditorscreen.tabs39ui.screens.mapeditorscreen4013422253316317141219212212124151511177154132132102812103231056723111511111377622010111112133161131111123122121132131621310121317211121111131911111111115221411412121311512941101231263117111442596411039131121121412324113448114732573223236161311111211112643515341364843116222862584454415111139351371212114112538422132131123131144313222112922112111411152262111212611111111222421461010731222111111126611121111013333277+493 more modules (most-connected shown)

At a glance — Code Health · 71% · Adequate · gated by D2 ·

At a glance — Architecture · 96% · Exemplary ·

At a glance — Maturity · 87% · Strong ·

At a glance — Readiness · 21% · Critical · gated by D13, P3, P5, P7 ·

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

At a glance — Performance · 66% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection98High / Critical
A03:2025 — Software Supply Chain Failures12High / Critical
A07:2025 — Authentication Failures7High / Critical
A02:2025 — Security Misconfiguration4Medium

Roadmap

Immediately resolve the two leaked secrets in the keystore files and address the eighteen hardcoded secrets in the deployment workflows to eliminate critical exposure. Strengthen the development pipeline by integrating automated security scanning into CI to prevent regressions and enforce strict timeouts and resilience patterns on all outbound HTTP calls. Finally, codify disaster recovery procedures by documenting RTO and RPO targets and implementing geo-recovery capabilities in the infrastructure as code.

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

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.+21.2 ptsLowREDACTED Scanning
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.0 ptsMediumSecurity & performance tooling
Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.+5.0 ptsMediumDR & Backup
Resolve the 18 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (15), REDACTED, REDACTED.+2.9 ptsMediumStatic Analysis (SAST)
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).+2.8 ptsMediumOutbound HTTP resilience
Resolve the 3 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED.+1.2 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED.+1.0 ptsLowSecrets (history)
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+1.0 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
core/src/com/unciv/logic/city/CityConstructions.kt5.5MixedCyclomatic Complexity: CityConstructions.completeConstruction (cyclomatic 23)
REDACTED5.6MixedIaC & Container Security: Medium IaC: REDACTED
core/src/com/unciv/models/ruleset/Ruleset.kt6.0MixedExplicit Debt: TodoComment
core/src/com/unciv/models/ruleset/Victory.kt6.0MixedExplicit Debt: TodoComment
core/src/com/unciv/logic/trade/TradeEvaluation.kt6.0MixedExplicit Debt: TodoComment
core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt6.0MixedExplicit Debt: TodoComment
core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt6.0MixedExplicit Debt: TodoComment
core/src/com/unciv/logic/map/tile/Tile.kt6.0MixedExplicit Debt: TodoComment
server/src/com/unciv/app/server/UncivServer.kt6.0MixedExplicit Debt: TodoComment

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

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

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

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

Could not be resolved — 12

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

Methodology & how to trust this report

Watchdog 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. 57 of 62 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 62 dimensions across the health lenses
D1D2D3D4D5D6D7D13D15D16D17D19D20D21D25D26D28D29D31D34D35D36D44AX10AX3AX4M1M2M3M4P1P2P3P4P5P6P7PF2PF3X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X5

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, 1227 of 1243 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16f66-b0e2-73c9-985a-9e28293eb71f.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog 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: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog 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 — 8 Maven/Gradle manifest(s) were read, stating a version for 35 dependency(ies) and leaving 0 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.
  • D22 Internal API Consistency — not measured this run — Watchdog 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: 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.
  • D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D28 Secrets (history) — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `android/assets/Atlases.json`, `android/assets/jsons/Tutorials.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `core/src/com/unciv/logic/civilization/Civilization.kt`, `core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt`, `core/src/com/unciv/logic/github/GithubAPI.kt`, `core/src/com/unciv/logic/map/HexMath.kt`, `core/src/com/unciv/logic/map/mapgenerator/MapGenerationRandomness.kt`, … (+46 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.
  • AX1 Captive dependencies — not measured this run — Watchdog 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in core/src/com/unciv/logic/multiplayer/apiv2/EndpointImplementations.kt, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docker-compose.yml). compose up failed (exit 15 — the compose project is invalid) — validating docker-compose.yml: services.unciv.volumes must be a list; runtime evidence skipped.
  • C2 Access Controls — not measured this run — Watchdog 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.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Java, Kotlin is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Kotlin is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog 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.

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

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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.
  • 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.
  • 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D20, D21, D25, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity4.8 / 10Weak✓ 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 4.8 / 10 · rule-coverage 100% · ceiling Prevented

159 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was UniqueTriggerActivation.getTriggerFunction at 328. A further 9 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 UiUnitAction.getIcon at 56 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: core/src/com/unciv/ui/screens/worldscreen/unit/actions/UiUnitAction.kt (UiUnitAction.getIcon at 56), core/src/com/unciv/logic/city/City.kt (City.matchesSingleFilter at 43), core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt (MapLandmassGenerator.generateLand at 17), core/src/com/unciv/logic/multiplayer/apiv2/JsonSerializers.kt (WebSocketMessageSerializer.selectDeserializer at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

UniqueTriggerActivation.getTriggerFunction (cyclomatic 328)core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79
Conditionals.conditionalApplies (cyclomatic 161)core/src/com/unciv/models/ruleset/unique/Conditionals.kt:28
Building.getRejectionReasons (cyclomatic 62)core/src/com/unciv/models/ruleset/Building.kt:280
Ruleset.load (cyclomatic 53)core/src/com/unciv/models/ruleset/Ruleset.kt:388
Milestone.getVictoryScreenButtons (cyclomatic 50)core/src/com/unciv/models/ruleset/Victory.kt:277

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

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with UniqueTriggerActivation.getTriggerFunction (cyclomatic 328), Conditionals.conditionalApplies (cyclomatic 161), Building.getRejectionReasons (cyclomatic 62). — 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 3 together lifts Cyclomatic Complexity from 4.8 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity2.1 / 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.1 / 10 · rule-coverage 100% · ceiling Prevented

295 method(s) exceeded the cognitive complexity threshold of 15; the worst was UniqueTriggerActivation.getTriggerFunction at 498.

UniqueTriggerActivation.getTriggerFunction (cognitive 498)core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79
Ruleset.load (cognitive 89)core/src/com/unciv/models/ruleset/Ruleset.kt:388
WorldMapTileUpdater.updateTilesForSelectedUnit (cognitive 87)core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt:60
Building.getRejectionReasons (cognitive 85)core/src/com/unciv/models/ruleset/Building.kt:280
Milestone.getVictoryScreenButtons (cognitive 85)core/src/com/unciv/models/ruleset/Victory.kt:277

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with UniqueTriggerActivation.getTriggerFunction (cognitive 498). — Refactoring it lifts Cognitive Complexity from 2.1 to about 4.5/10.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.1 / 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.1 / 10 · rule-coverage 100% · ceiling Prevented

80 god class(es) detected.

TooManyMethods: Civilization · ×33core/src/com/unciv/logic/civilization/Civilization.kt:60
FileTooLong: unique/UniqueTriggerActivation.kt · ×21core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt
ClassTooLong: TextureArraySpriteBatch · ×20core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:47
MethodTooLong: UncivServerRunner.serverRun · ×6server/src/com/unciv/app/server/UncivServer.kt:281

What to do

  1. Resolve the 33 TooManyMethods finding(s) in God Classes — start with Civilization.kt, Tile.kt, MapUnit.kt. — One of this dimension's main actionable groups (33 warning-level).
  2. Resolve the 21 FileTooLong finding(s) in God Classes — start with UniqueTriggerActivation.kt, TextureArraySpriteBatch.java, Civilization.kt. — One of this dimension's main actionable groups (21 warning-level).
  3. Resolve the 20 ClassTooLong finding(s) in God Classes — start with TextureArraySpriteBatch.java, Tile.kt, Civilization.kt. — One of this dimension's main actionable groups (20 warning-level).
  4. Enforce God Classes in CI to reach Prevented (currently Verified). — Hardens enforcement from Verified toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.9 / 10Stronggated by 36 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

35 duplicated block group(s) detected. One further row reports members as variants of one another; it aggregates block groups already counted above and is not itself counted.

Duplicated block (9 lines × 2) · ×4core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:368
Duplicated block (7 lines × 2) · ×4core/src/com/unciv/logic/civilization/Civilization.kt:1056
Duplicated block (6 lines × 2) · ×4core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:268
Duplicated block (15 lines × 2) · ×2core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:548
Duplicated block (12 lines × 2) · ×2core/src/com/unciv/models/ruleset/Building.kt:456

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

What to do

  1. Resolve the 4 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with PathingMap.kt, Simulation.kt, Belief.kt. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Civilization.kt, Building.kt, Policy.kt. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 4 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with PolicyManager.kt, MapLandmassGenerator.kt, UniqueTriggerActivation.kt. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

6 production modules (Gradle), 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 4 of the 6 (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)9.9 / 10Stronggated by 3 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Verified

3 of 366 classes have LCOM4 above 3.

Low cohesion: ModConstants (LCOM4 4) · ×3core/src/com/unciv/models/ModConstants.kt:18

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with ModConstants.kt, CrashScreen.kt, DiplomacyScreen.kt. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D7 · Architectural Integrity10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

All 40 mechanizable ADR(s) are enforced: 20 by analyzers, 20 by tests. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Checkable ADR rule enforced only by prose: 1112fastlane/metadata/android/en-US/changelogs/1112.txt

✓ On the Gold path — maintain.

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

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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 0.0 / 10 · rule-coverage 100% · ceiling Prevented

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 46 serious findings✓ 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 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt (8×328=2624); core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt (28×47=1316); core/src/com/unciv/logic/automation/unit/UnitAutomation.kt (25×39=975) Repeated repair below the complexity floor: core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.kt (3 of 3 changes were fixes)

Hotspot: core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt · ×45core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79
Repeated repair: core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.ktcore/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.kt:179

What to do

  1. Resolve the 45 Hotspot finding(s) in Churn × Complexity Hotspots — start with UniqueTriggerActivation.kt, WorldMapTileUpdater.kt, UnitAutomation.kt. — One of this dimension's main actionable groups (45 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with GlobalPoliticsDiagramGroup.kt. — One of this dimension's main actionable groups (1 warning-level).

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

D16 · Bus Factor8.5 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

83 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is core/src/com/unciv/models/ruleset/unique/DeprecatedUniques.kt. Counted over 543 of the 711 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt9.7 / 10Stronggated by 167 serious findings✓ Tool-verified

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 9.7 / 10 · rule-coverage 100% · ceiling Prevented

167 deducted task-comment markers across 123721 LoC (0.1/KLoC) → score 9.7. 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.

TodoComment · ×166core/src/com/unciv/Constants.kt:33
FixmeCommentcore/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt:311

What to do

  1. Resolve the 166 TodoComment finding(s) in Explicit Debt — start with MapEditorScreen.kt (15), UniqueType.kt (11), ConstructionAutomation.kt (6). — One of this dimension's main actionable groups (166 warning-level).
  2. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with TileLayerMisc.kt. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

Unciv's documentation is comprehensive and well-organized for a game project: the READMEs (1) cover project structure, translations, testing AI changes, Android builds, UI development, unique replacement, and modding topics; architecture/design docs are explicitly named and present (39); each document is clearly scoped with an overview paragraph and is navigable via headings. The content is mostly practical guidance for developers rather than a high-level overview of the project. This repository is a well-organized modding guide with a strong README and architecture/design docs. The README for each mod (e.g. 'Creating a custom tileset', 'Making a new Civilization') gives clear usage examples and links to the full project's Modders/Docs hierarchy, covering installation, creation workflow, testing, and publishing. The architecture doc set is large and well-organized, with every section named in the outline present. (10 of 25 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR QualityWeak◐ Sampled · advisory

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

Evaluated 217 ADR(s) individually; mean quality 3.0/10 (frequently incomplete). 212 flagged with a specific gap.

No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement · ×4fastlane/metadata/android/en-US/changelogs/1025.txt
No context/problem and no consequences/trade-offs; only a list of fixes with no rationale · ×2fastlane/metadata/android/en-US/changelogs/1100.txt
No context/problem statement; no consequences/trade-offs · ×2fastlane/metadata/android/en-US/changelogs/1111.txt
No context/problem and no consequences; the body is a list of unrelated patches with no decision statement · ×2fastlane/metadata/android/en-US/changelogs/1145.txt
Decision is a vague 'for every [countable]' unique modifier and links-only promise; consequences/trade-offs are absentfastlane/metadata/android/en-US/changelogs/1000.txt

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

What to do

  1. Resolve the 4 No context/problem and no consequences/trade-offs; the body is a list of… finding(s) in ADR Quality — start with 1025.txt, 1038.txt, 1077.txt. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 2 No context/problem and no consequences/trade-offs; only a list of fixes… finding(s) in ADR Quality — start with 1100.txt, 1241.txt. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 No context/problem statement; no consequences/trade-offs finding(s) in ADR Quality — start with 1111.txt, 1122.txt. — One of this dimension's main actionable groups (2 warning-level).

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D25 · ADR ConformanceExemplary◐ Sampled · advisory

What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.

Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.

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

1 conform / 0 violate across 217 ADRs.

✓ On the Gold path — maintain.

Detailed fixes: d25_recommendation.md.

D26 · Project Cohesion6.0 / 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, LLM-independent.

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

1 of 5 build units (Gradle) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D31 · IaC & Container Security9.7 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness9.4 / 10Adequategated by 1 critical finding✓ 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 9.4 / 10 · rule-coverage 100% · ceiling Documented

33 of 543 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt. Counted over 543 of the 711 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgecore/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:1
Orphaned file · ×32core/src/com/unciv/ui/components/widgets/ZoomableScrollPane.kt:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with ApiV2.kt. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 32 Orphaned file finding(s) in Knowledge Freshness — start with ZoomableScrollPane.kt, ResponseStructs.kt, WebSocketStructs.kt. — One of this dimension's main actionable groups (32 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

Strongest change-coupling: Conditionals.kt↔UniqueType.kt 68%; BuildConfig.kt↔UncivGame.kt 63%; NextTurnAutomation.kt↔Trade.kt 60%

Change coupling: Conditionals.kt ↔ UniqueType.kt · ×6core/src/com/unciv/models/ruleset/unique/Conditionals.kt:1

What to do

  1. Resolve the 6 Change coupling finding(s) in Change Coupling — start with Conditionals.kt, BuildConfig.kt, NextTurnAutomation.kt. — One of this dimension's main actionable groups (6 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 5 of 5 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation10.0 / 10Exemplary✓ 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.

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy9.8 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/Developers/Testing-AI-changes.md names `desktop\src\ConsoleLauncher.kt`, but no file or folder `desktop/src/ConsoleLauncher.kt` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Developers/Testing-AI-changes.md:18
  • docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `See`, but `docs/Modders/Mod-file-structure/See` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:107
  • docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Personalities`, but `docs/Modders/Mod-file-structure/Personalities` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:109
  • docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Similar`, but `docs/Modders/Mod-file-structure/Similar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:128
  • docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `If`, but `docs/Modders/Mod-file-structure/If` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:32
  • docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `Special`, but `docs/Modders/Mod-file-structure/Special` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:79
  • docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `Improvements`, but `docs/Modders/Mod-file-structure/Improvements` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:80
  • docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `They`, but `docs/Modders/Mod-file-structure/They` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:82
  • docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `The`, but `docs/Modders/Mod-file-structure/The` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:127
  • docs/Modders/Mod-file-structure/5-Miscellaneous-JSON-files.md links to `Successfully`, but `docs/Modders/Mod-file-structure/Successfully` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Modders/Mod-file-structure/5-Miscellaneous-JSON-files.md:74

What to do

  • Reconcile the README with reality: docs/Developers/Testing-AI-changes.md names `desktop\src\ConsoleLauncher.kt`, but no file or folder `desktop/src/ConsoleLauncher.kt` exists; docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `See`, but `docs/Modders/Mod-file-structure/See` does not exist; docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Personalities`, but `docs/Modders/Mod-file-structure/Personalities` does not exist; docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Similar`, but `docs/Modders/Mod-file-structure/Similar` does not exist; docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `If`, but `docs/Modders/Mod-file-structure/If` does not exist.
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.

P2 · Observability7.0 / 10Strong✓ 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.

What to do

  • Consider OpenTelemetry tracing/metrics (opentelemetry-java or Micrometer) and a health-check endpoint (Spring Boot Actuator's /actuator/health, or a /health route) for operability.
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 spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 31899 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.

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ 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.

  • Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.

What to do

  • Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified

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

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

  • A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.

What to do

  • Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — core/src/com/unciv/logic/multiplayer/chat/ChatWebSocket.kt:98
  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — core/src/com/unciv/logic/multiplayer/storage/DropBox.kt:28

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
PF2 · Allocation hygiene6.3 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 80 use(s) across 142,032 production line(s) (~0.6/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
  • Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
PF3 · Async & latency hygiene7.0 / 10Strong✓ 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 the language 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.

  • `getPreviewImageOrNull` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs. — core/src/com/unciv/logic/github/Github.kt:126
  • `awaitPing` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs. — core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:340

What to do

  • Kotlin: call the suspend function directly instead of wrapping it in runBlocking, use delay() instead of Thread.sleep, and move unavoidable blocking I/O into withContext(Dispatchers.IO).
X1 · Async correctness7.7 / 10Strong✓ Tool-verified

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.

  • `runBlocking` parks the calling thread until its block finishes, and this is already running in a coroutine, on a dispatcher's thread. On a single-threaded dispatcher (`Dispatchers.Main`, a `limitedParallelism(1)` view) the block can need that very thread to make progress — a deadlock — and on any dispatcher it takes a thread out of the pool for the wait; the library documents that `runBlocking` "should not be used from a coroutine". The suspending call can simply be made here: call it directly, or `coroutineScope { … }` / `withContext(…) { … }` for a block. Where a non-suspending function in between forces the bridge, make that function `suspend` too. — core/src/com/unciv/logic/github/Github.kt:134

What to do

  • `runBlocking` inside a coroutine
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.

X13 · Undrained process stream3.5 / 10Weak✓ Tool-verified

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

  • The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`). — desktop/src/com/unciv/app/desktop/SystemUtils.kt:80

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. 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 document10.0 / 10Exemplary○ Nothing flagged

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

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

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 propagation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether suspend functions that make a cancellable request accept or pass on 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.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

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

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

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

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

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.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated7.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

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

  • `gameDetails.keys` is a live view over `gameDetails` and shares its modification count; it is walked by the loop on line 238, and line 240 calls `gameDetails.remove` on `gameDetails` inside the loop body — a structural change to a `LinkedHashMap`. The loop's hidden iterator is fail-fast, so its next `next()` throws `ConcurrentModificationException`: every pass that reaches this call ends the loop by exception instead of by running out of elements, and the remaining elements are never seen. — core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:238

What to do

  • Each finding names the two spans that cannot both stand — the enhanced `for` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: remove through the iterator itself (`Iterator<T> it = c.iterator(); … it.remove();`) or replace the loop with `c.removeIf(…)`; iterate a copy (`for (T x : new ArrayList<>(c))`); collect what needs changing and apply it after the loop; or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe. In Kotlin: Each finding names the two lines that cannot both stand — the loop over the collection, and the call inside its body that changes it. Confirm from those two, then pick one: change the collection in one call instead of in the loop (`list.removeAll { … }`, `list.retainAll { … }`, `map.entries.removeIf { … }`); walk a snapshot (`for (x in list.toList())`, `list.toList().forEach { … }`); build a new collection (`val kept = list.filter { … }`) instead of editing the one being walked; or — where only the first match was ever meant — leave the walk straight after the change (`break`, `return`), which is the one shape that is already safe.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

  • `catch (_: Throwable)` 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. (×16) — android/src/com/unciv/app/AndroidLogBackend.kt:86, android/src/com/unciv/app/AndroidLogBackend.kt:98, android/src/com/unciv/app/AndroidLogBackend.kt:104, …
  • 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. (×6) — android/src/com/unciv/app/AndroidLauncher.kt:116, core/src/com/unciv/ui/audio/MusicTrackController.kt:159, core/src/com/unciv/ui/components/fonts/FontRulesetIcons.kt:109, …
  • `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×6) — core/src/com/unciv/logic/files/UncivFiles.kt:436, core/src/com/unciv/logic/files/MapSaver.kt:19, core/src/com/unciv/logic/map/TileMap.kt:552, …
  • `catch (ex: 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. — core/src/com/unciv/logic/multiplayer/Multiplayer.kt:68
  • `catch (ex: Throwable)` 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. — core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:196

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 types8.3 / 10Strong✓ 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.

  • ~10.6 `!!` not-null assertions per 1k Kotlin product lines — 1499 across the 141261 line(s) of the 702 Kotlin file(s) read (generated, test and sample code not counted). Densest: core/src/com/unciv/logic/simulation/Simulation.kt (82), core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt (40), core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt (37). Each one tells the compiler to trust the author about null and becomes a `NullPointerException` the first time the author is wrong.

What to do

  • Replace `!!` rather than adding to it: each is a run-time null check the compiler could not prove. Narrow the value with a null check, an early return or `?: return`, use `?.` / `?:` where absence is legitimate, `requireNotNull(x) { "why" }` / `checkNotNull` where a missing value is a contract breach worth a message, make the property non-nullable and set it in the constructor (or `by lazy`) instead of `lateinit` plus `!!`, or change the API so the null cannot arrive.

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 Health71%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96%ExemplaryStrongest area.
Maturity87%StrongSolid.
Readiness21%Critical — gated by D13, P3, P5, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security57%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance66%AdequateAcceptable, with room to improve.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 55 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 web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — 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
  • 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.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no public interfaces
  • 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 — compose up failed (exit 15 — the compose project is invalid) — validating docker-compose.yml: services.unciv.volumes must be a list; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
  • 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.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~16806 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .kt test runner
  • D12 Dependency Hygiene — Not scored — 8 Maven/Gradle manifest(s) were read, stating a version for 35 dependency(ies) and leaving 0 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 — Not scored — this repository's 35 declared JVM dependency coordinate(s) were read from its 8 Maven/Gradle manifest(s), but Maven Central could not be asked for the licence of 35 of them (HTTP 429 Too Many Requests from https://repo1.maven.org/maven2/com/android/tools/build/gradle/9.2.0/gradle-9.2.0.pom), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. 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"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.kt), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).
  • D32 Data Compliance (PII/GDPR) — 51 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (139 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, 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.
  • 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.
  • 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 — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 107 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 46 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
X1 · Async correctness · `runBlocking` inside a coroutine · ×1
  • `runBlocking` inside a coroutine core/src/com/unciv/logic/github/Github.kt:134 — `runBlocking` parks the calling thread until its block finishes, and this is already running in a coroutine, on a dispatcher's thread. On a single-threaded dispatcher (`Dispatchers.Main`, a `limitedParallelism(1)` view) the block can need that very thread to make progress — a deadlock — and on any dispatcher it takes a thread out of the pool for the wait; the library documents that `runBlocking` "should not be used from a coroutine". The suspending call can simply be made here: call it directly, or `coroutineScope { … }` / `withContext(…) { … }` for a block. Where a non-suspending function in between forces the bridge, make that function `suspend` too.
Serious — 1052 finding(s)
D17 · Explicit Debt · TodoComment · ×166
  • TodoComment core/src/com/unciv/Constants.kt:33 — // TODO: GameStarter places "Tundra" startBias first. Can we make it generic by checking count by terrain? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/Constants.kt:43 — // TODO this is very opaque behaviour to modders — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/GameInfo.kt:482 — // Play some nice music TODO: measuring actual play time might be nicer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:136 — //TODO: All bad things are build anyways at the moment, maybe let's stop doing that and chose perpetual construction instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:160 — // todo: add worker disbandment and consumption of great persons if under attack & short on unit supply — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:194 — // todo Still ignores whether that boat can reach the not-yet-found tile to improve — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:203 — // todo Prepare for mods that allow improving water tiles without a resource? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:212 — // todo should workboatAutomationSearchMaxTiles depend on game state? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:370 — //todo: breaks city connection; trade route gold is currently not considered for markets etc. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:40 — //TODO: in late game, this may not be worth it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:73 — // Todo: declare war if enemy missionaries enter our civ without permission — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:77 — // todo can take a second - why? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:115 — // TODO: some cleverness, this is just wild guessing. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:743 — // TODO: apply WarmongerHatred personality trait here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/MotivationToAttackAutomation.kt:58 — // TODO: For now this will be a very high value because the AI can't handle multiple fronts, this should be changed later though — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:295 — //todo: Add more in depth evaluation here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/trade/TradeEvaluation.kt:141 — //todo: Add more in depth evaluation here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:479 — // TODO: add gold offer here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:638 — // TODO: consider consequences of denouncing others — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:96 — // TODO: Maybe add in payment requests in some situations — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:121 — // TODO: We use negative values in WaryOf for now so that we aren't adding any extra fields to the save file — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/civilization/DeclareWarPlanEvaluator.kt:180 — // TODO: We use negative values in WaryOf for now so that we aren't adding any extra fields to the save file — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:56 — //todo: UnitMovement.canReach still very expensive and could benefit from caching, it's not using BFS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:206 — // TODO: Replace this code entirely and change [chooseImprovement] to not continue building the improvement by default — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt:96 — // TODO: Figure out a way to not use turns as it might not be the best metric, what if we are a civ starting in the middle of a game? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 141 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×45
  • Hotspot: core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 328 in UniqueTriggerActivation.getTriggerFunction at line 79. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.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: core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt:60 — core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in WorldMapTileUpdater.updateTilesForSelectedUnit at line 60. 2 of those changes were fix/bug commits, and the other 26 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.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: core/src/com/unciv/logic/automation/unit/UnitAutomation.kt core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:49 — core/src/com/unciv/logic/automation/unit/UnitAutomation.kt changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in UnitAutomation.automateUnitMoves at line 49. 1 of those changes was a fix/bug commit, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/unit/UnitAutomation.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: core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:163 — core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in WorldMapHolder.onTileClicked at line 163. 7 of those changes were fix/bug commits, and the other 40 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.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: core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt:382 — core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in WorldScreen.update at line 382. 2 of those changes were fix/bug commits, and the other 25 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/WorldScreen.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: core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:177 — core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in BattleTable.simulateBattle at line 177. 2 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.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: core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt:30 — core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in CivilianUnitAutomation.automateCivilianUnit at line 30. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.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: core/src/com/unciv/ui/screens/cityscreen/CityScreen.kt core/src/com/unciv/ui/screens/cityscreen/CityScreen.kt:257 — core/src/com/unciv/ui/screens/cityscreen/CityScreen.kt changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in CityScreen.updateTileGroups at line 257. 3 of those changes were fix/bug commits, and the other 28 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/cityscreen/CityScreen.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: core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt:78 — core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in SpecificUnitAutomation.automateSettlerActions at line 78. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.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: core/src/com/unciv/logic/map/mapunit/MapUnit.kt core/src/com/unciv/logic/map/mapunit/MapUnit.kt:536 — core/src/com/unciv/logic/map/mapunit/MapUnit.kt changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MapUnit.healingAmountForTile at line 536. 6 of those changes were fix/bug commits, and the other 15 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/map/mapunit/MapUnit.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: core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:500 — core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in UnitMovement.moveToTile at line 500. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.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: core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt:211 — core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in UnitTable.tileSelected at line 211. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.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: core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.kt core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.kt:115 — core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.kt changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in CityButton.updateHiddenUnitMarkers at line 115. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.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: core/src/com/unciv/ui/objectdescriptions/TileDescription.kt core/src/com/unciv/ui/objectdescriptions/TileDescription.kt:23 — core/src/com/unciv/ui/objectdescriptions/TileDescription.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in TileDescription.toMarkup at line 23. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/objectdescriptions/TileDescription.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: core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:636 — core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in NextTurnAutomation.trainSettler at line 636. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.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: core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt:125 — core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ImprovementPickerScreen.addImprovementRow at line 125. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.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: core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:507 — core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in WorkerAutomation.getImprovementRanking at line 507. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/unit/WorkerAutomation.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: core/src/com/unciv/logic/GameInfo.kt core/src/com/unciv/logic/GameInfo.kt:381 — core/src/com/unciv/logic/GameInfo.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in GameInfo.nextTurn at line 381. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/GameInfo.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: core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt:163 — core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AirUnitAutomation.getNukeLocationValue at line 163. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/unit/AirUnitAutomation.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: core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:399 — core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in DiplomacyAutomation.offerPeaceTreaty at line 399. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.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: core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.kt core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.kt:58 — core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in UnitActionsTable.update at line 58. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.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: core/src/com/unciv/logic/trade/TradeEvaluation.kt core/src/com/unciv/logic/trade/TradeEvaluation.kt:367 — core/src/com/unciv/logic/trade/TradeEvaluation.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in TradeEvaluation.evaluateSellCost at line 367. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/trade/TradeEvaluation.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: core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt:45 — core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in TileLayerTerrain.getTileBaseImageLocations 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.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: core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt:127 — core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in CityStatsTable.addText at line 127. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.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: core/src/com/unciv/logic/civilization/managers/TurnManager.kt core/src/com/unciv/logic/civilization/managers/TurnManager.kt:28 — core/src/com/unciv/logic/civilization/managers/TurnManager.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in TurnManager.startTurn at line 28. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/logic/civilization/managers/TurnManager.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.
  • + 20 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×33
  • TooManyMethods: Civilization core/src/com/unciv/logic/civilization/Civilization.kt:60 — TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× 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: Tile core/src/com/unciv/logic/map/tile/Tile.kt:42 — TooManyMethods — 116 methods. The bar is 30 methods; this is 86 over it, 3.87× 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: MapUnit core/src/com/unciv/logic/map/mapunit/MapUnit.kt:41 — TooManyMethods — 106 methods. The bar is 30 methods; this is 76 over it, 3.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: City core/src/com/unciv/logic/city/City.kt:51 — TooManyMethods — 95 methods. The bar is 30 methods; this is 65 over it, 3.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CityView core/src/com/unciv/view/CityView.kt:31 — TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MapUnitView core/src/com/unciv/view/MapUnitView.kt:28 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CityConstructions core/src/com/unciv/logic/city/CityConstructions.kt:55 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× 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: CivView core/src/com/unciv/view/CivView.kt:24 — TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiplomacyManager core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt:164 — 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: TextureArraySpriteBatch core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:47 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: BaseUnit core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:39 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RulesetValidator core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:66 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ImageGetter core/src/com/unciv/ui/images/ImageGetter.kt:40 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: QuestManager core/src/com/unciv/logic/civilization/managers/quests/QuestManager.kt:26 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TileView core/src/com/unciv/view/TileView.kt:24 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: TileMap core/src/com/unciv/logic/map/TileMap.kt:34 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MusicController core/src/com/unciv/ui/audio/MusicController.kt:28 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GameInfo core/src/com/unciv/logic/GameInfo.kt:100 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GameOptionsTable core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt:42 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LongPriorityQueue core/src/com/unciv/utils/LongPriorityQueue.kt:19 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ReligionManager core/src/com/unciv/logic/civilization/managers/ReligionManager.kt:25 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CityStateFunctions core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:28 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: ForeignCityView core/src/com/unciv/view/ForeignCityView.kt:16 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: TechManager core/src/com/unciv/logic/civilization/managers/TechManager.kt:28 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: TabbedPager core/src/com/unciv/ui/components/widgets/TabbedPager.kt:68 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 8 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×24
  • Swallowed exception (caught, then discarded) android/src/com/unciv/app/AndroidLogBackend.kt:86 — `catch (_: Throwable)` 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) android/src/com/unciv/app/AndroidLogBackend.kt:98 — `catch (_: Throwable)` 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) android/src/com/unciv/app/AndroidLogBackend.kt:104 — `catch (_: Throwable)` 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) core/src/com/unciv/logic/UncivKtor.kt:33 — `catch (_: Throwable)` 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) core/src/com/unciv/logic/files/UncivFiles.kt:436 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/logic/files/MapSaver.kt:19 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/logic/github/Github.kt:153 — `catch (_: Throwable)` 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) core/src/com/unciv/logic/map/TileMap.kt:552 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:27 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/logic/multiplayer/Multiplayer.kt:68 — `catch (ex: 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) core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:196 — `catch (ex: Throwable)` 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) core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:295 — `catch (_: Throwable)` 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) core/src/com/unciv/ui/screens/newgamescreen/MapFileSelectTable.kt:183 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/ui/screens/savescreens/LoadOrSaveScreen.kt:112 — `catch (_: Throwable)` 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) core/src/com/unciv/ui/screens/savescreens/LoadOrSaveScreen.kt:148 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/com/unciv/ui/screens/savescreens/LoadOrSaveScreen.kt:183 — `catch (_: Throwable)` 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) core/src/com/unciv/utils/StringExtensions.kt:13 — `catch (_: Throwable)` 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) desktop/src/com/unciv/app/desktop/SystemUtils.kt:52 — `catch (_: Throwable)` 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) desktop/src/com/unciv/app/desktop/SystemUtils.kt:58 — `catch (_: Throwable)` 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) desktop/src/com/unciv/app/desktop/SystemUtils.kt:93 — `catch (_: Throwable)` 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) desktop/src/com/unciv/app/desktop/SystemUtils.kt:113 — `catch (_: Throwable)` 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) desktop/src/com/unciv/app/desktop/DesktopGame.kt:62 — `catch (_: Throwable)` 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) server/src/com/unciv/app/server/UncivServer.kt:155 — `catch (_: Throwable)` 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) server/src/com/unciv/app/server/UncivServer.kt:300 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · FileTooLong · ×21
  • FileTooLong: unique/UniqueTriggerActivation.kt core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt — FileTooLong — 1052 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 552 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: basescreen/TextureArraySpriteBatch.java core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java — FileTooLong — 933 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: TextureArraySpriteBatch (47-1473). The bar is 500 significant lines; this is 433 over it, 1.87× 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: civilization/Civilization.kt core/src/com/unciv/logic/civilization/Civilization.kt — FileTooLong — 846 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Civilization (60-1310). The bar is 500 significant lines; this is 346 over it, 1.69× 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: tile/Tile.kt core/src/com/unciv/logic/map/tile/Tile.kt — FileTooLong — 838 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: Tile (42-1281). The bar is 500 significant lines; this is 338 over it, 1.68× 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: unique/UniqueType.kt core/src/com/unciv/models/ruleset/unique/UniqueType.kt — FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: class (27-1213). The bar is 500 significant lines; this is 337 over it, 1.67× 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: mapunit/MapUnit.kt core/src/com/unciv/logic/map/mapunit/MapUnit.kt — FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MapUnit (41-1242). The bar is 500 significant lines; this is 271 over it, 1.54× 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: city/CityConstructions.kt core/src/com/unciv/logic/city/CityConstructions.kt — FileTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: CityConstructions (55-1096). The bar is 500 significant lines; this is 152 over it, 1.30× 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: validation/RulesetValidator.kt core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt — FileTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: RulesetValidator (66-910). The bar is 500 significant lines; this is 97 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: diplomacy/DiplomacyManager.kt core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt — FileTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: DiplomacyManager (164-968). 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: movement/UnitMovement.kt core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt — FileTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: UnitMovement (48-930). The bar is 500 significant lines; this is 72 over it, 1.14× 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: diplomacy/CityStateFunctions.kt core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt — FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: CityStateFunctions (28-847). The bar is 500 significant lines; this is 69 over it, 1.14× 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: translations/TranslationFileWriter.kt core/src/com/unciv/models/translations/TranslationFileWriter.kt — FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 69 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: battle/Battle.kt core/src/com/unciv/logic/battle/Battle.kt — FileTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 65 over it, 1.13× 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: cityscreen/CityConstructionsTable.kt core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt — FileTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: CityConstructionsTable (69-822). The bar is 500 significant lines; this is 56 over it, 1.11× 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: city/City.kt core/src/com/unciv/logic/city/City.kt — FileTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: City (51-808). The bar is 500 significant lines; this is 50 over it, 1.10× 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: worldscreen/WorldScreen.kt core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: WorldScreen (83-799). The bar is 500 significant lines; this is 42 over it, 1.08× 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: mapgenerator/MapGenerator.kt core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt — FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: MapGenerator (45-817). The bar is 500 significant lines; this is 30 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: newgamescreen/GameOptionsTable.kt core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: GameOptionsTable (42-619). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: logic/GameInfo.kt core/src/com/unciv/logic/GameInfo.kt — FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: GameInfo (100-882). The bar is 500 significant lines; this is 22 over it, 1.04× 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: civilization/NextTurnAutomation.kt core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt — FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 14 over it, 1.03× 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: map/TileMap.kt core/src/com/unciv/logic/map/TileMap.kt — FileTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: TileMap (34-932). The bar is 500 significant lines; this is 13 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D3 · God Classes · ClassTooLong · ×20
  • ClassTooLong: TextureArraySpriteBatch core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:47 — ClassTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 518 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Tile core/src/com/unciv/logic/map/tile/Tile.kt:42 — ClassTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded), 116 methods. The bar is 400 significant lines; this is 399 over it, 2.00× 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: Civilization core/src/com/unciv/logic/civilization/Civilization.kt:60 — ClassTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded), 121 methods. The bar is 400 significant lines; this is 363 over it, 1.91× 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: MapUnit core/src/com/unciv/logic/map/mapunit/MapUnit.kt:41 — ClassTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded), 106 methods. The bar is 400 significant lines; this is 337 over it, 1.84× 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: CityConstructions core/src/com/unciv/logic/city/CityConstructions.kt:55 — ClassTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 208 over it, 1.52× 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: RulesetValidator core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:66 — ClassTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 155 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: CityStateFunctions core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:28 — ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 145 over it, 1.36× 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: UnitMovement core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:48 — ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: City core/src/com/unciv/logic/city/City.kt:51 — ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), 95 methods. The bar is 400 significant lines; this is 105 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.
  • ClassTooLong: CityConstructionsTable core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt:69 — ClassTooLong — 497 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 97 over it, 1.24× 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: MapGenerator core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:45 — ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: TileMap core/src/com/unciv/logic/map/TileMap.kt:34 — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 89 over it, 1.22× 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: AlertPopup core/src/com/unciv/ui/screens/worldscreen/AlertPopup.kt:62 — ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 55 over it, 1.14× 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: WorldScreen core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt:83 — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DiplomacyManager core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt:164 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GameInfo core/src/com/unciv/logic/GameInfo.kt:100 — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 40 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WorldMapHolder core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:52 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 31 over it, 1.08× 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: ModManagementScreen core/src/com/unciv/ui/screens/modmanager/ModManagementScreen.kt:69 — ClassTooLong — 426 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 26 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GameStarter core/src/com/unciv/logic/GameStarter.kt:36 — ClassTooLong — 411 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 11 over it, 1.03× 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: GameOptionsTable core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt:42 — ClassTooLong — 401 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 1 over it, 1.00× 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.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: UncivServerRunner.serverRun server/src/com/unciv/app/server/UncivServer.kt:281 — MethodTooLong — serverRun runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Ruleset.load core/src/com/unciv/models/ruleset/Ruleset.kt:388 — MethodTooLong — load runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TradeLogic.acceptTrade core/src/com/unciv/logic/trade/TradeLogic.kt:115 — MethodTooLong — acceptTrade runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MapRegions.assignRegions core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:237 — MethodTooLong — assignRegions 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: BattleTable.simulateBattle core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:177 — MethodTooLong — simulateBattle runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TextureArraySpriteBatch.draw core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:954 — MethodTooLong — draw 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.
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: Conditionals.kt ↔ UniqueType.kt core/src/com/unciv/models/ruleset/unique/Conditionals.kt:1 — `core/src/com/unciv/models/ruleset/unique/Conditionals.kt` and `core/src/com/unciv/models/ruleset/unique/UniqueType.kt` change together 68% of the time (41 of the 60 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 41 shared commits counted here, the most recent 3 are `e326a871` Add conditionals for current unit movement (#14695); `686060b1` Carrying conditional and countable (#14369); `0c298dae` Fix `<on [difficulty] or higher/lower>` Conditional (#14236) — run `git show` on any of them.
  • Change coupling: BuildConfig.kt ↔ UncivGame.kt buildSrc/src/main/kotlin/BuildConfig.kt:1 — `buildSrc/src/main/kotlin/BuildConfig.kt` and `core/src/com/unciv/UncivGame.kt` change together 63% of the time (419 of the 663 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 419 shared commits counted here, the most recent 3 are `effc2560` Version rollout (#15838); `ec70806a` Version rollout (#15819); `29fb6fd7` Version rollout (#15796) — run `git show` on any of them.
  • Change coupling: NextTurnAutomation.kt ↔ Trade.kt core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:1 — `core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt` and `core/src/com/unciv/logic/trade/Trade.kt` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0ddbb46c` Implementation for establishing embassies in diplomacy (#13625); `700e2416` AI Open Borders Offer fix (#10178); `cc162460` AI diplomatic actions rework (#10071) — run `git show` on any of them.
  • Change coupling: OverlayButtonData.kt ↔ WorldMapTileUpdater.kt core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt:1 — `core/src/com/unciv/ui/screens/worldscreen/worldmap/OverlayButtonData.kt` and `core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `f0791d7f` View implementation - wander() conversion, minimize MapUnitView essen…; `feb5e606` Revert "fix:Refactor movement logic for hidden unit handling (#15547)…; `c0b1251c` fix:Refactor movement logic for hidden unit handling (#15547) — run `git show` on any of them.
  • Change coupling: Github.kt ↔ ModInfoAndActionPane.kt core/src/com/unciv/logic/github/Github.kt:1 — `core/src/com/unciv/logic/github/Github.kt` and `core/src/com/unciv/ui/screens/modmanager/ModInfoAndActionPane.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c31823c4` Streamed extracting while downloading mods (#14261); `8da4987b` Mod downloading tweaks and fixes (#14114); `2e2ceb99` Fix selecting local mods without preview won't display an avatar (#14… — run `git show` on any of them.
  • Change coupling: CityConstructions.kt ↔ CityScreenConstructionMenu.kt core/src/com/unciv/logic/city/CityConstructions.kt:1 — `core/src/com/unciv/logic/city/CityConstructions.kt` and `core/src/com/unciv/ui/popups/CityScreenConstructionMenu.kt` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `eb511576` chore: Refactor PerpetualConstruction (#15089); `cd22be00` Partially fix #13831 - city construction menu cannot add improvement-…; `2a8edb3a` Added feature to save unitType promotion. (#12894) — run `git show` on any of them.
X3 · Exception handling · Swallowed exception (empty catch) · ×6
  • Swallowed exception (empty catch) android/src/com/unciv/app/AndroidLauncher.kt:116 — 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) core/src/com/unciv/ui/audio/MusicTrackController.kt:159 — 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) core/src/com/unciv/ui/components/fonts/FontRulesetIcons.kt:109 — 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) core/src/com/unciv/ui/components/fonts/FontRulesetIcons.kt:110 — 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) core/src/com/unciv/ui/screens/newgamescreen/MapFileSelectTable.kt:335 — 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) desktop/src/com/unciv/app/desktop/DesktopLauncher.kt:159 — 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.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement · ×4
  • No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement fastlane/metadata/android/en-US/changelogs/1025.txt — Add a Context section explaining why each fix matters (e.g. 'paradrops must avoid movement-range overlap' for fixed paradrop) and a Consequences section noting any negative side effects
  • No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement fastlane/metadata/android/en-US/changelogs/1038.txt — Add a Context section explaining why 'missing from minimum' stats were computed (e.g. to avoid false positives) and a Consequences section noting any trade-offs such as increased computation load
  • No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement fastlane/metadata/android/en-US/changelogs/1077.txt — Add a Context section explaining why each fix matters (e.g. memory/perf pressure from unit triggers, ANR risk from unhandled spies) and a Consequences section noting any negative side effects
  • No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact statement fastlane/metadata/android/en-US/changelogs/1103.txt — Add a Context section explaining why edge tiles were being incorrectly connected through impassible tiles and what modding pain was fixed. Add Consequences noting that pillaged units are destroyed, which may break existing loot mechanics
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×4
  • Duplicated block (9 lines × 2) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:368 — core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:368-376 | core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:378-386 — 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. 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) core/src/com/unciv/logic/simulation/Simulation.kt:270 — core/src/com/unciv/logic/simulation/Simulation.kt:270-278 | core/src/com/unciv/logic/simulation/Simulation.kt:280-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/com/unciv/logic/simulation/Simulation.kt:270` 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 (9 lines × 2) core/src/com/unciv/models/ruleset/Belief.kt:27 — core/src/com/unciv/models/ruleset/Belief.kt:27-35 | core/src/com/unciv/models/ruleset/tech/Technology.kt:47-55 — 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. 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) core/src/com/unciv/logic/map/AStar.kt:151 — core/src/com/unciv/logic/map/AStar.kt:151-159 | core/src/com/unciv/logic/map/BFS.kt:75-83 — 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 lines × 2) · ×4
  • Duplicated block (7 lines × 2) core/src/com/unciv/logic/civilization/Civilization.kt:1056 — core/src/com/unciv/logic/civilization/Civilization.kt:1056-1062 | core/src/com/unciv/logic/civilization/Civilization.kt:1071-1077 — 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 `core/src/com/unciv/logic/civilization/Civilization.kt:1056` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/com/unciv/logic/civilization/Civilization.kt:1078` calls `addHappiness` and `core/src/com/unciv/logic/civilization/Civilization.kt:1063` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) core/src/com/unciv/models/ruleset/Building.kt:472 — core/src/com/unciv/models/ruleset/Building.kt:472-478 | core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:345-351 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/com/unciv/models/ruleset/Building.kt:472` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) core/src/com/unciv/models/ruleset/Policy.kt:107 — core/src/com/unciv/models/ruleset/Policy.kt:107-113 | core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:271-277 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/com/unciv/models/ruleset/Policy.kt:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:277 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:277-283 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:311-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×4
  • Duplicated block (6 lines × 2) core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:268 — core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:268-273 | core/src/com/unciv/logic/civilization/managers/TechManager.kt:331-336 — 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 `core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:290 — core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:290-295 | core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:305-310 — 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 `core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:290` 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) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:641 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:641-646 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:661-666 — 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 `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:641` 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 (6 lines × 2) core/src/com/unciv/ui/components/widgets/BorderedTable.kt:43 — core/src/com/unciv/ui/components/widgets/BorderedTable.kt:43-48 | core/src/com/unciv/ui/components/widgets/BorderedTable.kt:50-55 — 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.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: ModConstants (LCOM4 4) core/src/com/unciv/models/ModConstants.kt:18 — ModConstants's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CrashScreen (LCOM4 4) core/src/com/unciv/ui/crashhandling/CrashScreen.kt:29 — CrashScreen's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DiplomacyScreen (LCOM4 4) core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt:51 — DiplomacyScreen's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes with no rationale · ×2
  • No context/problem and no consequences/trade-offs; only a list of fixes with no rationale fastlane/metadata/android/en-US/changelogs/1100.txt — State the rendering-performance problem being addressed (e.g. frame-rate drops under load) and document the trade-offs of each fix
  • No context/problem and no consequences/trade-offs; only a list of fixes with no rationale fastlane/metadata/android/en-US/changelogs/1241.txt — Add the problem each fix addresses (e.g. spies not recalling after console civ removal) and its consequences (replayability loss if spies are lost mid-game). Also note any new trade-offs for the fixes.
D20 · ADR Quality · No context/problem statement; no consequences/trade-offs · ×2
  • No context/problem statement; no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1111.txt — Add the game/level where bomb shelters appear and why they should be hidden (e.g. not revealing a disabled nuclear threat). Note the trade-off that hiding them may expose players to the weapon.
  • No context/problem statement; no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1122.txt — State the problem (e.g. a rule that countable validation failed for conditional settlers) and document any consequences such as increased complexity or new bugs
D20 · ADR Quality · No context/problem and no consequences; the body is a list of unrelated patches with no decision statement · ×2
  • No context/problem and no consequences; the body is a list of unrelated patches with no decision statement fastlane/metadata/android/en-US/changelogs/1145.txt — State what problem each patch addresses (e.g. embassy-building workflow, AI escape from threat, mod-preview image download) and document trade-offs such as false-negative diplomacy or increased error-message noise
  • No context/problem and no consequences; the body is a list of unrelated patches with no decision statement fastlane/metadata/android/en-US/changelogs/1229.txt — State what problem each patch addresses (e.g. stockpiled-resource cost timing, memory on large maps, AI difficulty parity) and document trade-offs for each change
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:548 — core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:548-562 | core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:572-586 — 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 `core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:548` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:859 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:859-873 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:878-892 — 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 `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:859` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) core/src/com/unciv/models/ruleset/Building.kt:456 — core/src/com/unciv/models/ruleset/Building.kt:456-467 | core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:329-340 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/com/unciv/models/ruleset/Building.kt:456` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/com/unciv/ui/screens/mapeditorscreen/EditorMapHolder.kt:60 — core/src/com/unciv/ui/screens/mapeditorscreen/EditorMapHolder.kt:60-71 | core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:87-98 — 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. 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) core/src/com/unciv/ui/screens/mapeditorscreen/EditorMapHolder.kt:158 — core/src/com/unciv/ui/screens/mapeditorscreen/EditorMapHolder.kt:158-165 | core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:651-658 — 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) core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:359 — core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:359-366 | core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:422-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:51 — core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:51-55 | core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:80-84 — 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 `core/src/com/unciv/logic/automation/civilization/DeclareWarTargetAutomation.kt:51` 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 (5 lines × 2) core/src/com/unciv/models/ruleset/Policy.kt:42 — core/src/com/unciv/models/ruleset/Policy.kt:42-46 | core/src/com/unciv/models/ruleset/tile/TileResource.kt:129-133 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) core/src/com/unciv/ui/screens/mapeditorscreen/tabs/MapEditorLoadTab.kt:68 — core/src/com/unciv/ui/screens/mapeditorscreen/tabs/MapEditorLoadTab.kt:68-78 | core/src/com/unciv/ui/screens/mapeditorscreen/tabs/MapEditorSaveTab.kt:95-105 — 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 (11 lines × 2) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:797 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:797-807 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:917-927 — 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 (7 lines × 9) · ×2
  • Duplicated block (7 lines × 9) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:519 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:519-525 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:579-585 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:627-633 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:671-677 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:724-730 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:805-811 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:925-931 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1061-1067 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1117-1123 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 9) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:539 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:539-545 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:599-605 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:647-653 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:691-697 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:744-750 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:825-831 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:945-951 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1081-1087 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1137-1143 — all 9 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 `core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:539` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience core/src/com/unciv/logic/multiplayer/chat/ChatWebSocket.kt:98 — `HttpClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience core/src/com/unciv/logic/multiplayer/storage/DropBox.kt:28 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking core/src/com/unciv/logic/github/Github.kt:126 — `getPreviewImageOrNull` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
  • Sync-over-async blocking core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:340 — `awaitPing` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
D1 · Cyclomatic Complexity · UniqueTriggerActivation.getTriggerFunction (cyclomatic 328) · ×1
  • UniqueTriggerActivation.getTriggerFunction (cyclomatic 328) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79 — UniqueTriggerActivation.getTriggerFunction has cyclomatic complexity 328 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Conditionals.conditionalApplies (cyclomatic 161) · ×1
  • Conditionals.conditionalApplies (cyclomatic 161) core/src/com/unciv/models/ruleset/unique/Conditionals.kt:28 — Conditionals.conditionalApplies has cyclomatic complexity 161 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Building.getRejectionReasons (cyclomatic 62) · ×1
  • Building.getRejectionReasons (cyclomatic 62) core/src/com/unciv/models/ruleset/Building.kt:280 — Building.getRejectionReasons has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Ruleset.load (cyclomatic 53) · ×1
  • Ruleset.load (cyclomatic 53) core/src/com/unciv/models/ruleset/Ruleset.kt:388 — Ruleset.load 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 · Milestone.getVictoryScreenButtons (cyclomatic 50) · ×1
  • Milestone.getVictoryScreenButtons (cyclomatic 50) core/src/com/unciv/models/ruleset/Victory.kt:277 — Milestone.getVictoryScreenButtons 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 · TradeEvaluation.evaluateSellCost (cyclomatic 48) · ×1
  • TradeEvaluation.evaluateSellCost (cyclomatic 48) core/src/com/unciv/logic/trade/TradeEvaluation.kt:367 — TradeEvaluation.evaluateSellCost has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WorldMapTileUpdater.updateTilesForSelectedUnit (cyclomatic 47) · ×1
  • WorldMapTileUpdater.updateTilesForSelectedUnit (cyclomatic 47) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt:60 — WorldMapTileUpdater.updateTilesForSelectedUnit has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CivilianUnitAutomation.automateCivilianUnit (cyclomatic 43) · ×1
  • CivilianUnitAutomation.automateCivilianUnit (cyclomatic 43) core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt:30 — CivilianUnitAutomation.automateCivilianUnit has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TradeLogic.acceptTrade (cyclomatic 41) · ×1
  • TradeLogic.acceptTrade (cyclomatic 41) core/src/com/unciv/logic/trade/TradeLogic.kt:115 — TradeLogic.acceptTrade has cyclomatic complexity 41 (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 · UnitAutomation.automateUnitMoves (cyclomatic 39) · ×1
  • UnitAutomation.automateUnitMoves (cyclomatic 39) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:49 — UnitAutomation.automateUnitMoves has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SpecificUnitAutomation.automateSettlerActions (cyclomatic 38) · ×1
  • SpecificUnitAutomation.automateSettlerActions (cyclomatic 38) core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt:78 — SpecificUnitAutomation.automateSettlerActions has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TileImprovementFunctions.canImprovementBeBuiltHere (cyclomatic 38) · ×1
  • TileImprovementFunctions.canImprovementBeBuiltHere (cyclomatic 38) core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt:58 — TileImprovementFunctions.canImprovementBeBuiltHere has cyclomatic complexity 38 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TradeEvaluation.evaluateBuyCost (cyclomatic 38) · ×1
  • TradeEvaluation.evaluateBuyCost (cyclomatic 38) core/src/com/unciv/logic/trade/TradeEvaluation.kt:162 — TradeEvaluation.evaluateBuyCost 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 · Tile.matchesSingleTerrainFilter (cyclomatic 37) · ×1
  • Tile.matchesSingleTerrainFilter (cyclomatic 37) core/src/com/unciv/logic/map/tile/Tile.kt:571 — Tile.matchesSingleTerrainFilter has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · OffersListScroll.update (cyclomatic 37) · ×1
  • OffersListScroll.update (cyclomatic 37) core/src/com/unciv/ui/screens/diplomacyscreen/OffersListScroll.kt:48 — OffersListScroll.update 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 · UncivServerRunner.serverRun (cyclomatic 34) · ×1
  • UncivServerRunner.serverRun (cyclomatic 34) server/src/com/unciv/app/server/UncivServer.kt:281 — UncivServerRunner.serverRun 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 · ReligionAutomation.beliefBonusForPlayer (cyclomatic 34) · ×1
  • ReligionAutomation.beliefBonusForPlayer (cyclomatic 34) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:326 — ReligionAutomation.beliefBonusForPlayer has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MovementCost.getMovementCostBetweenAdjacentTiles (cyclomatic 34) · ×1
  • MovementCost.getMovementCostBetweenAdjacentTiles (cyclomatic 34) core/src/com/unciv/logic/map/mapunit/movement/MovementCost.kt:40 — MovementCost.getMovementCostBetweenAdjacentTiles 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 · BaseUnit.getRejectionReasons (cyclomatic 33) · ×1
  • BaseUnit.getRejectionReasons (cyclomatic 33) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:231 — BaseUnit.getRejectionReasons has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnitMovement.cannotPassThroughReason (cyclomatic 32) · ×1
  • UnitMovement.cannotPassThroughReason (cyclomatic 32) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:811 — UnitMovement.cannotPassThroughReason 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 · BaseUnitDescriptions.getBaseUnitCivilopediaTextLines (cyclomatic 32) · ×1
  • BaseUnitDescriptions.getBaseUnitCivilopediaTextLines (cyclomatic 32) core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt:87 — BaseUnitDescriptions.getBaseUnitCivilopediaTextLines has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · TradeAutomation.getCounteroffer (cyclomatic 31) · ×1
  • TradeAutomation.getCounteroffer (cyclomatic 31) core/src/com/unciv/logic/automation/civilization/TradeAutomation.kt:55 — TradeAutomation.getCounteroffer 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 · WorkerAutomation.getImprovementRanking (cyclomatic 31) · ×1
  • WorkerAutomation.getImprovementRanking (cyclomatic 31) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:507 — WorkerAutomation.getImprovementRanking 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 · TileDescription.toMarkup (cyclomatic 31) · ×1
  • TileDescription.toMarkup (cyclomatic 31) core/src/com/unciv/ui/objectdescriptions/TileDescription.kt:23 — TileDescription.toMarkup has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UnitMovement.moveToTile (cyclomatic 30) · ×1
  • UnitMovement.moveToTile (cyclomatic 30) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:500 — UnitMovement.moveToTile 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 · BattleTable.simulateBattle (cyclomatic 30) · ×1
  • BattleTable.simulateBattle (cyclomatic 30) core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:177 — BattleTable.simulateBattle 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 · BuildingDescriptions.getBuildingCivilopediaTextLines (cyclomatic 29) · ×1
  • BuildingDescriptions.getBuildingCivilopediaTextLines (cyclomatic 29) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:168 — BuildingDescriptions.getBuildingCivilopediaTextLines 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.
D1 · Cyclomatic Complexity · UnitActionsTable.update (cyclomatic 28) · ×1
  • UnitActionsTable.update (cyclomatic 28) core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.kt:58 — UnitActionsTable.update has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MotivationToAttackAutomation.hasAtLeastMotivationToAttack (cyclomatic 27) · ×1
  • MotivationToAttackAutomation.hasAtLeastMotivationToAttack (cyclomatic 27) core/src/com/unciv/logic/automation/civilization/MotivationToAttackAutomation.kt:31 — MotivationToAttackAutomation.hasAtLeastMotivationToAttack 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 · RoadBetweenCitiesAutomation.getRoadsToBuildFromCity (cyclomatic 27) · ×1
  • RoadBetweenCitiesAutomation.getRoadsToBuildFromCity (cyclomatic 27) core/src/com/unciv/logic/automation/unit/RoadBetweenCitiesAutomation.kt:120 — RoadBetweenCitiesAutomation.getRoadsToBuildFromCity 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 · CityStateFunctions.getTributeModifiers (cyclomatic 27) · ×1
  • CityStateFunctions.getTributeModifiers (cyclomatic 27) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:429 — CityStateFunctions.getTributeModifiers 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 · DiplomacyTurnManager.nextTurnFlags (cyclomatic 27) · ×1
  • DiplomacyTurnManager.nextTurnFlags (cyclomatic 27) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:141 — DiplomacyTurnManager.nextTurnFlags 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 · UnitMovement.getShortestPath (cyclomatic 27) · ×1
  • UnitMovement.getShortestPath (cyclomatic 27) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:155 — UnitMovement.getShortestPath 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 · PromotionTree.update (cyclomatic 27) · ×1
  • PromotionTree.update (cyclomatic 27) core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt:72 — PromotionTree.update 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 · GameInfo.nextTurn (cyclomatic 26) · ×1
  • GameInfo.nextTurn (cyclomatic 26) core/src/com/unciv/logic/GameInfo.kt:381 — GameInfo.nextTurn has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WorkerAutomation.chooseImprovement (cyclomatic 26) · ×1
  • WorkerAutomation.chooseImprovement (cyclomatic 26) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:415 — WorkerAutomation.chooseImprovement has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · StartNormalizer.calculateFoodBonusesNeeded (cyclomatic 26) · ×1
  • StartNormalizer.calculateFoodBonusesNeeded (cyclomatic 26) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:175 — StartNormalizer.calculateFoodBonusesNeeded has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TileStatFunctions.getTileStatsBreakdown (cyclomatic 26) · ×1
  • TileStatFunctions.getTileStatsBreakdown (cyclomatic 26) core/src/com/unciv/logic/map/tile/TileStatFunctions.kt:57 — TileStatFunctions.getTileStatsBreakdown 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 · BuildingDescriptions.getDescription (cyclomatic 25) · ×1
  • BuildingDescriptions.getDescription (cyclomatic 25) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:48 — BuildingDescriptions.getDescription 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 · UnitTable.tileSelected (cyclomatic 25) · ×1
  • UnitTable.tileSelected (cyclomatic 25) core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt:211 — UnitTable.tileSelected has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TradeLogic.getAvailableOffers (cyclomatic 24) · ×1
  • TradeLogic.getAvailableOffers (cyclomatic 24) core/src/com/unciv/logic/trade/TradeLogic.kt:39 — TradeLogic.getAvailableOffers 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 · Milestone.getVictoryScreenButtonHeaderText (cyclomatic 24) · ×1
  • Milestone.getVictoryScreenButtonHeaderText (cyclomatic 24) core/src/com/unciv/models/ruleset/Victory.kt:202 — Milestone.getVictoryScreenButtonHeaderText 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 · BaseRulesetValidator.checkUnit (cyclomatic 24) · ×1
  • BaseRulesetValidator.checkUnit (cyclomatic 24) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:489 — BaseRulesetValidator.checkUnit 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 · TileLayerBorders.updateBorders (cyclomatic 24) · ×1
  • TileLayerBorders.updateBorders (cyclomatic 24) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerBorders.kt:33 — TileLayerBorders.updateBorders 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 · CityStateDiplomacyTable.getCityStateDiplomacyTableHeader (cyclomatic 24) · ×1
  • CityStateDiplomacyTable.getCityStateDiplomacyTableHeader (cyclomatic 24) core/src/com/unciv/ui/screens/diplomacyscreen/CityStateDiplomacyTable.kt:95 — CityStateDiplomacyTable.getCityStateDiplomacyTableHeader 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 · WorldScreen.update (cyclomatic 24) · ×1
  • WorldScreen.update (cyclomatic 24) core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt:382 — WorldScreen.update 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 · ConstructionAutomation.getOnetimeUniqueBonuses (cyclomatic 23) · ×1
  • ConstructionAutomation.getOnetimeUniqueBonuses (cyclomatic 23) core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:279 — ConstructionAutomation.getOnetimeUniqueBonuses has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AirUnitAutomation.getNukeLocationValue (cyclomatic 23) · ×1
  • AirUnitAutomation.getNukeLocationValue (cyclomatic 23) core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt:163 — AirUnitAutomation.getNukeLocationValue 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 · CityConstructions.completeConstruction (cyclomatic 23) · ×1
  • CityConstructions.completeConstruction (cyclomatic 23) core/src/com/unciv/logic/city/CityConstructions.kt:500 — CityConstructions.completeConstruction 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 · DiplomacyTurnManager.nextTurnDiplomaticModifiers (cyclomatic 23) · ×1
  • DiplomacyTurnManager.nextTurnDiplomaticModifiers (cyclomatic 23) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:271 — DiplomacyTurnManager.nextTurnDiplomaticModifiers 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 · CivInfoTransientCache.updateProximity (cyclomatic 23) · ×1
  • CivInfoTransientCache.updateProximity (cyclomatic 23) core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt:400 — CivInfoTransientCache.updateProximity 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 · UnitMovement.getMovementToTilesAtPosition (cyclomatic 23) · ×1
  • UnitMovement.getMovementToTilesAtPosition (cyclomatic 23) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:66 — UnitMovement.getMovementToTilesAtPosition 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 · Unique.getReplacementText (cyclomatic 23) · ×1
  • Unique.getReplacementText (cyclomatic 23) core/src/com/unciv/models/ruleset/unique/Unique.kt:185 — Unique.getReplacementText 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 · ImprovementDescriptions.getCivilopediaTextLines (cyclomatic 23) · ×1
  • ImprovementDescriptions.getCivilopediaTextLines (cyclomatic 23) core/src/com/unciv/ui/objectdescriptions/ImprovementDescriptions.kt:50 — ImprovementDescriptions.getCivilopediaTextLines 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 · FormattedLine.unsupportedReasons (cyclomatic 23) · ×1
  • FormattedLine.unsupportedReasons (cyclomatic 23) core/src/com/unciv/ui/screens/civilopediascreen/FormattedLine.kt:127 — FormattedLine.unsupportedReasons 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 · TurnManager.startTurn (cyclomatic 22) · ×1
  • TurnManager.startTurn (cyclomatic 22) core/src/com/unciv/logic/civilization/managers/TurnManager.kt:28 — TurnManager.startTurn 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 · MapElevationGenerator.cellularMountainRanges (cyclomatic 22) · ×1
  • MapElevationGenerator.cellularMountainRanges (cyclomatic 22) core/src/com/unciv/logic/map/mapgenerator/MapElevationGenerator.kt:71 — MapElevationGenerator.cellularMountainRanges 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 · TileImprovementFunctions.setImprovement (cyclomatic 22) · ×1
  • TileImprovementFunctions.setImprovement (cyclomatic 22) core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt:193 — TileImprovementFunctions.setImprovement 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 · CityStatsTable.addText (cyclomatic 22) · ×1
  • CityStatsTable.addText (cyclomatic 22) core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt:127 — CityStatsTable.addText 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 · GameInfo.setTransients (cyclomatic 21) · ×1
  • GameInfo.setTransients (cyclomatic 21) core/src/com/unciv/logic/GameInfo.kt:706 — GameInfo.setTransients 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 · ReligionAutomation.beliefBonusForCity (cyclomatic 21) · ×1
  • ReligionAutomation.beliefBonusForCity (cyclomatic 21) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:273 — ReligionAutomation.beliefBonusForCity 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 · Battle.attack (cyclomatic 21) · ×1
  • Battle.attack (cyclomatic 21) core/src/com/unciv/logic/battle/Battle.kt:105 — Battle.attack 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 · GithubAPI.downloadAndExtract (cyclomatic 21) · ×1
  • GithubAPI.downloadAndExtract (cyclomatic 21) core/src/com/unciv/logic/github/GithubAPI.kt:402 — GithubAPI.downloadAndExtract 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 · MapGenerator.applyHumidityAndTemperature (cyclomatic 21) · ×1
  • MapGenerator.applyHumidityAndTemperature (cyclomatic 21) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:530 — MapGenerator.applyHumidityAndTemperature 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 · MapRegions.assignRegions (cyclomatic 21) · ×1
  • MapRegions.assignRegions (cyclomatic 21) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:237 — MapRegions.assignRegions 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 · UnitTurnManager.endTurn (cyclomatic 21) · ×1
  • UnitTurnManager.endTurn (cyclomatic 21) core/src/com/unciv/logic/map/mapunit/UnitTurnManager.kt:10 — UnitTurnManager.endTurn 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 · ApiV2.handleWebSocket (cyclomatic 21) · ×1
  • ApiV2.handleWebSocket (cyclomatic 21) core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:391 — ApiV2.handleWebSocket 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 · BaseUnit.matchesSingleFilter (cyclomatic 21) · ×1
  • BaseUnit.matchesSingleFilter (cyclomatic 21) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:444 — BaseUnit.matchesSingleFilter has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UniqueValidator.checkUnique (cyclomatic 21) · ×1
  • UniqueValidator.checkUnique (cyclomatic 21) core/src/com/unciv/models/ruleset/validation/UniqueValidator.kt:91 — UniqueValidator.checkUnique 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 · TileLayerTerrain.getTileBaseImageLocations (cyclomatic 21) · ×1
  • TileLayerTerrain.getTileBaseImageLocations (cyclomatic 21) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt:45 — TileLayerTerrain.getTileBaseImageLocations 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 · ImprovementPickerScreen.addImprovementRow (cyclomatic 21) · ×1
  • ImprovementPickerScreen.addImprovementRow (cyclomatic 21) core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt:125 — ImprovementPickerScreen.addImprovementRow 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 · Automation.rankStatsForCityWork (cyclomatic 20) · ×1
  • Automation.rankStatsForCityWork (cyclomatic 20) core/src/com/unciv/logic/automation/Automation.kt:78 — Automation.rankStatsForCityWork 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 · Automation.chooseMilitaryUnit (cyclomatic 20) · ×1
  • Automation.chooseMilitaryUnit (cyclomatic 20) core/src/com/unciv/logic/automation/Automation.kt:198 — Automation.chooseMilitaryUnit 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 · NextTurnAutomation.trainSettler (cyclomatic 20) · ×1
  • NextTurnAutomation.trainSettler (cyclomatic 20) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:636 — NextTurnAutomation.trainSettler 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 · RoadToAutomation.automateConnectRoad (cyclomatic 20) · ×1
  • RoadToAutomation.automateConnectRoad (cyclomatic 20) core/src/com/unciv/logic/automation/unit/RoadToAutomation.kt:36 — RoadToAutomation.automateConnectRoad 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 · Nuke.doNukeExplosionForTile (cyclomatic 20) · ×1
  • Nuke.doNukeExplosionForTile (cyclomatic 20) core/src/com/unciv/logic/battle/Nuke.kt:195 — Nuke.doNukeExplosionForTile 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 · CityStats.updateFinalStatList (cyclomatic 20) · ×1
  • CityStats.updateFinalStatList (cyclomatic 20) core/src/com/unciv/logic/city/CityStats.kt:521 — CityStats.updateFinalStatList 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 · ExploredRegion.checkTilePosition (cyclomatic 20) · ×1
  • ExploredRegion.checkTilePosition (cyclomatic 20) core/src/com/unciv/logic/civilization/ExploredRegion.kt:95 — ExploredRegion.checkTilePosition 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 · ImprovementFunctions.getImprovementBuildingProblems (cyclomatic 20) · ×1
  • ImprovementFunctions.getImprovementBuildingProblems (cyclomatic 20) core/src/com/unciv/logic/civilization/managers/ImprovementFunctions.kt:17 — ImprovementFunctions.getImprovementBuildingProblems 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 · TileNormalizer.normalizeToRuleset (cyclomatic 20) · ×1
  • TileNormalizer.normalizeToRuleset (cyclomatic 20) core/src/com/unciv/logic/map/tile/TileNormalizer.kt:9 — TileNormalizer.normalizeToRuleset 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 · Spy.endTurn (cyclomatic 20) · ×1
  • Spy.endTurn (cyclomatic 20) core/src/com/unciv/models/Spy.kt:88 — Spy.endTurn 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 · Terrain.getCivilopediaTextLines (cyclomatic 20) · ×1
  • Terrain.getCivilopediaTextLines (cyclomatic 20) core/src/com/unciv/models/ruleset/tile/Terrain.kt:81 — Terrain.getCivilopediaTextLines 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 · Tokenizer.tokenize (cyclomatic 20) · ×1
  • Tokenizer.tokenize (cyclomatic 20) core/src/com/unciv/models/ruleset/unique/expressions/Tokenizer.kt:75 — Tokenizer.tokenize 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 · TileGroupMap.draw (cyclomatic 20) · ×1
  • TileGroupMap.draw (cyclomatic 20) core/src/com/unciv/ui/components/tilegroups/TileGroupMap.kt:223 — TileGroupMap.draw 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 · TechnologyDescriptions.getTechEnabledIcons (cyclomatic 20) · ×1
  • TechnologyDescriptions.getTechEnabledIcons (cyclomatic 20) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:99 — TechnologyDescriptions.getTechEnabledIcons 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 · DetailedStatsPopup.traverseTree (cyclomatic 20) · ×1
  • DetailedStatsPopup.traverseTree (cyclomatic 20) core/src/com/unciv/ui/screens/cityscreen/DetailedStatsPopup.kt:199 — DetailedStatsPopup.traverseTree 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 · LineChart.prepareForDraw (cyclomatic 20) · ×1
  • LineChart.prepareForDraw (cyclomatic 20) core/src/com/unciv/ui/screens/victoryscreen/LineChart.kt:147 — LineChart.prepareForDraw 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 · UniqueDocsWriter.writeUniqueTypes (cyclomatic 19) · ×1
  • UniqueDocsWriter.writeUniqueTypes (cyclomatic 19) desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt:80 — UniqueDocsWriter.writeUniqueTypes 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 · TargetHelper.getAttackableEnemies (cyclomatic 19) · ×1
  • TargetHelper.getAttackableEnemies (cyclomatic 19) core/src/com/unciv/logic/battle/TargetHelper.kt:15 — TargetHelper.getAttackableEnemies 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 · CityExpansionManager.rankTileForExpansion (cyclomatic 19) · ×1
  • CityExpansionManager.rankTileForExpansion (cyclomatic 19) core/src/com/unciv/logic/city/managers/CityExpansionManager.kt:124 — CityExpansionManager.rankTileForExpansion 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 · MapElevationGenerator.cellularHills (cyclomatic 19) · ×1
  • MapElevationGenerator.cellularHills (cyclomatic 19) core/src/com/unciv/logic/map/mapgenerator/MapElevationGenerator.kt:119 — MapElevationGenerator.cellularHills 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 · MapUnit.healingAmountForTile (cyclomatic 19) · ×1
  • MapUnit.healingAmountForTile (cyclomatic 19) core/src/com/unciv/logic/map/mapunit/MapUnit.kt:536 — MapUnit.healingAmountForTile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MapUnit.doAction (cyclomatic 19) · ×1
  • MapUnit.doAction (cyclomatic 19) core/src/com/unciv/logic/map/mapunit/MapUnit.kt:903 — MapUnit.doAction 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 · Policy.getCivilopediaTextLines (cyclomatic 19) · ×1
  • Policy.getCivilopediaTextLines (cyclomatic 19) core/src/com/unciv/models/ruleset/Policy.kt:79 — Policy.getCivilopediaTextLines 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 · BaseUnit.evaluateForce (cyclomatic 19) · ×1
  • BaseUnit.evaluateForce (cyclomatic 19) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:526 — BaseUnit.evaluateForce 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 · MusicController.musicTimerTask (cyclomatic 19) · ×1
  • MusicController.musicTimerTask (cyclomatic 19) core/src/com/unciv/ui/audio/MusicController.kt:240 — MusicController.musicTimerTask 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 · DetailedStatsPopup.update (cyclomatic 19) · ×1
  • DetailedStatsPopup.update (cyclomatic 19) core/src/com/unciv/ui/screens/cityscreen/DetailedStatsPopup.kt:74 — DetailedStatsPopup.update 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 · ImprovementPickerScreen.getProblemReport (cyclomatic 19) · ×1
  • ImprovementPickerScreen.getProblemReport (cyclomatic 19) core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt:276 — ImprovementPickerScreen.getProblemReport 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 · TechPickerScreen.selectTechnology (cyclomatic 19) · ×1
  • TechPickerScreen.selectTechnology (cyclomatic 19) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:394 — TechPickerScreen.selectTechnology 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 · Automation.allowSpendingResource (cyclomatic 18) · ×1
  • Automation.allowSpendingResource (cyclomatic 18) core/src/com/unciv/logic/automation/Automation.kt:322 — Automation.allowSpendingResource 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 · CityLocationTileRanker.rankTile (cyclomatic 18) · ×1
  • CityLocationTileRanker.rankTile (cyclomatic 18) core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt:183 — CityLocationTileRanker.rankTile 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 · ReligiousUnitAutomation.automateInquisitor (cyclomatic 18) · ×1
  • ReligiousUnitAutomation.automateInquisitor (cyclomatic 18) core/src/com/unciv/logic/automation/unit/ReligiousUnitAutomation.kt:77 — ReligiousUnitAutomation.automateInquisitor has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WorkerAutomation.isAutomationWorkableTile (cyclomatic 18) · ×1
  • WorkerAutomation.isAutomationWorkableTile (cyclomatic 18) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:289 — WorkerAutomation.isAutomationWorkableTile 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 · Battle.postBattleNotifications (cyclomatic 18) · ×1
  • Battle.postBattleNotifications (cyclomatic 18) core/src/com/unciv/logic/battle/Battle.kt:516 — Battle.postBattleNotifications 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 · TargetHelper.containsAttackableEnemy (cyclomatic 18) · ×1
  • TargetHelper.containsAttackableEnemy (cyclomatic 18) core/src/com/unciv/logic/battle/TargetHelper.kt:113 — TargetHelper.containsAttackableEnemy 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 · GithubAPI.parseUrl (cyclomatic 18) · ×1
  • GithubAPI.parseUrl (cyclomatic 18) core/src/com/unciv/logic/github/GithubAPI.kt:318 — GithubAPI.parseUrl 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 · TileMap.forEachTileAtDistance (cyclomatic 18) · ×1
  • TileMap.forEachTileAtDistance (cyclomatic 18) core/src/com/unciv/logic/map/TileMap.kt:319 — TileMap.forEachTileAtDistance 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 · TileMap.getNeighborTileClockPosition (cyclomatic 18) · ×1
  • TileMap.getNeighborTileClockPosition (cyclomatic 18) core/src/com/unciv/logic/map/TileMap.kt:410 — TileMap.getNeighborTileClockPosition 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 · MapGenerator.mirror (cyclomatic 18) · ×1
  • MapGenerator.mirror (cyclomatic 18) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:263 — MapGenerator.mirror 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 · PathingMap.getShortestPath (cyclomatic 18) · ×1
  • PathingMap.getShortestPath (cyclomatic 18) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:148 — PathingMap.getShortestPath 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 · AStarPathfinder.calculateNeighborNode (cyclomatic 18) · ×1
  • AStarPathfinder.calculateNeighborNode (cyclomatic 18) core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt:160 — AStarPathfinder.calculateNeighborNode 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 · BaseRulesetValidator.checkEventCircularTriggers (cyclomatic 18) · ×1
  • BaseRulesetValidator.checkEventCircularTriggers (cyclomatic 18) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:221 — BaseRulesetValidator.checkEventCircularTriggers 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 · FormattedLine.render (cyclomatic 18) · ×1
  • FormattedLine.render (cyclomatic 18) core/src/com/unciv/ui/screens/civilopediascreen/FormattedLine.kt:279 — FormattedLine.render 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 · ResourcesOverviewTab.getExtraDrilldown (cyclomatic 18) · ×1
  • ResourcesOverviewTab.getExtraDrilldown (cyclomatic 18) core/src/com/unciv/ui/screens/overviewscreen/ResourcesOverviewTab.kt:279 — ResourcesOverviewTab.getExtraDrilldown 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 · VictoryScreenIllustrations.victoryCompletePercent (cyclomatic 18) · ×1
  • VictoryScreenIllustrations.victoryCompletePercent (cyclomatic 18) core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt:219 — VictoryScreenIllustrations.victoryCompletePercent 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 · WorldMapHolder.onTileClicked (cyclomatic 18) · ×1
  • WorldMapHolder.onTileClicked (cyclomatic 18) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:163 — WorldMapHolder.onTileClicked 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 · DiplomacyAutomation.offerPeaceTreaty (cyclomatic 17) · ×1
  • DiplomacyAutomation.offerPeaceTreaty (cyclomatic 17) core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:399 — DiplomacyAutomation.offerPeaceTreaty 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 · NextTurnAutomation.valueCityStateAlliance (cyclomatic 17) · ×1
  • NextTurnAutomation.valueCityStateAlliance (cyclomatic 17) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:167 — NextTurnAutomation.valueCityStateAlliance 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 · BattleHelper.getCityAttackValue (cyclomatic 17) · ×1
  • BattleHelper.getCityAttackValue (cyclomatic 17) core/src/com/unciv/logic/automation/unit/BattleHelper.kt:104 — BattleHelper.getCityAttackValue 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 · DiplomacyManager.relationshipIgnoreAfraid (cyclomatic 17) · ×1
  • DiplomacyManager.relationshipIgnoreAfraid (cyclomatic 17) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt:390 — DiplomacyManager.relationshipIgnoreAfraid has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TurnManager.endTurn (cyclomatic 17) · ×1
  • TurnManager.endTurn (cyclomatic 17) core/src/com/unciv/logic/civilization/managers/TurnManager.kt:254 — TurnManager.endTurn 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 · Github.rewriteModOptions (cyclomatic 17) · ×1
  • Github.rewriteModOptions (cyclomatic 17) core/src/com/unciv/logic/github/Github.kt:196 — Github.rewriteModOptions 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 · RegionStartFinder.evaluateTileForStart (cyclomatic 17) · ×1
  • RegionStartFinder.evaluateTileForStart (cyclomatic 17) core/src/com/unciv/logic/map/mapgenerator/mapregions/RegionStartFinder.kt:158 — RegionStartFinder.evaluateTileForStart 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 · UnitMovement.getCannotMoveToReason (cyclomatic 17) · ×1
  • UnitMovement.getCannotMoveToReason (cyclomatic 17) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:735 — UnitMovement.getCannotMoveToReason has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Simulation.text (cyclomatic 17) · ×1
  • Simulation.text (cyclomatic 17) core/src/com/unciv/logic/simulation/Simulation.kt:232 — Simulation.text 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 · Building.matchesSingleFilter (cyclomatic 17) · ×1
  • Building.matchesSingleFilter (cyclomatic 17) core/src/com/unciv/models/ruleset/Building.kt:518 — Building.matchesSingleFilter has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · GenerateStringsFromJSONs.serializeElement (cyclomatic 17) · ×1
  • GenerateStringsFromJSONs.serializeElement (cyclomatic 17) core/src/com/unciv/models/translations/TranslationFileWriter.kt:670 — GenerateStringsFromJSONs.serializeElement has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: GenerateStringsFromJSONs.getJavaClassByName (cyclomatic 26) 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 · CityTileGroup.update (cyclomatic 17) · ×1
  • CityTileGroup.update (cyclomatic 17) core/src/com/unciv/ui/components/tilegroups/CityTileGroup.kt:30 — CityTileGroup.update 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 · BaseUnitDescriptions.getDifferences (cyclomatic 17) · ×1
  • BaseUnitDescriptions.getDifferences (cyclomatic 17) core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt:263 — BaseUnitDescriptions.getDifferences 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 · ResourceDescriptions.getCivilopediaTextLines (cyclomatic 17) · ×1
  • ResourceDescriptions.getCivilopediaTextLines (cyclomatic 17) core/src/com/unciv/ui/objectdescriptions/ResourceDescriptions.kt:12 — ResourceDescriptions.getCivilopediaTextLines 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 · TechnologyDescriptions.buildTechIconsIndex (cyclomatic 17) · ×1
  • TechnologyDescriptions.buildTechIconsIndex (cyclomatic 17) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:181 — TechnologyDescriptions.buildTechIconsIndex 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 · TechnologyDescriptions.getCivilopediaTextLines (cyclomatic 17) · ×1
  • TechnologyDescriptions.getCivilopediaTextLines (cyclomatic 17) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:250 — TechnologyDescriptions.getCivilopediaTextLines 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 · ModCheckTab.runModChecker (cyclomatic 17) · ×1
  • ModCheckTab.runModChecker (cyclomatic 17) core/src/com/unciv/ui/popups/options/ModCheckTab.kt:130 — ModCheckTab.runModChecker 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 · MultiplayerTab.addMultiplayerServerOptions (cyclomatic 17) · ×1
  • MultiplayerTab.addMultiplayerServerOptions (cyclomatic 17) core/src/com/unciv/ui/popups/options/MultiplayerTab.kt:85 — MultiplayerTab.addMultiplayerServerOptions 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 · PromotionPickerScreen.addConnectingLines (cyclomatic 17) · ×1
  • PromotionPickerScreen.addConnectingLines (cyclomatic 17) core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt:264 — PromotionPickerScreen.addConnectingLines 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 · SystemUtils.getSystemInfo (cyclomatic 16) · ×1
  • SystemUtils.getSystemInfo (cyclomatic 16) desktop/src/com/unciv/app/desktop/SystemUtils.kt:11 — SystemUtils.getSystemInfo 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 · BarbarianManager.placeBarbarianEncampment (cyclomatic 16) · ×1
  • BarbarianManager.placeBarbarianEncampment (cyclomatic 16) core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt:78 — BarbarianManager.placeBarbarianEncampment 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 · DiplomacyAutomation.wantsToSignDefensivePact (cyclomatic 16) · ×1
  • DiplomacyAutomation.wantsToSignDefensivePact (cyclomatic 16) core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:310 — DiplomacyAutomation.wantsToSignDefensivePact 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 · NextTurnAutomation.automateCivMoves (cyclomatic 16) · ×1
  • NextTurnAutomation.automateCivMoves (cyclomatic 16) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:46 — NextTurnAutomation.automateCivMoves 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 · AirUnitAutomation.automateFighter (cyclomatic 16) · ×1
  • AirUnitAutomation.automateFighter (cyclomatic 16) core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt:25 — AirUnitAutomation.automateFighter 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 · UnitAutomation.tryRetreat (cyclomatic 16) · ×1
  • UnitAutomation.tryRetreat (cyclomatic 16) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:291 — UnitAutomation.tryRetreat 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 · UnitAutomation.tryHealUnit (cyclomatic 16) · ×1
  • UnitAutomation.tryHealUnit (cyclomatic 16) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:350 — UnitAutomation.tryHealUnit 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 · CityConquestFunctions.liberateCity (cyclomatic 16) · ×1
  • CityConquestFunctions.liberateCity (cyclomatic 16) core/src/com/unciv/logic/city/managers/CityConquestFunctions.kt:203 — CityConquestFunctions.liberateCity 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 · CityPopulationManager.unassignExtraPopulation (cyclomatic 16) · ×1
  • CityPopulationManager.unassignExtraPopulation (cyclomatic 16) core/src/com/unciv/logic/city/managers/CityPopulationManager.kt:212 — CityPopulationManager.unassignExtraPopulation 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 · CityStateFunctions.updateAllyCivForCityState (cyclomatic 16) · ×1
  • CityStateFunctions.updateAllyCivForCityState (cyclomatic 16) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:287 — CityStateFunctions.updateAllyCivForCityState 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 · StartNormalizer.normalizeProduction (cyclomatic 16) · ×1
  • StartNormalizer.normalizeProduction (cyclomatic 16) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:46 — StartNormalizer.normalizeProduction 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 · StartNormalizer.placeFoodBonuses (cyclomatic 16) · ×1
  • StartNormalizer.placeFoodBonuses (cyclomatic 16) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:243 — StartNormalizer.placeFoodBonuses 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 · Milestone.getFocus (cyclomatic 16) · ×1
  • Milestone.getFocus (cyclomatic 16) core/src/com/unciv/models/ruleset/Victory.kt:410 — Milestone.getFocus has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Milestone.getFocusFromCountable (cyclomatic 19) 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 · BaseRulesetValidator.checkPromotionCircularReferences (cyclomatic 16) · ×1
  • BaseRulesetValidator.checkPromotionCircularReferences (cyclomatic 16) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:311 — BaseRulesetValidator.checkPromotionCircularReferences 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 · RulesetValidator.checkTilesetSanity (cyclomatic 16) · ×1
  • RulesetValidator.checkTilesetSanity (cyclomatic 16) core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:783 — RulesetValidator.checkTilesetSanity 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 · UniqueValidator.getModifierErrors (cyclomatic 16) · ×1
  • UniqueValidator.getModifierErrors (cyclomatic 16) core/src/com/unciv/models/ruleset/validation/UniqueValidator.kt:234 — UniqueValidator.getModifierErrors 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 · SkinStrings.getUiBackground (cyclomatic 16) · ×1
  • SkinStrings.getUiBackground (cyclomatic 16) core/src/com/unciv/models/skins/SkinStrings.kt:50 — SkinStrings.getUiBackground 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 · FontRulesetIcons.addRulesetImages (cyclomatic 16) · ×1
  • FontRulesetIcons.addRulesetImages (cyclomatic 16) core/src/com/unciv/ui/components/fonts/FontRulesetIcons.kt:38 — FontRulesetIcons.addRulesetImages 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 · CityButton.updateHiddenUnitMarkers (cyclomatic 16) · ×1
  • CityButton.updateHiddenUnitMarkers (cyclomatic 16) core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.kt:115 — CityButton.updateHiddenUnitMarkers 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 · NewGameScreen.getErrorMessage (cyclomatic 16) · ×1
  • NewGameScreen.getErrorMessage (cyclomatic 16) core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:167 — NewGameScreen.getErrorMessage 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 · GlobalPoliticsOverviewTable.updateDiagram (cyclomatic 16) · ×1
  • GlobalPoliticsOverviewTable.updateDiagram (cyclomatic 16) core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt:256 — GlobalPoliticsOverviewTable.updateDiagram 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 · TechPickerScreen.createTechTable (cyclomatic 16) · ×1
  • TechPickerScreen.createTechTable (cyclomatic 16) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:145 — TechPickerScreen.createTechTable 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 · TechPickerScreen.addConnectingLines (cyclomatic 16) · ×1
  • TechPickerScreen.addConnectingLines (cyclomatic 16) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:255 — TechPickerScreen.addConnectingLines 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 · WorldMapHolder.moveUnitToTargetTile (cyclomatic 16) · ×1
  • WorldMapHolder.moveUnitToTargetTile (cyclomatic 16) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:282 — WorldMapHolder.moveUnitToTargetTile 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.kt core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.kt:179 — core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is WidgetIndex.getRelation at line 179), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “chore: Fix global policy diagram click to open legend intercepted by lines (#15439)”; “chore: Better fix for that `GlobalPoliticsDiagramGroup.Relations.entries` bug (#15410)”; “Solve #15393 GlobalPoliticsDiagramGroup crashing bug - not solved the root cause since this is a compiler bug”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 18:20:58 +00:00' --until='2026-10-24 18:20:58 +00:00' --full-history --no-merges -- core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsDiagramGroup.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.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment core/src/com/unciv/ui/components/tilegroups/layers/TileLayerMisc.kt:311 — // FIXME: Culled when too large and panned away. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · UniqueTriggerActivation.getTriggerFunction (cognitive 498) · ×1
  • UniqueTriggerActivation.getTriggerFunction (cognitive 498) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:79 — UniqueTriggerActivation.getTriggerFunction has cognitive complexity 498 (threshold 15). Drivers by points: if/else 214 (406 pts), boolean chains 42, loops 18 (39 pts), match/switch 7 (11 pts) (nesting depth added 217). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Ruleset.load (cognitive 89) · ×1
  • Ruleset.load (cognitive 89) core/src/com/unciv/models/ruleset/Ruleset.kt:388 — Ruleset.load has cognitive complexity 89 (threshold 15). Drivers by points: if/else 41 (65 pts), loops 8 (20 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorldMapTileUpdater.updateTilesForSelectedUnit (cognitive 87) · ×1
  • WorldMapTileUpdater.updateTilesForSelectedUnit (cognitive 87) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapTileUpdater.kt:60 — WorldMapTileUpdater.updateTilesForSelectedUnit has cognitive complexity 87 (threshold 15). Drivers by points: if/else 35 (59 pts), loops 9 (18 pts), boolean chains 10 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Building.getRejectionReasons (cognitive 85) · ×1
  • Building.getRejectionReasons (cognitive 85) core/src/com/unciv/models/ruleset/Building.kt:280 — Building.getRejectionReasons has cognitive complexity 85 (threshold 15). Drivers by points: if/else 35 (68 pts), boolean chains 9, loops 5 (6 pts), match/switch 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Milestone.getVictoryScreenButtons (cognitive 85) · ×1
  • Milestone.getVictoryScreenButtons (cognitive 85) core/src/com/unciv/models/ruleset/Victory.kt:277 — Milestone.getVictoryScreenButtons has cognitive complexity 85 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 7 (14 pts), boolean chains 12, match/switch 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Conditionals.conditionalApplies (cognitive 69) · ×1
  • Conditionals.conditionalApplies (cognitive 69) core/src/com/unciv/models/ruleset/unique/Conditionals.kt:28 — Conditionals.conditionalApplies has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 37, if/else 26 (31 pts), match/switch 1 (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 · TileGroupMap.draw (cognitive 60) · ×1
  • TileGroupMap.draw (cognitive 60) core/src/com/unciv/ui/components/tilegroups/TileGroupMap.kt:223 — TileGroupMap.draw has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 4 (12 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 38). 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 · UnitMovement.getShortestPath (cognitive 56) · ×1
  • UnitMovement.getShortestPath (cognitive 56) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:155 — UnitMovement.getShortestPath has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (13 pts), boolean chains 6 (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 · UncivServerRunner.serverRun (cognitive 54) · ×1
  • UncivServerRunner.serverRun (cognitive 54) server/src/com/unciv/app/server/UncivServer.kt:281 — UncivServerRunner.serverRun has cognitive complexity 54 (threshold 15). Drivers by points: if/else 30 (42 pts), match/switch 2 (5 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityConstructions.completeConstruction (cognitive 53) · ×1
  • CityConstructions.completeConstruction (cognitive 53) core/src/com/unciv/logic/city/CityConstructions.kt:500 — CityConstructions.completeConstruction has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CivilianUnitAutomation.automateCivilianUnit (cognitive 52) · ×1
  • CivilianUnitAutomation.automateCivilianUnit (cognitive 52) core/src/com/unciv/logic/automation/unit/CivilianUnitAutomation.kt:30 — CivilianUnitAutomation.automateCivilianUnit has cognitive complexity 52 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 14 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WorkerAutomation.getImprovementRanking (cognitive 52) · ×1
  • WorkerAutomation.getImprovementRanking (cognitive 52) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:507 — WorkerAutomation.getImprovementRanking has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 12 (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 · MapElevationGenerator.cellularMountainRanges (cognitive 48) · ×1
  • MapElevationGenerator.cellularMountainRanges (cognitive 48) core/src/com/unciv/logic/map/mapgenerator/MapElevationGenerator.kt:71 — MapElevationGenerator.cellularMountainRanges has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TradeEvaluation.evaluateSellCost (cognitive 48) · ×1
  • TradeEvaluation.evaluateSellCost (cognitive 48) core/src/com/unciv/logic/trade/TradeEvaluation.kt:367 — TradeEvaluation.evaluateSellCost has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 6 (12 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PromotionTree.update (cognitive 48) · ×1
  • PromotionTree.update (cognitive 48) core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt:72 — PromotionTree.update has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 7 (11 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BattleTable.simulateBattle (cognitive 48) · ×1
  • BattleTable.simulateBattle (cognitive 48) core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:177 — BattleTable.simulateBattle has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 10, match/switch 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TradeLogic.acceptTrade (cognitive 47) · ×1
  • TradeLogic.acceptTrade (cognitive 47) core/src/com/unciv/logic/trade/TradeLogic.kt:115 — TradeLogic.acceptTrade has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 10, loops 5 (8 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseUnit.getRejectionReasons (cognitive 47) · ×1
  • BaseUnit.getRejectionReasons (cognitive 47) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:231 — BaseUnit.getRejectionReasons has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 9 (13 pts), boolean chains 6 (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 · TradeAutomation.getCounteroffer (cognitive 46) · ×1
  • TradeAutomation.getCounteroffer (cognitive 46) core/src/com/unciv/logic/automation/civilization/TradeAutomation.kt:55 — TradeAutomation.getCounteroffer has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 10, loops 7 (9 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 · AirUnitAutomation.getNukeLocationValue (cognitive 46) · ×1
  • AirUnitAutomation.getNukeLocationValue (cognitive 46) core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt:163 — AirUnitAutomation.getNukeLocationValue has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoadBetweenCitiesAutomation.getRoadsToBuildFromCity (cognitive 46) · ×1
  • RoadBetweenCitiesAutomation.getRoadsToBuildFromCity (cognitive 46) core/src/com/unciv/logic/automation/unit/RoadBetweenCitiesAutomation.kt:120 — RoadBetweenCitiesAutomation.getRoadsToBuildFromCity has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpecificUnitAutomation.automateSettlerActions (cognitive 46) · ×1
  • SpecificUnitAutomation.automateSettlerActions (cognitive 46) core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt:78 — SpecificUnitAutomation.automateSettlerActions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 16 (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 · DiplomacyTurnManager.nextTurnFlags (cognitive 46) · ×1
  • DiplomacyTurnManager.nextTurnFlags (cognitive 46) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:141 — DiplomacyTurnManager.nextTurnFlags has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (8 pts), match/switch 2 (6 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UniqueDocsWriter.writeUniqueTypes (cognitive 45) · ×1
  • UniqueDocsWriter.writeUniqueTypes (cognitive 45) desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt:80 — UniqueDocsWriter.writeUniqueTypes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 3 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapGenerator.applyHumidityAndTemperature (cognitive 45) · ×1
  • MapGenerator.applyHumidityAndTemperature (cognitive 45) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:530 — MapGenerator.applyHumidityAndTemperature has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (37 pts), match/switch 2 (4 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 · UnitMovement.getMovementToTilesAtPosition (cognitive 44) · ×1
  • UnitMovement.getMovementToTilesAtPosition (cognitive 44) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:66 — UnitMovement.getMovementToTilesAtPosition has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 6, loops 3 (6 pts), match/switch 1 (4 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 · TradeEvaluation.evaluateBuyCost (cognitive 44) · ×1
  • TradeEvaluation.evaluateBuyCost (cognitive 44) core/src/com/unciv/logic/trade/TradeEvaluation.kt:162 — TradeEvaluation.evaluateBuyCost has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OffersListScroll.update (cognitive 44) · ×1
  • OffersListScroll.update (cognitive 44) core/src/com/unciv/ui/screens/diplomacyscreen/OffersListScroll.kt:48 — OffersListScroll.update has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 3 (8 pts), boolean chains 5, loops 3 (4 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 · BaseUnitDescriptions.getBaseUnitCivilopediaTextLines (cognitive 43) · ×1
  • BaseUnitDescriptions.getBaseUnitCivilopediaTextLines (cognitive 43) core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt:87 — BaseUnitDescriptions.getBaseUnitCivilopediaTextLines has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (30 pts), boolean chains 8, loops 1 (3 pts), match/switch 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 · TileDescription.toMarkup (cognitive 42) · ×1
  • TileDescription.toMarkup (cognitive 42) core/src/com/unciv/ui/objectdescriptions/TileDescription.kt:23 — TileDescription.toMarkup has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 10, loops 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 · UnitActionsTable.update (cognitive 42) · ×1
  • UnitActionsTable.update (cognitive 42) core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsTable.kt:58 — UnitActionsTable.update has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 8 (13 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 · UnitMovement.moveToTile (cognitive 41) · ×1
  • UnitMovement.moveToTile (cognitive 41) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:500 — UnitMovement.moveToTile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 9, 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 · UnitAutomation.automateUnitMoves (cognitive 40) · ×1
  • UnitAutomation.automateUnitMoves (cognitive 40) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:49 — UnitAutomation.automateUnitMoves has cognitive complexity 40 (threshold 15). Drivers by points: if/else 27 (29 pts), boolean chains 11 (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 · ExploredRegion.checkTilePosition (cognitive 40) · ×1
  • ExploredRegion.checkTilePosition (cognitive 40) core/src/com/unciv/logic/civilization/ExploredRegion.kt:95 — ExploredRegion.checkTilePosition has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 5 (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 · TileStatFunctions.getTileStatsBreakdown (cognitive 40) · ×1
  • TileStatFunctions.getTileStatsBreakdown (cognitive 40) core/src/com/unciv/logic/map/tile/TileStatFunctions.kt:57 — TileStatFunctions.getTileStatsBreakdown has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Unique.getReplacementText (cognitive 40) · ×1
  • Unique.getReplacementText (cognitive 40) core/src/com/unciv/models/ruleset/unique/Unique.kt:185 — Unique.getReplacementText has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 10, match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.checkUnit (cognitive 40) · ×1
  • BaseRulesetValidator.checkUnit (cognitive 40) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:489 — BaseRulesetValidator.checkUnit has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 9 (12 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildingDescriptions.getBuildingCivilopediaTextLines (cognitive 40) · ×1
  • BuildingDescriptions.getBuildingCivilopediaTextLines (cognitive 40) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:168 — BuildingDescriptions.getBuildingCivilopediaTextLines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (32 pts), loops 3 (5 pts), boolean chains 3 (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 · DetailedStatsPopup.traverseTree (cognitive 40) · ×1
  • DetailedStatsPopup.traverseTree (cognitive 40) core/src/com/unciv/ui/screens/cityscreen/DetailedStatsPopup.kt:199 — DetailedStatsPopup.traverseTree has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 4 (7 pts), match/switch 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 · UnitMovement.cannotPassThroughReason (cognitive 39) · ×1
  • UnitMovement.cannotPassThroughReason (cognitive 39) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:811 — UnitMovement.cannotPassThroughReason has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 15 (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 · BuildingDescriptions.getDescription (cognitive 39) · ×1
  • BuildingDescriptions.getDescription (cognitive 39) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:48 — BuildingDescriptions.getDescription has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (30 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiV2.handleWebSocket (cognitive 38) · ×1
  • ApiV2.handleWebSocket (cognitive 38) core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:391 — ApiV2.handleWebSocket has cognitive complexity 38 (threshold 15). Drivers by points: error handling 7 (18 pts), if/else 4 (8 pts), loops 3 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LineChart.prepareForDraw (cognitive 38) · ×1
  • LineChart.prepareForDraw (cognitive 38) core/src/com/unciv/ui/screens/victoryscreen/LineChart.kt:147 — LineChart.prepareForDraw has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (30 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegionStartFinder.evaluateTileForStart (cognitive 37) · ×1
  • RegionStartFinder.evaluateTileForStart (cognitive 37) core/src/com/unciv/logic/map/mapgenerator/mapregions/RegionStartFinder.kt:158 — RegionStartFinder.evaluateTileForStart has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 1 (2 pts), boolean chains 1, 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 · MovementCost.getMovementCostBetweenAdjacentTiles (cognitive 37) · ×1
  • MovementCost.getMovementCostBetweenAdjacentTiles (cognitive 37) core/src/com/unciv/logic/map/mapunit/movement/MovementCost.kt:40 — MovementCost.getMovementCostBetweenAdjacentTiles has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 13 (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 · CityStateDiplomacyTable.getCityStateDiplomacyTableHeader (cognitive 37) · ×1
  • CityStateDiplomacyTable.getCityStateDiplomacyTableHeader (cognitive 37) core/src/com/unciv/ui/screens/diplomacyscreen/CityStateDiplomacyTable.kt:95 — CityStateDiplomacyTable.getCityStateDiplomacyTableHeader has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (28 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoadToAutomation.automateConnectRoad (cognitive 35) · ×1
  • RoadToAutomation.automateConnectRoad (cognitive 35) core/src/com/unciv/logic/automation/unit/RoadToAutomation.kt:36 — RoadToAutomation.automateConnectRoad has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImprovementFunctions.getImprovementBuildingProblems (cognitive 34) · ×1
  • ImprovementFunctions.getImprovementBuildingProblems (cognitive 34) core/src/com/unciv/logic/civilization/managers/ImprovementFunctions.kt:17 — ImprovementFunctions.getImprovementBuildingProblems has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapElevationGenerator.cellularHills (cognitive 34) · ×1
  • MapElevationGenerator.cellularHills (cognitive 34) core/src/com/unciv/logic/map/mapgenerator/MapElevationGenerator.kt:119 — MapElevationGenerator.cellularHills has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tokenizer.tokenize (cognitive 34) · ×1
  • Tokenizer.tokenize (cognitive 34) core/src/com/unciv/models/ruleset/unique/expressions/Tokenizer.kt:75 — Tokenizer.tokenize has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (33 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 · DetailedStatsPopup.update (cognitive 34) · ×1
  • DetailedStatsPopup.update (cognitive 34) core/src/com/unciv/ui/screens/cityscreen/DetailedStatsPopup.kt:74 — DetailedStatsPopup.update has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 5 (6 pts), match/switch 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 · TechPickerScreen.addConnectingLines (cognitive 34) · ×1
  • TechPickerScreen.addConnectingLines (cognitive 34) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:255 — TechPickerScreen.addConnectingLines has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (6 pts), loops 3 (4 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 · Simulation.text (cognitive 33) · ×1
  • Simulation.text (cognitive 33) core/src/com/unciv/logic/simulation/Simulation.kt:232 — Simulation.text has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileLayerBorders.updateBorders (cognitive 33) · ×1
  • TileLayerBorders.updateBorders (cognitive 33) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerBorders.kt:33 — TileLayerBorders.updateBorders has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TechnologyDescriptions.getTechEnabledIcons (cognitive 33) · ×1
  • TechnologyDescriptions.getTechEnabledIcons (cognitive 33) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:99 — TechnologyDescriptions.getTechEnabledIcons has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (22 pts), loops 6, boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UnitAutomation.tryRetreat (cognitive 32) · ×1
  • UnitAutomation.tryRetreat (cognitive 32) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:291 — UnitAutomation.tryRetreat has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileLayerTerrain.getTileBaseImageLocations (cognitive 31) · ×1
  • TileLayerTerrain.getTileBaseImageLocations (cognitive 31) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt:45 — TileLayerTerrain.getTileBaseImageLocations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 3, match/switch 3 (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 · CivilopediaSearchPopup.searchLoop (cognitive 31) · ×1
  • CivilopediaSearchPopup.searchLoop (cognitive 31) core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaSearchPopup.kt:115 — CivilopediaSearchPopup.searchLoop has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImprovementPickerScreen.getProblemReport (cognitive 31) · ×1
  • ImprovementPickerScreen.getProblemReport (cognitive 31) core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt:276 — ImprovementPickerScreen.getProblemReport has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PromotionPickerScreen.addConnectingLines (cognitive 31) · ×1
  • PromotionPickerScreen.addConnectingLines (cognitive 31) core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt:264 — PromotionPickerScreen.addConnectingLines has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (5 pts), boolean chains 3, match/switch 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 · Automation.allowSpendingResource (cognitive 30) · ×1
  • Automation.allowSpendingResource (cognitive 30) core/src/com/unciv/logic/automation/Automation.kt:322 — Automation.allowSpendingResource has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · DiplomacyAutomation.offerPeaceTreaty (cognitive 30) · ×1
  • DiplomacyAutomation.offerPeaceTreaty (cognitive 30) core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:399 — DiplomacyAutomation.offerPeaceTreaty has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 5, 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 · ReligionAutomation.beliefBonusForCity (cognitive 30) · ×1
  • ReligionAutomation.beliefBonusForCity (cognitive 30) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:273 — ReligionAutomation.beliefBonusForCity has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurnManager.startTurn (cognitive 30) · ×1
  • TurnManager.startTurn (cognitive 30) core/src/com/unciv/logic/civilization/managers/TurnManager.kt:28 — TurnManager.startTurn has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 8 (11 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapGenerator.spawnLakesAndCoasts (cognitive 30) · ×1
  • MapGenerator.spawnLakesAndCoasts (cognitive 30) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:392 — MapGenerator.spawnLakesAndCoasts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (13 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NaturalWonderGenerator.placeNaturalWonder (cognitive 30) · ×1
  • NaturalWonderGenerator.placeNaturalWonder (cognitive 30) core/src/com/unciv/logic/map/mapgenerator/NaturalWonderGenerator.kt:143 — NaturalWonderGenerator.placeNaturalWonder has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 3, 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 · TradeLogic.getAvailableOffers (cognitive 30) · ×1
  • TradeLogic.getAvailableOffers (cognitive 30) core/src/com/unciv/logic/trade/TradeLogic.kt:39 — TradeLogic.getAvailableOffers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 6 (9 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ResourcesOverviewTab.getExtraDrilldown (cognitive 30) · ×1
  • ResourcesOverviewTab.getExtraDrilldown (cognitive 30) core/src/com/unciv/ui/screens/overviewscreen/ResourcesOverviewTab.kt:279 — ResourcesOverviewTab.getExtraDrilldown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 8 (12 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 · WorldScreen.update (cognitive 30) · ×1
  • WorldScreen.update (cognitive 30) core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt:382 — WorldScreen.update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CivInfoTransientCache.updateProximity (cognitive 29) · ×1
  • CivInfoTransientCache.updateProximity (cognitive 29) core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt:400 — CivInfoTransientCache.updateProximity has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StartNormalizer.placeFoodBonuses (cognitive 29) · ×1
  • StartNormalizer.placeFoodBonuses (cognitive 29) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:243 — StartNormalizer.placeFoodBonuses has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 6, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.addTechErrors (cognitive 29) · ×1
  • BaseRulesetValidator.addTechErrors (cognitive 29) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:413 — BaseRulesetValidator.addTechErrors has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModCheckTab.runModChecker (cognitive 29) · ×1
  • ModCheckTab.runModChecker (cognitive 29) core/src/com/unciv/ui/popups/options/ModCheckTab.kt:130 — ModCheckTab.runModChecker has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NewGameScreen.getErrorMessage (cognitive 29) · ×1
  • NewGameScreen.getErrorMessage (cognitive 29) core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:167 — NewGameScreen.getErrorMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2, error handling 1 (2 pts), loops 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 · GameInfo.nextTurn (cognitive 28) · ×1
  • GameInfo.nextTurn (cognitive 28) core/src/com/unciv/logic/GameInfo.kt:381 — GameInfo.nextTurn has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (13 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MotivationToAttackAutomation.hasAtLeastMotivationToAttack (cognitive 28) · ×1
  • MotivationToAttackAutomation.hasAtLeastMotivationToAttack (cognitive 28) core/src/com/unciv/logic/automation/civilization/MotivationToAttackAutomation.kt:31 — MotivationToAttackAutomation.hasAtLeastMotivationToAttack has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 6, match/switch 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 · MotivationToAttackAutomation.getAttackPathsModifier (cognitive 28) · ×1
  • MotivationToAttackAutomation.getAttackPathsModifier (cognitive 28) core/src/com/unciv/logic/automation/civilization/MotivationToAttackAutomation.kt:328 — MotivationToAttackAutomation.getAttackPathsModifier has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, 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 · BattleHelper.getCityAttackValue (cognitive 28) · ×1
  • BattleHelper.getCityAttackValue (cognitive 28) core/src/com/unciv/logic/automation/unit/BattleHelper.kt:104 — BattleHelper.getCityAttackValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Nuke.doNukeExplosionForTile (cognitive 28) · ×1
  • Nuke.doNukeExplosionForTile (cognitive 28) core/src/com/unciv/logic/battle/Nuke.kt:195 — Nuke.doNukeExplosionForTile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileMap.forEachTileAtDistance (cognitive 28) · ×1
  • TileMap.forEachTileAtDistance (cognitive 28) core/src/com/unciv/logic/map/TileMap.kt:319 — TileMap.forEachTileAtDistance has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, 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 · ModManagementScreen.addModInfoFromRepoSearch (cognitive 28) · ×1
  • ModManagementScreen.addModInfoFromRepoSearch (cognitive 28) core/src/com/unciv/ui/screens/modmanager/ModManagementScreen.kt:313 — ModManagementScreen.addModInfoFromRepoSearch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (8 pts), boolean chains 3, 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 · ThreatManager.getDistanceToClosestEnemyUnit (cognitive 27) · ×1
  • ThreatManager.getDistanceToClosestEnemyUnit (cognitive 27) core/src/com/unciv/logic/automation/civilization/ThreatManager.kt:25 — ThreatManager.getDistanceToClosestEnemyUnit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 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 · TargetHelper.getAttackableEnemies (cognitive 27) · ×1
  • TargetHelper.getAttackableEnemies (cognitive 27) core/src/com/unciv/logic/battle/TargetHelper.kt:15 — TargetHelper.getAttackableEnemies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityExpansionManager.rankTileForExpansion (cognitive 27) · ×1
  • CityExpansionManager.rankTileForExpansion (cognitive 27) core/src/com/unciv/logic/city/managers/CityExpansionManager.kt:124 — CityExpansionManager.rankTileForExpansion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityPopulationManager.unassignExtraPopulation (cognitive 27) · ×1
  • CityPopulationManager.unassignExtraPopulation (cognitive 27) core/src/com/unciv/logic/city/managers/CityPopulationManager.kt:212 — CityPopulationManager.unassignExtraPopulation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StartNormalizer.calculateFoodBonusesNeeded (cognitive 27) · ×1
  • StartNormalizer.calculateFoodBonusesNeeded (cognitive 27) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:175 — StartNormalizer.calculateFoodBonusesNeeded has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), match/switch 2 (4 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Policy.getCivilopediaTextLines (cognitive 27) · ×1
  • Policy.getCivilopediaTextLines (cognitive 27) core/src/com/unciv/models/ruleset/Policy.kt:79 — Policy.getCivilopediaTextLines has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 4 (8 pts), boolean chains 5 (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 · Milestone.getVictoryScreenButtonHeaderText (cognitive 27) · ×1
  • Milestone.getVictoryScreenButtonHeaderText (cognitive 27) core/src/com/unciv/models/ruleset/Victory.kt:202 — Milestone.getVictoryScreenButtonHeaderText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Terrain.getCivilopediaTextLines (cognitive 27) · ×1
  • Terrain.getCivilopediaTextLines (cognitive 27) core/src/com/unciv/models/ruleset/tile/Terrain.kt:81 — Terrain.getCivilopediaTextLines has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MusicController.musicTimerTask (cognitive 27) · ×1
  • MusicController.musicTimerTask (cognitive 27) core/src/com/unciv/ui/audio/MusicController.kt:240 — MusicController.musicTimerTask has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scene2dExtensionsKt.equalizeColumns (cognitive 27) · ×1
  • Scene2dExtensionsKt.equalizeColumns (cognitive 27) core/src/com/unciv/ui/components/extensions/Scene2dExtensions.kt:520 — Scene2dExtensionsKt.equalizeColumns has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileLayerTerrain.updateTileImage (cognitive 27) · ×1
  • TileLayerTerrain.updateTileImage (cognitive 27) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt:171 — TileLayerTerrain.updateTileImage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImprovementDescriptions.getCivilopediaTextLines (cognitive 27) · ×1
  • ImprovementDescriptions.getCivilopediaTextLines (cognitive 27) core/src/com/unciv/ui/objectdescriptions/ImprovementDescriptions.kt:50 — ImprovementDescriptions.getCivilopediaTextLines has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, loops 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CityStatsTable.addText (cognitive 27) · ×1
  • CityStatsTable.addText (cognitive 27) core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt:127 — CityStatsTable.addText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 3, boolean chains 2, match/switch 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 · TechPickerScreen.createTechTable (cognitive 27) · ×1
  • TechPickerScreen.createTechTable (cognitive 27) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:145 — TechPickerScreen.createTechTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 6 (7 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameInfo.setTransients (cognitive 26) · ×1
  • GameInfo.setTransients (cognitive 26) core/src/com/unciv/logic/GameInfo.kt:706 — GameInfo.setTransients has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 10 (11 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 · MapRegions.assignRegions (cognitive 26) · ×1
  • MapRegions.assignRegions (cognitive 26) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:237 — MapRegions.assignRegions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 8, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapUnit.doAction (cognitive 26) · ×1
  • MapUnit.doAction (cognitive 26) core/src/com/unciv/logic/map/mapunit/MapUnit.kt:903 — MapUnit.doAction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AStarPathfinder.calculateNeighborNode (cognitive 26) · ×1
  • AStarPathfinder.calculateNeighborNode (cognitive 26) core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt:160 — AStarPathfinder.calculateNeighborNode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 7 (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 · TileImprovementFunctions.setImprovement (cognitive 26) · ×1
  • TileImprovementFunctions.setImprovement (cognitive 26) core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt:193 — TileImprovementFunctions.setImprovement has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseUnit.evaluateForce (cognitive 26) · ×1
  • BaseUnit.evaluateForce (cognitive 26) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:526 — BaseUnit.evaluateForce has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UniqueValidator.checkUnique (cognitive 26) · ×1
  • UniqueValidator.checkUnique (cognitive 26) core/src/com/unciv/models/ruleset/validation/UniqueValidator.kt:91 — UniqueValidator.checkUnique has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CitizenManagementTable.update (cognitive 26) · ×1
  • CitizenManagementTable.update (cognitive 26) core/src/com/unciv/ui/screens/cityscreen/CitizenManagementTable.kt:17 — CitizenManagementTable.update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (24 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 · GameStarter.addCivTechs (cognitive 25) · ×1
  • GameStarter.addCivTechs (cognitive 25) core/src/com/unciv/logic/GameStarter.kt:175 — GameStarter.addCivTechs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (11 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 · ReligionAutomation.beliefBonusForPlayer (cognitive 25) · ×1
  • ReligionAutomation.beliefBonusForPlayer (cognitive 25) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:326 — ReligionAutomation.beliefBonusForPlayer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 4 (5 pts), boolean chains 4, 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 · Battle.attack (cognitive 25) · ×1
  • Battle.attack (cognitive 25) core/src/com/unciv/logic/battle/Battle.kt:105 — Battle.attack has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 5 (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 · CityStateFunctions.getTributeModifiers (cognitive 25) · ×1
  • CityStateFunctions.getTributeModifiers (cognitive 25) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:429 — CityStateFunctions.getTributeModifiers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DiplomacyTurnManager.nextTurnTrades (cognitive 25) · ×1
  • DiplomacyTurnManager.nextTurnTrades (cognitive 25) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:236 — DiplomacyTurnManager.nextTurnTrades has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 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 · StrategicBonusResourcePlacementLogic.buildRuleLists (cognitive 25) · ×1
  • StrategicBonusResourcePlacementLogic.buildRuleLists (cognitive 25) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/StrategicBonusResourcePlacementLogic.kt:310 — StrategicBonusResourcePlacementLogic.buildRuleLists has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileResource.generatesNaturallyOn (cognitive 25) · ×1
  • TileResource.generatesNaturallyOn (cognitive 25) core/src/com/unciv/models/ruleset/tile/TileResource.kt:147 — TileResource.generatesNaturallyOn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlobalPoliticsOverviewTable.updateDiagram (cognitive 25) · ×1
  • GlobalPoliticsOverviewTable.updateDiagram (cognitive 25) core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt:256 — GlobalPoliticsOverviewTable.updateDiagram has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5 (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 · WorldMapHolder.onTileClicked (cognitive 25) · ×1
  • WorldMapHolder.onTileClicked (cognitive 25) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:163 — WorldMapHolder.onTileClicked has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Automation.rankStatsForCityWork (cognitive 24) · ×1
  • Automation.rankStatsForCityWork (cognitive 24) core/src/com/unciv/logic/automation/Automation.kt:78 — Automation.rankStatsForCityWork has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, loops 2 (3 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.
D2 · Cognitive Complexity · CityStateFunctions.makeOtherCityStatesWaryOfAttacker (cognitive 24) · ×1
  • CityStateFunctions.makeOtherCityStatesWaryOfAttacker (cognitive 24) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:669 — CityStateFunctions.makeOtherCityStatesWaryOfAttacker has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiplomacyFunctions.meetCiv (cognitive 24) · ×1
  • DiplomacyFunctions.meetCiv (cognitive 24) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyFunctions.kt:31 — DiplomacyFunctions.meetCiv has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CivInfoTransientCache.discoverNaturalWonders (cognitive 24) · ×1
  • CivInfoTransientCache.discoverNaturalWonders (cognitive 24) core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt:224 — CivInfoTransientCache.discoverNaturalWonders has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitActionModifiers.activateSideEffects (cognitive 24) · ×1
  • UnitActionModifiers.activateSideEffects (cognitive 24) core/src/com/unciv/logic/map/mapunit/actions/UnitActionModifiers.kt:98 — UnitActionModifiers.activateSideEffects has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), boolean chains 2, 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 · TechnologyDescriptions.getCivilopediaTextLines (cognitive 24) · ×1
  • TechnologyDescriptions.getCivilopediaTextLines (cognitive 24) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:250 — TechnologyDescriptions.getCivilopediaTextLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 4 (8 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 · CityConstructionsTable.getConstructionButton (cognitive 24) · ×1
  • CityConstructionsTable.getConstructionButton (cognitive 24) core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt:507 — CityConstructionsTable.getConstructionButton has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NewGameScreen.startNewGame (cognitive 24) · ×1
  • NewGameScreen.startNewGame (cognitive 24) core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt:300 — NewGameScreen.startNewGame has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TechPickerScreen.selectTechnology (cognitive 24) · ×1
  • TechPickerScreen.selectTechnology (cognitive 24) core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt:394 — TechPickerScreen.selectTechnology has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VictoryScreenIllustrations.victoryCompletePercent (cognitive 24) · ×1
  • VictoryScreenIllustrations.victoryCompletePercent (cognitive 24) core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt:219 — VictoryScreenIllustrations.victoryCompletePercent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitPresenter.update (cognitive 24) · ×1
  • UnitPresenter.update (cognitive 24) core/src/com/unciv/ui/screens/worldscreen/unit/presenter/UnitPresenter.kt:51 — UnitPresenter.update has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiplayerTurnCheckWorker.doWork (cognitive 24) · ×1
  • MultiplayerTurnCheckWorker.doWork (cognitive 24) android/src/com/unciv/app/MultiplayerTurnCheckWorker.kt:288 — MultiplayerTurnCheckWorker.doWork has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 4 (6 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 · SystemUtils.getSystemInfo (cognitive 23) · ×1
  • SystemUtils.getSystemInfo (cognitive 23) desktop/src/com/unciv/app/desktop/SystemUtils.kt:11 — SystemUtils.getSystemInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, error handling 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Automation.chooseMilitaryUnit (cognitive 23) · ×1
  • Automation.chooseMilitaryUnit (cognitive 23) core/src/com/unciv/logic/automation/Automation.kt:198 — Automation.chooseMilitaryUnit has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (8 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NextTurnAutomation.trainSettler (cognitive 23) · ×1
  • NextTurnAutomation.trainSettler (cognitive 23) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:636 — NextTurnAutomation.trainSettler has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SpecificUnitAutomation.automateImprovementPlacer (cognitive 23) · ×1
  • SpecificUnitAutomation.automateImprovementPlacer (cognitive 23) core/src/com/unciv/logic/automation/unit/SpecificUnitAutomation.kt:198 — SpecificUnitAutomation.automateImprovementPlacer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 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 · WorkerAutomation.findTileToWork (cognitive 23) · ×1
  • WorkerAutomation.findTileToWork (cognitive 23) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:229 — WorkerAutomation.findTileToWork has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · WorkerAutomation.chooseImprovement (cognitive 23) · ×1
  • WorkerAutomation.chooseImprovement (cognitive 23) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:415 — WorkerAutomation.chooseImprovement has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), match/switch 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 · Battle.postBattleNotifications (cognitive 23) · ×1
  • Battle.postBattleNotifications (cognitive 23) core/src/com/unciv/logic/battle/Battle.kt:516 — Battle.postBattleNotifications has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 5, match/switch 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 · CityStats.updateFinalStatList (cognitive 23) · ×1
  • CityStats.updateFinalStatList (cognitive 23) core/src/com/unciv/logic/city/CityStats.kt:521 — CityStats.updateFinalStatList has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 6 (7 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CityStateFunctions.updateAllyCivForCityState (cognitive 23) · ×1
  • CityStateFunctions.updateAllyCivForCityState (cognitive 23) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:287 — CityStateFunctions.updateAllyCivForCityState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, 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 · DeclareWar.breakTreaties (cognitive 23) · ×1
  • DeclareWar.breakTreaties (cognitive 23) core/src/com/unciv/logic/civilization/diplomacy/DeclareWar.kt:237 — DeclareWar.breakTreaties has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 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 · TechManager.moveToNewEra (cognitive 23) · ×1
  • TechManager.moveToNewEra (cognitive 23) core/src/com/unciv/logic/civilization/managers/TechManager.kt:436 — TechManager.moveToNewEra has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (8 pts), boolean chains 3 (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 · OdMapImport.build (cognitive 23) · ×1
  • OdMapImport.build (cognitive 23) core/src/com/unciv/logic/map/OdMapImport.kt:92 — OdMapImport.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitTurnManager.endTurn (cognitive 23) · ×1
  • UnitTurnManager.endTurn (cognitive 23) core/src/com/unciv/logic/map/mapunit/UnitTurnManager.kt:10 — UnitTurnManager.endTurn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileNormalizer.normalizeToRuleset (cognitive 23) · ×1
  • TileNormalizer.normalizeToRuleset (cognitive 23) core/src/com/unciv/logic/map/tile/TileNormalizer.kt:9 — TileNormalizer.normalizeToRuleset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BaseRulesetValidator.addEraErrors (cognitive 23) · ×1
  • BaseRulesetValidator.addEraErrors (cognitive 23) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:94 — BaseRulesetValidator.addEraErrors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.checkPromotionCircularReferences (cognitive 23) · ×1
  • BaseRulesetValidator.checkPromotionCircularReferences (cognitive 23) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:311 — BaseRulesetValidator.checkPromotionCircularReferences has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 7 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UniqueValidator.getModifierErrors (cognitive 23) · ×1
  • UniqueValidator.getModifierErrors (cognitive 23) core/src/com/unciv/models/ruleset/validation/UniqueValidator.kt:234 — UniqueValidator.getModifierErrors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GenerateStringsFromJSONs.serializeElement (cognitive 23) · ×1
  • GenerateStringsFromJSONs.serializeElement (cognitive 23) core/src/com/unciv/models/translations/TranslationFileWriter.kt:670 — GenerateStringsFromJSONs.serializeElement has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · NationDescriptions.getNationCivilopediaTextLines (cognitive 23) · ×1
  • NationDescriptions.getNationCivilopediaTextLines (cognitive 23) core/src/com/unciv/ui/objectdescriptions/NationDescriptions.kt:20 — NationDescriptions.getNationCivilopediaTextLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormattedLine.unsupportedReasons (cognitive 23) · ×1
  • FormattedLine.unsupportedReasons (cognitive 23) core/src/com/unciv/ui/screens/civilopediascreen/FormattedLine.kt:127 — FormattedLine.unsupportedReasons has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 9 (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 · FormattedLine.render (cognitive 23) · ×1
  • FormattedLine.render (cognitive 23) core/src/com/unciv/ui/screens/civilopediascreen/FormattedLine.kt:279 — FormattedLine.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · WonderInfo.collectInfo (cognitive 23) · ×1
  • WonderInfo.collectInfo (cognitive 23) core/src/com/unciv/ui/screens/overviewscreen/WonderOverviewTab.kt:161 — WonderInfo.collectInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImprovementPickerScreen.addImprovementRow (cognitive 23) · ×1
  • ImprovementPickerScreen.addImprovementRow (cognitive 23) core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt:125 — ImprovementPickerScreen.addImprovementRow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, match/switch 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 · BarbarianManager.placeBarbarianEncampment (cognitive 22) · ×1
  • BarbarianManager.placeBarbarianEncampment (cognitive 22) core/src/com/unciv/logic/automation/civilization/BarbarianManager.kt:78 — BarbarianManager.placeBarbarianEncampment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, 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 · ReligionAutomation.beliefBonusForTile (cognitive 22) · ×1
  • ReligionAutomation.beliefBonusForTile (cognitive 22) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:243 — ReligionAutomation.beliefBonusForTile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, match/switch 1 (2 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 · DeclareWar.changeOpinions (cognitive 22) · ×1
  • DeclareWar.changeOpinions (cognitive 22) core/src/com/unciv/logic/civilization/diplomacy/DeclareWar.kt:201 — DeclareWar.changeOpinions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiplomacyTurnManager.nextTurnDiplomaticModifiers (cognitive 22) · ×1
  • DiplomacyTurnManager.nextTurnDiplomaticModifiers (cognitive 22) core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:271 — DiplomacyTurnManager.nextTurnDiplomaticModifiers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (17 pts), loops 2, match/switch 1 (2 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 · TileMap.placeUnitNearTile (cognitive 22) · ×1
  • TileMap.placeUnitNearTile (cognitive 22) core/src/com/unciv/logic/map/TileMap.kt:678 — TileMap.placeUnitNearTile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (5 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 · MapGenerationRandomness.chooseSpreadOutLocations (cognitive 22) · ×1
  • MapGenerationRandomness.chooseSpreadOutLocations (cognitive 22) core/src/com/unciv/logic/map/mapgenerator/MapGenerationRandomness.kt:118 — MapGenerationRandomness.chooseSpreadOutLocations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapGenerator.mirror (cognitive 22) · ×1
  • MapGenerator.mirror (cognitive 22) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:263 — MapGenerator.mirror has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, match/switch 2 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathingMap.getShortestPath (cognitive 22) · ×1
  • PathingMap.getShortestPath (cognitive 22) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:148 — PathingMap.getShortestPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathingMap.pathAsListWithDamage (cognitive 22) · ×1
  • PathingMap.pathAsListWithDamage (cognitive 22) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:211 — PathingMap.pathAsListWithDamage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tile.matchesSingleTerrainFilter (cognitive 22) · ×1
  • Tile.matchesSingleTerrainFilter (cognitive 22) core/src/com/unciv/logic/map/tile/Tile.kt:571 — Tile.matchesSingleTerrainFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 9, match/switch 2 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TradeRequest.decline (cognitive 22) · ×1
  • TradeRequest.decline (cognitive 22) core/src/com/unciv/logic/trade/Trade.kt:56 — TradeRequest.decline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · RulesetCache.loadRulesets (cognitive 22) · ×1
  • RulesetCache.loadRulesets (cognitive 22) core/src/com/unciv/models/ruleset/RulesetCache.kt:27 — RulesetCache.loadRulesets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RulesetValidator.addImprovementErrors (cognitive 22) · ×1
  • RulesetValidator.addImprovementErrors (cognitive 22) core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:246 — RulesetValidator.addImprovementErrors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseUnitDescriptions.getDifferences (cognitive 22) · ×1
  • BaseUnitDescriptions.getDifferences (cognitive 22) core/src/com/unciv/ui/objectdescriptions/BaseUnitDescriptions.kt:263 — BaseUnitDescriptions.getDifferences has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TechnologyDescriptions.buildTechIconsIndex (cognitive 22) · ×1
  • TechnologyDescriptions.buildTechIconsIndex (cognitive 22) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:181 — TechnologyDescriptions.buildTechIconsIndex has cognitive complexity 22 (threshold 15). Drivers by points: loops 11 (17 pts), boolean chains 5 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MultiplayerTab.addMultiplayerServerOptions (cognitive 22) · ×1
  • MultiplayerTab.addMultiplayerServerOptions (cognitive 22) core/src/com/unciv/ui/popups/options/MultiplayerTab.kt:85 — MultiplayerTab.addMultiplayerServerOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 1 (3 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · DiplomacyScreen.updateLeftSideTable (cognitive 22) · ×1
  • DiplomacyScreen.updateLeftSideTable (cognitive 22) core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt:141 — DiplomacyScreen.updateLeftSideTable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, 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 · ResourcesOverviewTab.updateVertical (cognitive 22) · ×1
  • ResourcesOverviewTab.updateVertical (cognitive 22) core/src/com/unciv/ui/screens/overviewscreen/ResourcesOverviewTab.kt:222 — ResourcesOverviewTab.updateVertical has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (11 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorldMapHolder.updateMovementOverlay (cognitive 22) · ×1
  • WorldMapHolder.updateMovementOverlay (cognitive 22) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:595 — WorldMapHolder.updateMovementOverlay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitAutomation.tryHealUnit (cognitive 21) · ×1
  • UnitAutomation.tryHealUnit (cognitive 21) core/src/com/unciv/logic/automation/unit/UnitAutomation.kt:350 — UnitAutomation.tryHealUnit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, 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 · TargetHelper.containsAttackableEnemy (cognitive 21) · ×1
  • TargetHelper.containsAttackableEnemy (cognitive 21) core/src/com/unciv/logic/battle/TargetHelper.kt:113 — TargetHelper.containsAttackableEnemy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityConquestFunctions.liberateCity (cognitive 21) · ×1
  • CityConquestFunctions.liberateCity (cognitive 21) core/src/com/unciv/logic/city/managers/CityConquestFunctions.kt:203 — CityConquestFunctions.liberateCity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubAPI.downloadAndExtract (cognitive 21) · ×1
  • GithubAPI.downloadAndExtract (cognitive 21) core/src/com/unciv/logic/github/GithubAPI.kt:402 — GithubAPI.downloadAndExtract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, loops 1, match/switch 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 · UnitActions.getGiftActions (cognitive 21) · ×1
  • UnitActions.getGiftActions (cognitive 21) core/src/com/unciv/logic/map/mapunit/actions/UnitActions.kt:202 — UnitActions.getGiftActions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitActionsFromUniques.getTriggerUniqueActions (cognitive 21) · ×1
  • UnitActionsFromUniques.getTriggerUniqueActions (cognitive 21) core/src/com/unciv/logic/map/mapunit/actions/UnitActionsFromUniques.kt:203 — UnitActionsFromUniques.getTriggerUniqueActions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileImprovementFunctions.canImprovementBeBuiltHere (cognitive 21) · ×1
  • TileImprovementFunctions.canImprovementBeBuiltHere (cognitive 21) core/src/com/unciv/logic/map/tile/TileImprovementFunctions.kt:58 — TileImprovementFunctions.canImprovementBeBuiltHere has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 6, 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 · Spy.endTurn (cognitive 21) · ×1
  • Spy.endTurn (cognitive 21) core/src/com/unciv/models/Spy.kt:88 — Spy.endTurn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 1, 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 · BaseRulesetValidator.checkEventCircularTriggers (cognitive 21) · ×1
  • BaseRulesetValidator.checkEventCircularTriggers (cognitive 21) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:221 — BaseRulesetValidator.checkEventCircularTriggers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, loops 3 (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 · FontRulesetIcons.addRulesetImages (cognitive 21) · ×1
  • FontRulesetIcons.addRulesetImages (cognitive 21) core/src/com/unciv/ui/components/fonts/FontRulesetIcons.kt:38 — FontRulesetIcons.addRulesetImages has cognitive complexity 21 (threshold 15). Drivers by points: loops 10 (13 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ImageGetter.loadModAtlases (cognitive 21) · ×1
  • ImageGetter.loadModAtlases (cognitive 21) core/src/com/unciv/ui/images/ImageGetter.kt:101 — ImageGetter.loadModAtlases has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotificationsScroll.updateContent (cognitive 21) · ×1
  • NotificationsScroll.updateContent (cognitive 21) core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt:223 — NotificationsScroll.updateContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, loops 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 · ImagePacker.packImages (cognitive 20) · ×1
  • ImagePacker.packImages (cognitive 20) desktop/src/com/unciv/app/desktop/ImagePacker.kt:76 — ImagePacker.packImages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (6 pts), error handling 1 (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 · NaturalWonderGenerator.spawnNaturalWonders (cognitive 20) · ×1
  • NaturalWonderGenerator.spawnNaturalWonders (cognitive 20) core/src/com/unciv/logic/map/mapgenerator/NaturalWonderGenerator.kt:27 — NaturalWonderGenerator.spawnNaturalWonders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RegionStartFinder.findGoodPosition (cognitive 20) · ×1
  • RegionStartFinder.findGoodPosition (cognitive 20) core/src/com/unciv/logic/map/mapgenerator/mapregions/RegionStartFinder.kt:45 — RegionStartFinder.findGoodPosition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StartNormalizer.normalizeProduction (cognitive 20) · ×1
  • StartNormalizer.normalizeProduction (cognitive 20) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:46 — StartNormalizer.normalizeProduction has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · StrategicBonusResourcePlacementLogic.placeBonusInThirdRingOfStart (cognitive 20) · ×1
  • StrategicBonusResourcePlacementLogic.placeBonusInThirdRingOfStart (cognitive 20) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/StrategicBonusResourcePlacementLogic.kt:80 — StrategicBonusResourcePlacementLogic.placeBonusInThirdRingOfStart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 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 · Promotion.getCivilopediaTextLines (cognitive 20) · ×1
  • Promotion.getCivilopediaTextLines (cognitive 20) core/src/com/unciv/models/ruleset/unit/Promotion.kt:70 — Promotion.getCivilopediaTextLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (20 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.addTerrainErrors (cognitive 20) · ×1
  • BaseRulesetValidator.addTerrainErrors (cognitive 20) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:454 — BaseRulesetValidator.addTerrainErrors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranslationFileWriter.writeLanguageFile (cognitive 20) · ×1
  • TranslationFileWriter.writeLanguageFile (cognitive 20) core/src/com/unciv/models/translations/TranslationFileWriter.kt:366 — TranslationFileWriter.writeLanguageFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityScreen.updateAnnexAndRazeCityButton (cognitive 20) · ×1
  • CityScreen.updateAnnexAndRazeCityButton (cognitive 20) core/src/com/unciv/ui/screens/cityscreen/CityScreen.kt:301 — CityScreen.updateAnnexAndRazeCityButton has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorldScreen.nextTurn (cognitive 20) · ×1
  • WorldScreen.nextTurn (cognitive 20) core/src/com/unciv/ui/screens/worldscreen/WorldScreen.kt:552 — WorldScreen.nextTurn has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 4, match/switch 1 (3 pts), boolean chains 2, 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 · UnitTable.tileSelected (cognitive 20) · ×1
  • UnitTable.tileSelected (cognitive 20) core/src/com/unciv/ui/screens/worldscreen/unit/UnitTable.kt:211 — UnitTable.tileSelected has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 6, match/switch 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 · NextTurnAutomation.automateCivMoves (cognitive 19) · ×1
  • NextTurnAutomation.automateCivMoves (cognitive 19) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:46 — NextTurnAutomation.automateCivMoves has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 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 · ThreatManager.getTilesWithEnemyUnitsInDistance (cognitive 19) · ×1
  • ThreatManager.getTilesWithEnemyUnitsInDistance (cognitive 19) core/src/com/unciv/logic/automation/civilization/ThreatManager.kt:80 — ThreatManager.getTilesWithEnemyUnitsInDistance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AirUnitAutomation.automateFighter (cognitive 19) · ×1
  • AirUnitAutomation.automateFighter (cognitive 19) core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt:25 — AirUnitAutomation.automateFighter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReligiousUnitAutomation.automateInquisitor (cognitive 19) · ×1
  • ReligiousUnitAutomation.automateInquisitor (cognitive 19) core/src/com/unciv/logic/automation/unit/ReligiousUnitAutomation.kt:77 — ReligiousUnitAutomation.automateInquisitor has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), match/switch 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WorkerAutomation.getImprovementPriority (cognitive 19) · ×1
  • WorkerAutomation.getImprovementPriority (cognitive 19) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:350 — WorkerAutomation.getImprovementPriority has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Battle.takeDamage (cognitive 19) · ×1
  • Battle.takeDamage (cognitive 19) core/src/com/unciv/logic/battle/Battle.kt:376 — Battle.takeDamage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, 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 · CityConstructions.purchaseConstruction (cognitive 19) · ×1
  • CityConstructions.purchaseConstruction (cognitive 19) core/src/com/unciv/logic/city/CityConstructions.kt:749 — CityConstructions.purchaseConstruction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurnManager.startTurnFlags (cognitive 19) · ×1
  • TurnManager.startTurnFlags (cognitive 19) core/src/com/unciv/logic/civilization/managers/TurnManager.kt:120 — TurnManager.startTurnFlags has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurnManager.endTurn (cognitive 19) · ×1
  • TurnManager.endTurn (cognitive 19) core/src/com/unciv/logic/civilization/managers/TurnManager.kt:254 — TurnManager.endTurn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CivInfoTransientCache.updateCivResources (cognitive 19) · ×1
  • CivInfoTransientCache.updateCivResources (cognitive 19) core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt:339 — CivInfoTransientCache.updateCivResources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OdMapExport.write (cognitive 19) · ×1
  • OdMapExport.write (cognitive 19) core/src/com/unciv/logic/map/OdMapExport.kt:45 — OdMapExport.write has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 6 (9 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 · MapRegions.splitRegion (cognitive 19) · ×1
  • MapRegions.splitRegion (cognitive 19) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:177 — MapRegions.splitRegion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 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 · MapRegionResources.placeResourcesInTiles (cognitive 19) · ×1
  • MapRegionResources.placeResourcesInTiles (cognitive 19) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/MapRegionResources.kt:26 — MapRegionResources.placeResourcesInTiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 2, 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 · MapRegionResources.tryAddingResourceToTiles (cognitive 19) · ×1
  • MapRegionResources.tryAddingResourceToTiles (cognitive 19) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/MapRegionResources.kt:88 — MapRegionResources.tryAddingResourceToTiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RulesetValidator.addSpeedErrors (cognitive 19) · ×1
  • RulesetValidator.addSpeedErrors (cognitive 19) core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:419 — RulesetValidator.addSpeedErrors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 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 · RulesetValidator.checkTilesetSanity (cognitive 19) · ×1
  • RulesetValidator.checkTilesetSanity (cognitive 19) core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:783 — RulesetValidator.checkTilesetSanity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · TranslationExtensionsKt.findMatchingAnyKind (cognitive 19) · ×1
  • TranslationExtensionsKt.findMatchingAnyKind (cognitive 19) core/src/com/unciv/models/translations/TranslationExtensions.kt:172 — TranslationExtensionsKt.findMatchingAnyKind has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColorMarkupLabel.prepareText (cognitive 19) · ×1
  • ColorMarkupLabel.prepareText (cognitive 19) core/src/com/unciv/ui/components/widgets/ColorMarkupLabel.kt:122 — ColorMarkupLabel.prepareText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TabbedPager.selectPage (cognitive 19) · ×1
  • TabbedPager.selectPage (cognitive 19) core/src/com/unciv/ui/components/widgets/TabbedPager.kt:364 — TabbedPager.selectPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResourceDescriptions.getCivilopediaTextLines (cognitive 19) · ×1
  • ResourceDescriptions.getCivilopediaTextLines (cognitive 19) core/src/com/unciv/ui/objectdescriptions/ResourceDescriptions.kt:12 — ResourceDescriptions.getCivilopediaTextLines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · LineChart.generateLabels (cognitive 19) · ×1
  • LineChart.generateLabels (cognitive 19) core/src/com/unciv/ui/screens/victoryscreen/LineChart.kt:86 — LineChart.generateLabels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (18 pts), 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 · WorldMapHolder.onTileRightClicked (cognitive 19) · ×1
  • WorldMapHolder.onTileRightClicked (cognitive 19) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:227 — WorldMapHolder.onTileRightClicked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorldMapHolder.moveUnitToTargetTile (cognitive 19) · ×1
  • WorldMapHolder.moveUnitToTargetTile (cognitive 19) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:282 — WorldMapHolder.moveUnitToTargetTile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, error handling 2, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WorldMapHolder.addTileOverlaysWithUnitMovement (cognitive 19) · ×1
  • WorldMapHolder.addTileOverlaysWithUnitMovement (cognitive 19) core/src/com/unciv/ui/screens/worldscreen/worldmap/WorldMapHolder.kt:425 — WorldMapHolder.addTileOverlaysWithUnitMovement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiplomacyAutomation.offerToEstablishEmbassy (cognitive 18) · ×1
  • DiplomacyAutomation.offerToEstablishEmbassy (cognitive 18) core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:131 — DiplomacyAutomation.offerToEstablishEmbassy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NextTurnAutomation.valueCityStateAlliance (cognitive 18) · ×1
  • NextTurnAutomation.valueCityStateAlliance (cognitive 18) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:167 — NextTurnAutomation.valueCityStateAlliance has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 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 · NextTurnAutomation.automateUnits (cognitive 18) · ×1
  • NextTurnAutomation.automateUnits (cognitive 18) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:422 — NextTurnAutomation.automateUnits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4, 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 · NextTurnAutomation.automateCityConquer (cognitive 18) · ×1
  • NextTurnAutomation.automateCityConquer (cognitive 18) core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt:499 — NextTurnAutomation.automateCityConquer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 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 · Battle.plunderFromDamage (cognitive 18) · ×1
  • Battle.plunderFromDamage (cognitive 18) core/src/com/unciv/logic/battle/Battle.kt:466 — Battle.plunderFromDamage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LabeledSounds.cacheMods (cognitive 18) · ×1
  • LabeledSounds.cacheMods (cognitive 18) core/src/com/unciv/logic/files/IMediaFinder.kt:240 — LabeledSounds.cacheMods has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubAPI.parseUrl (cognitive 18) · ×1
  • GithubAPI.parseUrl (cognitive 18) core/src/com/unciv/logic/github/GithubAPI.kt:318 — GithubAPI.parseUrl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8 (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 · TileMap.getNeighborTileClockPosition (cognitive 18) · ×1
  • TileMap.getNeighborTileClockPosition (cognitive 18) core/src/com/unciv/logic/map/TileMap.kt:410 — TileMap.getNeighborTileClockPosition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 6, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MapGenerator.spreadCoast (cognitive 18) · ×1
  • MapGenerator.spreadCoast (cognitive 18) core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt:366 — MapGenerator.spreadCoast has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (8 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapLandmassGenerator.generateFlatEarthExtraWater (cognitive 18) · ×1
  • MapLandmassGenerator.generateFlatEarthExtraWater (cognitive 18) core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt:73 — MapLandmassGenerator.generateFlatEarthExtraWater has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MapRegions.generateRegions (cognitive 18) · ×1
  • MapRegions.generateRegions (cognitive 18) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:96 — MapRegions.generateRegions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitActionsFromUniques.getTransformActions (cognitive 18) · ×1
  • UnitActionsFromUniques.getTransformActions (cognitive 18) core/src/com/unciv/logic/map/mapunit/actions/UnitActionsFromUniques.kt:354 — UnitActionsFromUniques.getTransformActions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitMovement.getCannotMoveToReason (cognitive 18) · ×1
  • UnitMovement.getCannotMoveToReason (cognitive 18) core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt:735 — UnitMovement.getCannotMoveToReason 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 · Building.notMetRejections (cognitive 18) · ×1
  • Building.notMetRejections (cognitive 18) core/src/com/unciv/models/ruleset/Building.kt:451 — Building.notMetRejections has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 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 · BaseUnit.notMetRejections (cognitive 18) · ×1
  • BaseUnit.notMetRejections (cognitive 18) core/src/com/unciv/models/ruleset/unit/BaseUnit.kt:325 — BaseUnit.notMetRejections has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 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 · BaseRulesetValidator.addPolicyErrors (cognitive 18) · ×1
  • BaseRulesetValidator.addPolicyErrors (cognitive 18) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:187 — BaseRulesetValidator.addPolicyErrors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (7 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 · TechnologyDescriptions.getDescription (cognitive 18) · ×1
  • TechnologyDescriptions.getDescription (cognitive 18) core/src/com/unciv/ui/objectdescriptions/TechnologyDescriptions.kt:30 — TechnologyDescriptions.getDescription has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 5 (6 pts), boolean chains 3 (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 · CityConstructionsTable.updateAvailableConstructions (cognitive 18) · ×1
  • CityConstructionsTable.updateAvailableConstructions (cognitive 18) core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt:334 — CityConstructionsTable.updateAvailableConstructions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 2 (7 pts), boolean chains 3, 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 · CivilopediaScreen.selectCategory (cognitive 18) · ×1
  • CivilopediaScreen.selectCategory (cognitive 18) core/src/com/unciv/ui/screens/civilopediascreen/CivilopediaScreen.kt:117 — CivilopediaScreen.selectCategory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 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 · PlayerPickerTable.update (cognitive 18) · ×1
  • PlayerPickerTable.update (cognitive 18) core/src/com/unciv/ui/screens/newgamescreen/PlayerPickerTable.kt:88 — PlayerPickerTable.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, 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 · NotificationsScroll.update (cognitive 18) · ×1
  • NotificationsScroll.update (cognitive 18) core/src/com/unciv/ui/screens/worldscreen/NotificationsScroll.kt:161 — NotificationsScroll.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, match/switch 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 · CityLocationTileRanker.canSettleTile (cognitive 17) · ×1
  • CityLocationTileRanker.canSettleTile (cognitive 17) core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt:82 — CityLocationTileRanker.canSettleTile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkerAutomation.isAutomationWorkableTile (cognitive 17) · ×1
  • WorkerAutomation.isAutomationWorkableTile (cognitive 17) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:289 — WorkerAutomation.isAutomationWorkableTile has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 8. To reduce it, name the conditions: bind each compound test to a 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 · WorkerAutomation.getBasePriority (cognitive 17) · ×1
  • WorkerAutomation.getBasePriority (cognitive 17) core/src/com/unciv/logic/automation/unit/WorkerAutomation.kt:318 — WorkerAutomation.getBasePriority has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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 · CityConquestFunctions.diplomaticRepercussionsForLiberatingCity (cognitive 17) · ×1
  • CityConquestFunctions.diplomaticRepercussionsForLiberatingCity (cognitive 17) core/src/com/unciv/logic/city/managers/CityConquestFunctions.kt:247 — CityConquestFunctions.diplomaticRepercussionsForLiberatingCity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 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 · CityStateFunctions.initCityState (cognitive 17) · ×1
  • CityStateFunctions.initCityState (cognitive 17) core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt:31 — CityStateFunctions.initCityState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CapitalConnectionsFinder.find (cognitive 17) · ×1
  • CapitalConnectionsFinder.find (cognitive 17) core/src/com/unciv/logic/civilization/transients/CapitalConnectionsFinder.kt:45 — CapitalConnectionsFinder.find has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CivInfoTransientCache.setTransients (cognitive 17) · ×1
  • CivInfoTransientCache.setTransients (cognitive 17) core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt:58 — CivInfoTransientCache.setTransients has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4, 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 · Github.rewriteModOptions (cognitive 17) · ×1
  • Github.rewriteModOptions (cognitive 17) core/src/com/unciv/logic/github/Github.kt:196 — Github.rewriteModOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MapGenTileData.evaluate (cognitive 17) · ×1
  • MapGenTileData.evaluate (cognitive 17) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapGenTileData.kt:43 — MapGenTileData.evaluate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, 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 · StartNormalizer.addProductionBonuses (cognitive 17) · ×1
  • StartNormalizer.addProductionBonuses (cognitive 17) core/src/com/unciv/logic/map/mapgenerator/mapregions/StartNormalizer.kt:139 — StartNormalizer.addProductionBonuses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StrategicBonusResourcePlacementLogic.placeMinorDepositsOnLand (cognitive 17) · ×1
  • StrategicBonusResourcePlacementLogic.placeMinorDepositsOnLand (cognitive 17) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/StrategicBonusResourcePlacementLogic.kt:219 — StrategicBonusResourcePlacementLogic.placeMinorDepositsOnLand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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 · ApiVersion.detect (cognitive 17) · ×1
  • ApiVersion.detect (cognitive 17) core/src/com/unciv/logic/multiplayer/ApiVersion.kt:70 — ApiVersion.detect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (6 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 · Spy.initiateCoup (cognitive 17) · ×1
  • Spy.initiateCoup (cognitive 17) core/src/com/unciv/models/Spy.kt:272 — Spy.initiateCoup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.addResourceErrors (cognitive 17) · ×1
  • BaseRulesetValidator.addResourceErrors (cognitive 17) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:364 — BaseRulesetValidator.addResourceErrors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.addVictoryTypeErrors (cognitive 17) · ×1
  • BaseRulesetValidator.addVictoryTypeErrors (cognitive 17) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:544 — BaseRulesetValidator.addVictoryTypeErrors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RulesetValidator.addModOptionsErrors (cognitive 17) · ×1
  • RulesetValidator.addModOptionsErrors (cognitive 17) core/src/com/unciv/models/ruleset/validation/RulesetValidator.kt:288 — RulesetValidator.addModOptionsErrors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextSimilarityKt.getTextDistance (cognitive 17) · ×1
  • TextSimilarityKt.getTextDistance (cognitive 17) core/src/com/unciv/models/ruleset/validation/TextSimilarity.kt:27 — TextSimilarityKt.getTextDistance has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkinCache.loadSkinConfigs (cognitive 17) · ×1
  • SkinCache.loadSkinConfigs (cognitive 17) core/src/com/unciv/models/skins/SkinCache.kt:40 — SkinCache.loadSkinConfigs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 2 (5 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SkinStrings.getUiBackground (cognitive 17) · ×1
  • SkinStrings.getUiBackground (cognitive 17) core/src/com/unciv/models/skins/SkinStrings.kt:50 — SkinStrings.getUiBackground has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CityButton.updateHiddenUnitMarkers (cognitive 17) · ×1
  • CityButton.updateHiddenUnitMarkers (cognitive 17) core/src/com/unciv/ui/components/tilegroups/citybutton/CityButton.kt:115 — CityButton.updateHiddenUnitMarkers has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 2 (6 pts), if/else 4 (5 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileLayerFeatures.updateRoadImages (cognitive 17) · ×1
  • TileLayerFeatures.updateRoadImages (cognitive 17) core/src/com/unciv/ui/components/tilegroups/layers/TileLayerFeatures.kt:21 — TileLayerFeatures.updateRoadImages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SortableGrid.updateDetails (cognitive 17) · ×1
  • SortableGrid.updateDetails (cognitive 17) core/src/com/unciv/ui/components/widgets/SortableGrid.kt:183 — SortableGrid.updateDetails has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildingDescriptions.addBuildingDifferences (cognitive 17) · ×1
  • BuildingDescriptions.addBuildingDifferences (cognitive 17) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:133 — BuildingDescriptions.addBuildingDifferences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BuildingDescriptions.getUniquesStrings (cognitive 17) · ×1
  • BuildingDescriptions.getUniquesStrings (cognitive 17) core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt:268 — BuildingDescriptions.getUniquesStrings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityConstructionsTable.getQueueEntry (cognitive 17) · ×1
  • CityConstructionsTable.getQueueEntry (cognitive 17) core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt:411 — CityConstructionsTable.getQueueEntry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · CityStateDiplomacyTable.getCityStateDiplomacyTable (cognitive 17) · ×1
  • CityStateDiplomacyTable.getCityStateDiplomacyTable (cognitive 17) core/src/com/unciv/ui/screens/diplomacyscreen/CityStateDiplomacyTable.kt:37 — CityStateDiplomacyTable.getCityStateDiplomacyTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MajorCivDiplomacyTable.getMajorCivDiplomacyTable (cognitive 17) · ×1
  • MajorCivDiplomacyTable.getMajorCivDiplomacyTable (cognitive 17) core/src/com/unciv/ui/screens/diplomacyscreen/MajorCivDiplomacyTable.kt:44 — MajorCivDiplomacyTable.getMajorCivDiplomacyTable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MapEditorViewTab.tileClickHandler (cognitive 17) · ×1
  • MapEditorViewTab.tileClickHandler (cognitive 17) core/src/com/unciv/ui/screens/mapeditorscreen/tabs/MapEditorViewTab.kt:177 — MapEditorViewTab.tileClickHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 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 · UnitPresenter.updateWhenNeeded (cognitive 17) · ×1
  • UnitPresenter.updateWhenNeeded (cognitive 17) core/src/com/unciv/ui/screens/worldscreen/unit/presenter/UnitPresenter.kt:128 — UnitPresenter.updateWhenNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopLauncher.main (cognitive 16) · ×1
  • DesktopLauncher.main (cognitive 16) desktop/src/com/unciv/app/desktop/DesktopLauncher.kt:40 — DesktopLauncher.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · BackwardCompatibility.removeTechAndPolicies (cognitive 16) · ×1
  • BackwardCompatibility.removeTechAndPolicies (cognitive 16) core/src/com/unciv/logic/BackwardCompatibility.kt:135 — BackwardCompatibility.removeTechAndPolicies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameStarter.chooseCivilizations (cognitive 16) · ×1
  • GameStarter.chooseCivilizations (cognitive 16) core/src/com/unciv/logic/GameStarter.kt:248 — GameStarter.chooseCivilizations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, match/switch 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 · ConstructionAutomation.getOnetimeUniqueBonuses (cognitive 16) · ×1
  • ConstructionAutomation.getOnetimeUniqueBonuses (cognitive 16) core/src/com/unciv/logic/automation/city/ConstructionAutomation.kt:279 — ConstructionAutomation.getOnetimeUniqueBonuses has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), match/switch 2 (4 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 · DiplomacyAutomation.checkMilitaryPresenceNearBorder (cognitive 16) · ×1
  • DiplomacyAutomation.checkMilitaryPresenceNearBorder (cognitive 16) core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt:499 — DiplomacyAutomation.checkMilitaryPresenceNearBorder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CityLocationTileRanker.rankTile (cognitive 16) · ×1
  • CityLocationTileRanker.rankTile (cognitive 16) core/src/com/unciv/logic/automation/unit/CityLocationTileRanker.kt:183 — CityLocationTileRanker.rankTile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, match/switch 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 · Battle.movePreparingAttack (cognitive 16) · ×1
  • Battle.movePreparingAttack (cognitive 16) core/src/com/unciv/logic/battle/Battle.kt:51 — Battle.movePreparingAttack has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Battle.triggerCombatUniques (cognitive 16) · ×1
  • Battle.triggerCombatUniques (cognitive 16) core/src/com/unciv/logic/battle/Battle.kt:255 — Battle.triggerCombatUniques has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityConstructions.validateInProgressConstructions (cognitive 16) · ×1
  • CityConstructions.validateInProgressConstructions (cognitive 16) core/src/com/unciv/logic/city/CityConstructions.kt:427 — CityConstructions.validateInProgressConstructions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PolicyManager.adopt (cognitive 16) · ×1
  • PolicyManager.adopt (cognitive 16) core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:241 — PolicyManager.adopt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TechManager.obsoleteOldUnits (cognitive 16) · ×1
  • TechManager.obsoleteOldUnits (cognitive 16) core/src/com/unciv/logic/civilization/managers/TechManager.kt:383 — TechManager.obsoleteOldUnits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LuxuryResourcePlacementLogic.placeLuxuriesAtMajorCivStartLocations (cognitive 16) · ×1
  • LuxuryResourcePlacementLogic.placeLuxuriesAtMajorCivStartLocations (cognitive 16) core/src/com/unciv/logic/map/mapgenerator/resourceplacement/LuxuryResourcePlacementLogic.kt:380 — LuxuryResourcePlacementLogic.placeLuxuriesAtMajorCivStartLocations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapUnit.updateVisibleTiles (cognitive 16) · ×1
  • MapUnit.updateVisibleTiles (cognitive 16) core/src/com/unciv/logic/map/mapunit/MapUnit.kt:843 — MapUnit.updateVisibleTiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitActionModifiers.canSpendStatsCost (cognitive 16) · ×1
  • UnitActionModifiers.canSpendStatsCost (cognitive 16) core/src/com/unciv/logic/map/mapunit/actions/UnitActionModifiers.kt:55 — UnitActionModifiers.canSpendStatsCost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitActionModifiers.getSideEffectString (cognitive 16) · ×1
  • UnitActionModifiers.getSideEffectString (cognitive 16) core/src/com/unciv/logic/map/mapunit/actions/UnitActionModifiers.kt:175 — UnitActionModifiers.getSideEffectString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PathingMap.fetchCache (cognitive 16) · ×1
  • PathingMap.fetchCache (cognitive 16) core/src/com/unciv/logic/map/pathingmap/PathingMap.kt:101 — PathingMap.fetchCache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AStarPathfinder.findDamageFreeAnchor (cognitive 16) · ×1
  • AStarPathfinder.findDamageFreeAnchor (cognitive 16) core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt:132 — AStarPathfinder.findDamageFreeAnchor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, 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 · TradeEvaluation.isTradeValid (cognitive 16) · ×1
  • TradeEvaluation.isTradeValid (cognitive 16) core/src/com/unciv/logic/trade/TradeEvaluation.kt:27 — TradeEvaluation.isTradeValid has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), loops 2 (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 · Building.matchesSingleFilter (cognitive 16) · ×1
  • Building.matchesSingleFilter (cognitive 16) core/src/com/unciv/models/ruleset/Building.kt:518 — Building.matchesSingleFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Building.isStatRelated (cognitive 16) · ×1
  • Building.isStatRelated (cognitive 16) core/src/com/unciv/models/ruleset/Building.kt:539 — Building.isStatRelated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRulesetValidator.checkBuilding (cognitive 16) · ×1
  • BaseRulesetValidator.checkBuilding (cognitive 16) core/src/com/unciv/models/ruleset/validation/BaseRulesetValidator.kt:51 — BaseRulesetValidator.checkBuilding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CityTileGroup.update (cognitive 16) · ×1
  • CityTileGroup.update (cognitive 16) core/src/com/unciv/ui/components/tilegroups/CityTileGroup.kt:30 — CityTileGroup.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, match/switch 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 · AtlasPreview.logMissingAtlas (cognitive 16) · ×1
  • AtlasPreview.logMissingAtlas (cognitive 16) core/src/com/unciv/ui/images/AtlasPreview.kt:89 — AtlasPreview.logMissingAtlas has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (4 pts), boolean chains 3, error handling 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 · MiniStatsTable.update (cognitive 16) · ×1
  • MiniStatsTable.update (cognitive 16) core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt:423 — MiniStatsTable.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, 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 · MarkupRenderer.renderTo (cognitive 16) · ×1
  • MarkupRenderer.renderTo (cognitive 16) core/src/com/unciv/ui/screens/civilopediascreen/MarkupRenderer.kt:52 — MarkupRenderer.renderTo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiplayerHelpers.buildDescriptionText (cognitive 16) · ×1
  • MultiplayerHelpers.buildDescriptionText (cognitive 16) core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerHelpers.kt:39 — MultiplayerHelpers.buildDescriptionText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 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 · GlobalPoliticsOverviewTable.getPoliticsOfCivTable (cognitive 16) · ×1
  • GlobalPoliticsOverviewTable.getPoliticsOfCivTable (cognitive 16) core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt:194 — GlobalPoliticsOverviewTable.getPoliticsOfCivTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, boolean chains 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 · UnitOverviewTabHelpers.updatePromotionsTable (cognitive 16) · ×1
  • UnitOverviewTabHelpers.updatePromotionsTable (cognitive 16) core/src/com/unciv/ui/screens/overviewscreen/UnitOverviewTabHelpers.kt:119 — UnitOverviewTabHelpers.updatePromotionsTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BattleTable.update (cognitive 16) · ×1
  • BattleTable.update (cognitive 16) core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt:67 — BattleTable.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 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 · MinimapTile.updateCityCircle (cognitive 16) · ×1
  • MinimapTile.updateCityCircle (cognitive 16) core/src/com/unciv/ui/screens/worldscreen/minimap/MinimapTile.kt:107 — MinimapTile.updateCityCircle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WorldScreenTopBarResources.update (cognitive 16) · ×1
  • WorldScreenTopBarResources.update (cognitive 16) core/src/com/unciv/ui/screens/worldscreen/topbar/WorldScreenTopBarResources.kt:81 — WorldScreenTopBarResources.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseCommits (cognitive 16) · ×1
  • parseCommits (cognitive 16) .github/workflows/incrementVersionAndChangelog.mjs:97 — parseCommits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 116, 145). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D20 · ADR Quality · Decision is a vague 'for every [countable]' unique modifier and links-only promise; consequences/trade-offs are absent · ×1
  • Decision is a vague 'for every [countable]' unique modifier and links-only promise; consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1000.txt — State the exact rule (e.g. modifiers must be named and counted) and document trade-offs such as increased mod complexity or reduced flexibility
D20 · ADR Quality · Context/problem is thin (only one sentence) with no consequences; the decision 'Allow mod sounds to be selected as multiplayer notification sound' and its author tuvus's changes are listed but not tied to a stated problem · ×1
  • Context/problem is thin (only one sentence) with no consequences; the decision 'Allow mod sounds to be selected as multiplayer notification sound' and its author tuvus's changes are listed but not tied to a stated problem fastlane/metadata/android/en-US/changelogs/1001.txt — Add a Context section explaining why resource trades must now trust cut deals short, and a Consequences section on trade-offs such as increased negotiation friction or loss of quick one-shot deals
D20 · ADR Quality · Decision is a list of feature toggles and bug fixes but no context/problem and no consequences/trade-offs · ×1
  • Decision is a list of feature toggles and bug fixes but no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1002.txt — Add the problem motivating each rule (e.g. 'move-by-long-press feels unintuitive') and document trade-offs such as disabling move-by-long-press breaking accidental long-presses
D20 · ADR Quality · No context/problem and no consequences; only a crash fix and two vague UX notes · ×1
  • No context/problem and no consequences; only a crash fix and two vague UX notes fastlane/metadata/android/en-US/changelogs/1003.txt — Add the original problem (e.g. 'Spies are promoted too fast, causing AI war evaluation to fail') and document trade-offs such as how the modifier affects spy behavior
D20 · ADR Quality · No consequences/trade-offs section describing the cost of allowing floating tutorials or EmpireOverview persistence · ×1
  • No consequences/trade-offs section describing the cost of allowing floating tutorials or EmpireOverview persistence fastlane/metadata/android/en-US/changelogs/1005.txt — Add a Consequences section covering trade-offs such as tutorial spam, EmpireOverview becoming a persistent moddable blob, and how to manage optional persistence
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only implementation notes and a patch list · ×1
  • No context/problem and no consequences/trade-offs; only implementation notes and a patch list fastlane/metadata/android/en-US/changelogs/1007.txt — Add what spy automation crash caused (e.g. AI signing pact failure) and the consequences of fixing it (reliability, trade-off of credit storage)}
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of arbitrary game mechanics with no framing · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of arbitrary game mechanics with no framing fastlane/metadata/android/en-US/changelogs/1009.txt — Add a Context section explaining what performance improvement was targeted (e.g. low-level AI stutter) and a Consequences section on trade-offs like losing automated replacement or disband spam
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of arbitrary game design notes with no decision statement · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of arbitrary game design notes with no decision statement fastlane/metadata/android/en-US/changelogs/1010.txt — State what problem these rules solve (e.g. balanced movement, efficient resource gathering) and document the trade-offs (e.g. teleportation may allow garrisons to bypass borders without being added in, which could be exploited)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of turn-format rules and a tenuous fix for one performance problem plus an unrelated 'edit existing trade' exploit · ×1
  • No context/problem and no consequences/trade-offs; only a list of turn-format rules and a tenuous fix for one performance problem plus an unrelated 'edit existing trade' exploit fastlane/metadata/android/en-US/changelogs/1012.txt — State the original problem (air-unit display in cities is unplayable) and its impact on modders, then document the consequences of each rule change (e.g. broken improvement queue, inconsistent unique docs)
D20 · ADR Quality · Decision is a list of unimplemented unique/visual changes with no context/problem and no consequences; title is weak ('Modding version!') · ×1
  • Decision is a list of unimplemented unique/visual changes with no context/problem and no consequences; title is weak ('Modding version!') fastlane/metadata/android/en-US/changelogs/1013.txt — State the problem each change addresses (e.g. 'unique Withdraws before melee combat feels counterintuitive' or 'load game screen lacks feedback for missing templates') and document trade-offs like added complexity of counting filters.
D20 · ADR Quality · Decision is narrow and only one of the four elements (unavailable units cannot be upgraded to) is present; context/problem and consequences are thin · ×1
  • Decision is narrow and only one of the four elements (unavailable units cannot be upgraded to) is present; context/problem and consequences are thin fastlane/metadata/android/en-US/changelogs/1014.txt — Expand the problem section with a trade-off note on allowing unavailable units to be upgraded and add a Consequences section covering how upgrades will proceed for those that can now be done
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of vaguely phrased entries (e.g. 'Support for languages using Diacritics') with author names and one AI-behaviour change entry are present · ×1
  • No context/problem and no consequences/trade-offs; only a list of vaguely phrased entries (e.g. 'Support for languages using Diacritics') with author names and one AI-behaviour change entry are present fastlane/metadata/android/en-US/changelogs/1016.txt — State the problem each listed item addresses (diacritic support, defending-city automation, warmongering against angry civs) and document consequences such as cost of diacritic handling or how anger triggers work
D20 · ADR Quality · Context/problem is thin and the decision (focus resets when annexed) is stated but there are no consequences/trade-offs; promotionName added as a value for mapUnitFilter and war notification fix are incidental notes with no framing · ×1
  • Context/problem is thin and the decision (focus resets when annexed) is stated but there are no consequences/trade-offs; promotionName added as a value for mapUnitFilter and war notification fix are incidental notes with no framing fastlane/metadata/android/en-US/changelogs/1018.txt — Add a Context section explaining why city focus resets to default (e.g. prevents bias, maintains balance) and a Consequences section on trade-offs such as how annexation affects resource allocation
D20 · ADR Quality · Decision is a single line ('Added missing deprecation validation for unit uniques') with no context and no consequences; the body ends in clip marker 'translation updates work for diacritic-using languages' · ×1
  • Decision is a single line ('Added missing deprecation validation for unit uniques') with no context and no consequences; the body ends in clip marker 'translation updates work for diacritic-using languages' fastlane/metadata/android/en-US/changelogs/1019.txt — State the problem (unit-unique deprecation not catching new cases) and the decision (validate deprecations for all unique identifiers), then document consequences such as false-negative risk of missed deprecations and how it is verified
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only the fixes are listed · ×1
  • No context/problem and no consequences/trade-offs; only the fixes are listed fastlane/metadata/android/en-US/changelogs/1020.txt — Add a Context section explaining which edge case was missed (e.g. hidden conditionals causing unclickable notifications) and a Consequences section noting any negative impact of fixing it
D20 · ADR Quality · Decision and consequences are present but the context/problem is thin ("AI no longer declares war against defeated civs") · ×1
  • Decision and consequences are present but the context/problem is thin ("AI no longer declares war against defeated civs") fastlane/metadata/android/en-US/changelogs/1021.txt — Add a Context section explaining why this decision was needed (e.g. prevent unfair advantage from surrendering to an enemy AI) and note any trade-offs such as how it interacts with existing war rules
D20 · ADR Quality · No context/problem and no consequences; all entries are fixes with author names only · ×1
  • No context/problem and no consequences; all entries are fixes with author names only fastlane/metadata/android/en-US/changelogs/1023.txt — State what each fix addresses (e.g. 'Workboat construction automation ignores existing workboats') and its trade-offs (e.g. modders may find the new screen unintuitive) in a Context/Decision section, then note any consequences in Consequences
D20 · ADR Quality · No context/problem statement; the only content is a decision list with no rationale or trade-offs for each change · ×1
  • No context/problem statement; the only content is a decision list with no rationale or trade-offs for each change fastlane/metadata/android/en-US/changelogs/1028.txt — Add a Context section explaining why nuke animation and randomization matter (e.g. pacing, player intent) and a Consequences section noting any negative impacts such as longer load times from repeatable randomness
D20 · ADR Quality · Only the decision (add CLI data-dir argument) and one spelling fix are stated; context/problem and consequences/trade-offs are absent · ×1
  • Only the decision (add CLI data-dir argument) and one spelling fix are stated; context/problem and consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1029.txt — Add Context: explain why a native Windows install is needed and what modding pain this addresses. Add Consequences: mention any runtime cost of adding a new CLI flag, and the trade-off of the spelling correction being done on a project-wide basis
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of fixes with no rationale or impact fastlane/metadata/android/en-US/changelogs/1030.txt — Add a Context section explaining why each fix matters (e.g. mod-name misspellings break discoverability) and a Consequences section noting any trade-offs (e.g. added complexity for spelling validation)
D20 · ADR Quality · Context/problem is thin ("gain control over tiles" trigger leaves your tiles alone") with no consequences; the two fixes are listed but not tied to a motivating problem · ×1
  • Context/problem is thin ("gain control over tiles" trigger leaves your tiles alone") with no consequences; the two fixes are listed but not tied to a motivating problem fastlane/metadata/android/en-US/changelogs/1033.txt — Add why the "gain control over tiles" trigger matters (e.g. prevents cheating) and document the trade-offs of each fix, such as added complexity or loss of intended behavior
D20 · ADR Quality · Decision is a list of unmet modding features with no context (why these changes are needed) and no consequences/trade-offs · ×1
  • Decision is a list of unmet modding features with no context (why these changes are needed) and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1034.txt — Add Context: explain what each change addresses (e.g. global unit uniqueness for strategy variety, recognizing Tutorials.json in validation)
D20 · ADR Quality · Decision and consequences are both vague; the body states 'Reduced save file size by 15%' with no context (what was the baseline) or trade-offs, and the multiplayer improvements list only one concrete change ('Add descriptor') while the rest is placeholder text · ×1
  • Decision and consequences are both vague; the body states 'Reduced save file size by 15%' with no context (what was the baseline) or trade-offs, and the multiplayer improvements list only one concrete change ('Add descriptor') while the rest is placeholder text fastlane/metadata/android/en-US/changelogs/1035.txt — State the original problem (save files growing too large) and the baseline metric it targets. For each listed improvement, note what it achieves and any downside (e.g. forced-resign risk). Consequences section should cover trade-offs of the 15% size gain against future versioning
D20 · ADR Quality · Context/problem is thin (only one short bullet) and consequences/trade-offs are absent; no decision statement · ×1
  • Context/problem is thin (only one short bullet) and consequences/trade-offs are absent; no decision statement fastlane/metadata/android/en-US/changelogs/1037.txt — Expand the problem section to explain why a skip button after 24h inactivity matters for gameplay pacing, and add a Consequences section covering trade-offs such as balancing player frustration vs. fairness
D20 · ADR Quality · Consequences/trade-offs are only hinted at (e.g. "discourage spreading religion") and the decision is phrased as a policy rather than an explicit rule with its own name · ×1
  • Consequences/trade-offs are only hinted at (e.g. "discourage spreading religion") and the decision is phrased as a policy rather than an explicit rule with its own name fastlane/metadata/android/en-US/changelogs/1040.txt — Give the promotion-status decision a named Rule (e.g. 'Promotion Status Visibility') and document the consequences: visible status for promoted units, risk of abuse, and how to override it
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes (crash, memory perf, generalized uniques, prep work) with no rationale · ×1
  • No context/problem and no consequences/trade-offs; only a list of fixes (crash, memory perf, generalized uniques, prep work) with no rationale fastlane/metadata/android/en-US/changelogs/1042.txt — Add the problem each fix addresses (e.g. 'conquer city automation fails under load') and document any trade-offs such as breaking existing terrain-feature interactions
D20 · ADR Quality · Context/problem is thin (only one decision and two non-constructive rules are stated; no consequences/trade-offs) · ×1
  • Context/problem is thin (only one decision and two non-constructive rules are stated; no consequences/trade-offs) fastlane/metadata/android/en-US/changelogs/1043.txt — Add a Context section explaining why stockpiled-resource-requiring constructions must not be constructed without resources and why purchasing them should consume the stockpile instead of new resources. For the ok-validation rule, note it prevents cheating during game-on-start and explain the trade-off (e.g., players may bypass validation by starting with no ok rules). For auto-assign city production, state the consequence that new players cannot immediately gain city production without completing a task.
D20 · ADR Quality · No consequences/trade-offs section describing the impact of moving screen orientation to display (e.g. loss of control from advanced tab) and the cost of keeping population reassignment only-on-change · ×1
  • No consequences/trade-offs section describing the impact of moving screen orientation to display (e.g. loss of control from advanced tab) and the cost of keeping population reassignment only-on-change fastlane/metadata/android/en-US/changelogs/1044.txt — Add a Consequences section noting that the new ruleset/uniques model may be harder for modders to debug than the old one, and explain why triggering reassignments on every building change is inefficient
D20 · ADR Quality · Decision is a one-line rule with no context (why units should not be added) and no consequences · ×1
  • Decision is a one-line rule with no context (why units should not be added) and no consequences fastlane/metadata/android/en-US/changelogs/1045.txt — Add the problem (cities fill up without new constructions, resistance is unmet) and the trade-offs (unit scarcity, forced city expansion on non-resistant cities)
D20 · ADR Quality · Decision and consequences are both present but the context/problem is thin ("AI is displeased when you become the new ally of a city-state it was the ally of") with no trade-offs · ×1
  • Decision and consequences are both present but the context/problem is thin ("AI is displeased when you become the new ally of a city-state it was the ally of") with no trade-offs fastlane/metadata/android/en-US/changelogs/1046.txt — Add the problem's scope (e.g. how often this happens) and the trade-offs: gameflow complexity vs reward for fixing
D20 · ADR Quality · Informative title but no context/problem and no consequences; the body is a list of features/fixes with no decision statement · ×1
  • Informative title but no context/problem and no consequences; the body is a list of features/fixes with no decision statement fastlane/metadata/android/en-US/changelogs/1048.txt — Give each listed item its own Context line (e.g. "Context: Multiplayer Scenarios must start on New Game") and add a Consequences section covering trade-offs like mod downloadability, sprite loading time, and resuming state integrity
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a vague title 'Significant memory improvements - should allow for much larger maps on memory-constrained devices!' plus two unrelated filler lines ('CPU performance improvements' and 'Solved rare automation crashes with escorted units') · ×1
  • No context/problem and no consequences/trade-offs; only a vague title 'Significant memory improvements - should allow for much larger maps on memory-constrained devices!' plus two unrelated filler lines ('CPU performance improvements' and 'Solved rare automation crashes with escorted units') fastlane/metadata/android/en-US/changelogs/1050.txt — Replace the empty body with a clear problem statement (e.g. current map size limits growth on constrained hardware) and an explicit decision (e.g. increase max map size to 256x256 tiles or double memory allocation) plus consequences such as reduced load-on-startup or higher GC pressure
D20 · ADR Quality · Context/problem and consequences are absent; the body is a list of arbitrary tileset/feature names with no rationale or trade-offs · ×1
  • Context/problem and consequences are absent; the body is a list of arbitrary tileset/feature names with no rationale or trade-offs fastlane/metadata/android/en-US/changelogs/1052.txt — Replace each entry with an explicit problem statement (e.g. 'Tilesets must show correct edge images for all tiles so players do not mistake them for non-edge ones') plus its consequence/trade-off
D20 · ADR Quality · Context/problem is thin (only 'Better AI evaluation for 'win the game' buildings') plus a modding list; consequences/trade-offs are absent · ×1
  • Context/problem is thin (only 'Better AI evaluation for 'win the game' buildings') plus a modding list; consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1053.txt — Add a Context section explaining why win-the-game uniques matter and what failures were identified. Add Consequences noting trade-offs such as balancing cost or over-activation of religious belief triggers.
D20 · ADR Quality · Decision is a single sentence with no context and no consequences; the body is a list of unrelated fixes plus a vague title · ×1
  • Decision is a single sentence with no context and no consequences; the body is a list of unrelated fixes plus a vague title fastlane/metadata/android/en-US/changelogs/1054.txt — State the problem (two research agreements cannot coexist due to counteroffers) and the decision (add 'upon losing/gaining [promotion] status' triggers), then document trade-offs such as how this prevents double-booking
D20 · ADR Quality · Context/problem and consequences/trade-offs are absent; the body lists only resolved ANR fixes and a protection rule with no rationale or trade-offs · ×1
  • Context/problem and consequences/trade-offs are absent; the body lists only resolved ANR fixes and a protection rule with no rationale or trade-offs fastlane/metadata/android/en-US/changelogs/1055.txt — Add context (e.g. why update IO matters for MP games) and consequences (build time cost of ignoring older games, false-positive risk from wrongly marking new games as stale)
D20 · ADR Quality · Only four short bullet rules; no context/problem statement, no explicit decision (which rule is the real one), and no consequences/trade-offs · ×1
  • Only four short bullet rules; no context/problem statement, no explicit decision (which rule is the real one), and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1056.txt — State what problem each rule addresses (e.g. 'Fixes a bug where victory-type uniques fail when a victory type is not present in the ruleset') and document trade-offs for each change
D20 · ADR Quality · Decision and consequences are present but the context/problem is thin ("Fixed spies stealing multiple tech steals in one turn") · ×1
  • Decision and consequences are present but the context/problem is thin ("Fixed spies stealing multiple tech steals in one turn") fastlane/metadata/android/en-US/changelogs/1057.txt — Add a Context section explaining why single-turn multi-technology theft was problematic and what the new rule prevents
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a single decision rule plus modding/tech-UI notes are present · ×1
  • No context/problem and no consequences/trade-offs; only a single decision rule plus modding/tech-UI notes are present fastlane/metadata/android/en-US/changelogs/1058.txt — Add why escorting civilian units matters (e.g. not allowing harassment) and the consequences of breaking the rule (unit being forced into melee). Also note how the filter is applied across mods.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of features with no rationale or impact statement · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of features with no rationale or impact statement fastlane/metadata/android/en-US/changelogs/1059.txt — Add a Context section explaining why each decision matters (e.g. mod removal pain, crash repro on unmarked cities) and a Consequences section noting trade-offs like cache size vs load time and holy-site replacement risk
D20 · ADR Quality · Context/problem is present but the explicit decision and consequences/trade-offs are both clipped by the scanner before any trade-off section appears · ×1
  • Context/problem is present but the explicit decision and consequences/trade-offs are both clipped by the scanner before any trade-off section appears fastlane/metadata/android/en-US/changelogs/1060.txt
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body lists only decisions (unit icon fallback, tile cost, tutorial, conditional) without any rationale or impact · ×1
  • No context/problem and no consequences/trade-offs; the body lists only decisions (unit icon fallback, tile cost, tutorial, conditional) without any rationale or impact fastlane/metadata/android/en-US/changelogs/1061.txt — Add a Context section explaining why each decision is needed (e.g. unit icon consistency, movement efficiency on terrain types, tutorial guidance, explicit purchase control) and a Consequences section noting trade-offs like increased mod complexity for caching, longer tile cost calculation, and the added work of writing the conditional
D20 · ADR Quality · No context/problem and no consequences; only two vague bullet fixes with no rationale · ×1
  • No context/problem and no consequences; only two vague bullet fixes with no rationale fastlane/metadata/android/en-US/changelogs/1062.txt — State the problem (e.g. players want to see which constructions belong to which civ) and document trade-offs such as false positives or notification annoyance
D20 · ADR Quality · Decision is a single sentence with no context/problem and no consequences; the body is cut by the scanner clip marker mid-action list (Guard action plus Civilopedia alignment) before any trade-offs · ×1
  • Decision is a single sentence with no context/problem and no consequences; the body is cut by the scanner clip marker mid-action list (Guard action plus Civilopedia alignment) before any trade-offs fastlane/metadata/android/en-US/changelogs/1063.txt — State what promotion/gain/loss triggers were broken or misbehaved so players can understand why this fix matters, then note the consequences/trade-offs such as increased modding complexity and the cost of keeping the version number visible
D20 · ADR Quality · The body is a list of unrelated patch notes (DoF popup, JRE version, revert, resource uniques, memory/perf fixes) with no context/problem and no explicit decision · ×1
  • The body is a list of unrelated patch notes (DoF popup, JRE version, revert, resource uniques, memory/perf fixes) with no context/problem and no explicit decision fastlane/metadata/android/en-US/changelogs/1064.txt — Convert the entries into an ADR: state the problem each fix addresses, document the decision (e.g. 'decide DoF popups require a selection option') and its consequences
D20 · ADR Quality · Decision is narrow and only one of the four elements (context/problem) is present; no consequences/trade-offs · ×1
  • Decision is narrow and only one of the four elements (context/problem) is present; no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1066.txt — Expand with a problem statement for both auto-unit-cycle disabled wait-action failure and unresearchable-tech not added in advanced-era modding, then give concrete trade-offs such as false-positive unit spawning or incomplete tech discovery
D20 · ADR Quality · No context/problem and no consequences; the title is a joke (AI/Golden Ages) with only one non-joke decision ('on [difficulty] difficulty') plus an unverifiable claim that Growth/food ranking improvements are being avoided · ×1
  • No context/problem and no consequences; the title is a joke (AI/Golden Ages) with only one non-joke decision ('on [difficulty] difficulty') plus an unverifiable claim that Growth/food ranking improvements are being avoided fastlane/metadata/android/en-US/changelogs/1067.txt — Replace the joke title with a real problem. State what growth/rankings changes were to be avoided and why, then document the consequences (e.g., reduced progression pacing) and any trade-offs of the conditional.
D20 · ADR Quality · Decision and consequences are present but the context/problem (why place edge images where terrains/improvements) is uninformative and there is no trade-off section · ×1
  • Decision and consequences are present but the context/problem (why place edge images where terrains/improvements) is uninformative and there is no trade-off section fastlane/metadata/android/en-US/changelogs/1068.txt — Add a Context section explaining why edge images sit over/under terrain/improvement rather than on top of them, and a Consequences section noting that placing them under improvements may obscure the improvement's purpose
D20 · ADR Quality · Decision and consequences are both present but the context/problem (why negative-resource trading should not be allowed) and trade-off/consequences sections are thin or non-existent · ×1
  • Decision and consequences are both present but the context/problem (why negative-resource trading should not be allowed) and trade-off/consequences sections are thin or non-existent fastlane/metadata/android/en-US/changelogs/1070.txt — Expand each decision with a clear problem statement: why allow only positive resource trades? Add a Consequences section on how this restricts diplomacy, e.g. preventing cheating via 'unit remove all'
D20 · ADR Quality · Context/problem is thin; only a single growth nullifying uniques trade-off (starvation) is stated, no consequences for the removed Scenarios button · ×1
  • Context/problem is thin; only a single growth nullifying uniques trade-off (starvation) is stated, no consequences for the removed Scenarios button fastlane/metadata/android/en-US/changelogs/1072.txt — Add context for why filter uniques needed conditionals (e.g. mod checker, civ filters), and note any consequences of removing the Scenarios button (fewer scenario options, less replay value)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a boilerplate title list with no decision or rationale · ×1
  • No context/problem and no consequences/trade-offs; the body is a boilerplate title list with no decision or rationale fastlane/metadata/android/en-US/changelogs/1073.txt — State what problem each rule addresses (e.g. 'Avoid application not responding on Android multiplayer startup') plus why it matters and any trade-offs
D20 · ADR Quality · Decision is a one-line rule with no context and consequences; the body lists only two related patches without explaining why they were added or what trade-offs they carry · ×1
  • Decision is a one-line rule with no context and consequences; the body lists only two related patches without explaining why they were added or what trade-offs they carry fastlane/metadata/android/en-US/changelogs/1074.txt — Add a Context section on why hidden uniques should not show icons (user experience) and a Consequences section covering trade-offs like false-positive detection for non-hidden uniques
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the list is a patch of fixes with no rationale · ×1
  • No context/problem and no consequences/trade-offs; the list is a patch of fixes with no rationale fastlane/metadata/android/en-US/changelogs/1075.txt — Add a Context section explaining why each fix was needed (e.g. 'crashes when swapping while retreating', 'debug tile-image locations') and a Consequences section noting any unintended side effects
D20 · ADR Quality · No context/problem and no consequences; only a decision (move capital function) with no rationale and no trade-offs · ×1
  • No context/problem and no consequences; only a decision (move capital function) with no rationale and no trade-offs fastlane/metadata/android/en-US/changelogs/1076.txt — Add the problem motivating each decision (e.g. reset-on-puppeting is wrong, need replaces/removals to load, ruins-only improvements) and the consequences of each change
D20 · ADR Quality · Only the decision and a single patch note are present; no context/problem and no consequences/trade-offs · ×1
  • Only the decision and a single patch note are present; no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1080.txt — Add a Context section explaining why large maps require memory performance improvements (e.g. frame-rate drops under load) and a Consequences section covering trade-offs like reduced tile quality or higher memory usage
D20 · ADR Quality · No context/problem and no consequences/trade-offs; most entries are resolved/fixes with no rationale · ×1
  • No context/problem and no consequences/trade-offs; most entries are resolved/fixes with no rationale fastlane/metadata/android/en-US/changelogs/1082.txt — State the problem each resolution addresses (e.g. ANR in new game screen, 'Unit built' notification selects wrong unit) and document trade-offs of the changes
D20 · ADR Quality · Decision and consequences are absent; the body is a list of UI fixes with no context/problem and no trade-offs · ×1
  • Decision and consequences are absent; the body is a list of UI fixes with no context/problem and no trade-offs fastlane/metadata/android/en-US/changelogs/1083.txt — State what problem each fix addresses (e.g. red pillage-road coloring, scroll indicator) and document any consequences such as increased load or new work for contributors
D20 · ADR Quality · No context/problem and no consequences/trade-offs sections; the body is a list of features with by-line bugfixes and AI fixes but no rationale or impact · ×1
  • No context/problem and no consequences/trade-offs sections; the body is a list of features with by-line bugfixes and AI fixes but no rationale or impact fastlane/metadata/android/en-US/changelogs/1084.txt — Add Context: why these changes matter (e.g. close-unit-table responsiveness under load, paused-music resuming on resume), then Consequences: trade-offs such as increased complexity for Food Weights or the cost of maintaining a unified unique system
D20 · ADR Quality · Context/problem is thin ("Add unique for increased improvement rates rather than decreased build times") with no consequences; the decision "Flank attack unique works with 'vs' conditionals" and Android crash fix are both one-line notes in a list that give no rationale or trade-offs · ×1
  • Context/problem is thin ("Add unique for increased improvement rates rather than decreased build times") with no consequences; the decision "Flank attack unique works with 'vs' conditionals" and Android crash fix are both one-line notes in a list that give no rationale or trade-offs fastlane/metadata/android/en-US/changelogs/1085.txt — State why each ANR was chosen (URL query handling, global politics table, music overlay) and the problem the flank-attack decision solves; add consequences such as increased code complexity for vs-conditionals and the build-time trade-off of unique improvements
D20 · ADR Quality · Only decisions are present; context/problem and consequences/trade-offs are absent · ×1
  • Only decisions are present; context/problem and consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1086.txt — Add a Context section explaining why the 'faster map update on click' is needed (e.g. player frustration from delayed unit actions) and a Consequences section noting trade-offs like reduced responsiveness or unintended side effects
D20 · ADR Quality · No explicit decision and no consequences/trade-offs; the listed items are only features/behavior notes with no stated design rationale or impact · ×1
  • No explicit decision and no consequences/trade-offs; the listed items are only features/behavior notes with no stated design rationale or impact fastlane/metadata/android/en-US/changelogs/1088.txt — State what modding decision (e.g. stockpiledResource cost for improvements) is being adopted as a formal rule, plus its trade-offs (e.g. resource inflation), and document consequences of each UI change (click-through bug fix vs performance cost)
D20 · ADR Quality · Decision is a vague "Show total number of cities in city table" with no context and no consequences; the listed fixes are cosmetic/ANR avoidance but not an explicit decision · ×1
  • Decision is a vague "Show total number of cities in city table" with no context and no consequences; the listed fixes are cosmetic/ANR avoidance but not an explicit decision fastlane/metadata/android/en-US/changelogs/1089.txt — State what data the count exposes (game state, player progress) and why it matters (bug detection, load balancing), plus the actual SQL/column name to compute it and any trade-offs of exposing this count
D20 · ADR Quality · This is a list of patch notes/tweaks with no context/problem and no explicit decision; the title 'Added notification when enemy religion spread converts a city' gives only marginal information · ×1
  • This is a list of patch notes/tweaks with no context/problem and no explicit decision; the title 'Added notification when enemy religion spread converts a city' gives only marginal information fastlane/metadata/android/en-US/changelogs/1090.txt — Convert to an ADR: state the problem (e.g. players want visibility that conversion triggers before it's too late) and document the explicit decision, consequences/trade-offs, and any new rules or thresholds
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of features with author names · ×1
  • No context/problem and no consequences/trade-offs; only a list of features with author names fastlane/metadata/android/en-US/changelogs/1092.txt — State the problem (e.g. buildings not showing before vs after) and document trade-offs such as hotkey learning curve or autosave option breaking existing saves
D20 · ADR Quality · No context/problem and no consequences/trade-offs for the decision; only a list of unimplemented features is present · ×1
  • No context/problem and no consequences/trade-offs for the decision; only a list of unimplemented features is present fastlane/metadata/android/en-US/changelogs/1093.txt — State what the ADR addresses (e.g. incorrect greeting stats in notifications) and its motivating problem, plus any consequences such as breaking existing behavior or requiring rework
D20 · ADR Quality · Decision and consequences are both empty; only context ('Huge rendering performance changes for modded images - merely "major" change for non-modded images') plus a two-line list of cosmetic fixes are present · ×1
  • Decision and consequences are both empty; only context ('Huge rendering performance changes for modded images - merely "major" change for non-modded images') plus a two-line list of cosmetic fixes are present fastlane/metadata/android/en-US/changelogs/1094.txt — Add the explicit decision (what new features/modifications were made) and its consequences/trade-offs, such as how it affects modding or image quality
D20 · ADR Quality · No context/problem and no consequences; all four elements are present only as bare bullet points (white blocks fixed, stat categories added, spy randomness different per city, drag-resize gesture) with author names · ×1
  • No context/problem and no consequences; all four elements are present only as bare bullet points (white blocks fixed, stat categories added, spy randomness different per city, drag-resize gesture) with author names fastlane/metadata/android/en-US/changelogs/1096.txt — State the problem each change fixes (e.g. white blocks appearing on new game screen, inconsistent building stats, unplayable spy RNG in same city), and document consequences such as performance cost or breaking existing behavior
D20 · ADR Quality · Decision is stated but the context/problem and consequences/trade-offs are not visible in the excerpt (only 'Revert all texture packing - solves several bugs at the expense of the faster rendering' appears) · ×1
  • Decision is stated but the context/problem and consequences/trade-offs are not visible in the excerpt (only 'Revert all texture packing - solves several bugs at the expense of the faster rendering' appears) fastlane/metadata/android/en-US/changelogs/1098.txt — Add a Context section explaining which textures were broken and why revert was chosen; add Consequences covering trade-offs like slower render thread or loss of future optimization space
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a one-line decision ('Triggers a global alert upon build start') with no rationale or impact · ×1
  • No context/problem and no consequences/trade-offs; only a one-line decision ('Triggers a global alert upon build start') with no rationale or impact fastlane/metadata/android/en-US/changelogs/1099.txt — Add the problem (e.g. players want to know builds begin) and the trade-offs of the alert (false positives, distraction from actual gameplay)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of features with no rationale or negative impact · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of features with no rationale or negative impact fastlane/metadata/android/en-US/changelogs/1102.txt — State each decision's motivation (e.g. 'Display unexplored tiles 1-tile out to prevent infinite loops') and document trade-offs such as increased memory usage for the Shuffle Civ option
D20 · ADR Quality · Decision is a single vague sentence ('AI · ×1
  • Decision is a single vague sentence ('AI: choose policy branch at random between those with the least remaining policies') plus two unrelated cosmetic patches; no context/problem and no consequences fastlane/metadata/android/en-US/changelogs/1105.txt — State what problem each decision addresses (e.g. crash under load due to unbounded resource loading) for clarity, then document trade-offs of the random-branch policy (longer runtime, deterministic reproducibility loss), and give a rationale for the XP vs 'experience' naming choice
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of unrelated patch notes (add .ico, add tile setpillaged, fix duplicate units, activate free promotion upon promotion gain, add statuses to promotion screen, hide hidden-in-world resources from overview tab, solve duplicate resource bug, fix free population buildings not working when settling cities) with no decision and no rationale · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of unrelated patch notes (add .ico, add tile setpillaged, fix duplicate units, activate free promotion upon promotion gain, add statuses to promotion screen, hide hidden-in-world resources from overview tab, solve duplicate resource bug, fix free population buildings not working when settling cities) with no decision and no rationale fastlane/metadata/android/en-US/changelogs/1106.txt — State the problem each entry addresses (e.g. 'duplicate resource bug', 'free population settlements failing on settlement') and document consequences/trade-offs for each change
D20 · ADR Quality · Context/problem and consequences are absent; the body is a list of patches with no rationale or trade-offs · ×1
  • Context/problem and consequences are absent; the body is a list of patches with no rationale or trade-offs fastlane/metadata/android/en-US/changelogs/1107.txt — Add a Context section explaining why modding filters (worked/pillaged, unitFilter catching status names) were needed and a Consequences section noting any new limitations such as false-positive detection
D20 · ADR Quality · No context/problem and no consequences; the body is a list of patch notes (bug fixes, new features) with no decision statement or trade-offs · ×1
  • No context/problem and no consequences; the body is a list of patch notes (bug fixes, new features) with no decision statement or trade-offs fastlane/metadata/android/en-US/changelogs/1108.txt — State what problem the ADR addresses (e.g. making AI value resources priced fairly, allowing stockpiled resource trading) and document the consequences such as increased player economy complexity or XP cost inflation
D20 · ADR Quality · Decision is a single vague line ('Sort city religion overview by number of followers') with no context and no consequences; the listed modding changes are half-clarified (e.g. 'never appears as a Barbarian unit' has no rationale) plus no trade-offs · ×1
  • Decision is a single vague line ('Sort city religion overview by number of followers') with no context and no consequences; the listed modding changes are half-clarified (e.g. 'never appears as a Barbarian unit' has no rationale) plus no trade-offs fastlane/metadata/android/en-US/changelogs/1109.txt — State the problem (inconsistent religion display, unbalanced gameplay) under the decision, document each mod change with its motivation and the consequences of removing accumulation for non-available units
D20 · ADR Quality · No context/problem and no consequences; only a bare decision statement plus chore-fix entries · ×1
  • No context/problem and no consequences; only a bare decision statement plus chore-fix entries fastlane/metadata/android/en-US/changelogs/1110.txt — Add why science overflow re-bonusing matters (economy/overload prevention) and the trade-offs of removing it (loss of reward for players who relied on overflow). List consequences such as how to handle existing overflow cases.
D20 · ADR Quality · No context/problem and no consequences; the title is a vague placeholder ("Warn against Resource uniques cannot use countables that depend on citywide resources") · ×1
  • No context/problem and no consequences; the title is a vague placeholder ("Warn against Resource uniques cannot use countables that depend on citywide resources") fastlane/metadata/android/en-US/changelogs/1112.txt — State the concrete problem (e.g. healthbards should not be counted as resource uniques when battle-menu countables require citywide chopping) and document trade-offs such as mod authors being able to add new countable dependencies without breaking existing ones
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of modding patches is present · ×1
  • No context/problem and no consequences/trade-offs; only a list of modding patches is present fastlane/metadata/android/en-US/changelogs/1113.txt — State the problem (autosave crashes on some Android devices) in the title/body and document the trade-offs of the policy change (e.g. reduced branching flexibility) and any new consequences from the loading-image refactor
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of patch notes (tiles/circles vs covering tiles, conditional settlers to workers, fadein/fadeout visibility, heal-on-sleep notification, faster listing for existing saves, pillage uniques moddability, William personality fix) with author names · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of patch notes (tiles/circles vs covering tiles, conditional settlers to workers, fadein/fadeout visibility, heal-on-sleep notification, faster listing for existing saves, pillage uniques moddability, William personality fix) with author names fastlane/metadata/android/en-US/changelogs/1115.txt — Add an Context section explaining what the changes address and a Consequences section noting any new trade-offs or unintended consequences
D20 · ADR Quality · No context/problem statement; only a list of modding fixes is present · ×1
  • No context/problem statement; only a list of modding fixes is present fastlane/metadata/android/en-US/changelogs/1116.txt — Add the problem motivating this ADR (e.g. inconsistent circle/hexagon tile placement for movable tiles) and its consequences
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of modding fixes with no framing · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of modding fixes with no framing fastlane/metadata/android/en-US/changelogs/1118.txt — Add a Context section explaining why tile-swapping checks who transports units (gameplay fairness) and a Consequences section on trade-offs such as increased complexity for verifying ownership
D20 · ADR Quality · No consequences/trade-offs section and the decision "Don't automate naval units in cities that only lead to enemies via impassible water routes" is a one-line rule with no rationale or negative side effects · ×1
  • No consequences/trade-offs section and the decision "Don't automate naval units in cities that only lead to enemies via impassible water routes" is a one-line rule with no rationale or negative side effects fastlane/metadata/android/en-US/changelogs/1120.txt — Add a Consequences section noting the trade-off of requiring manual navigation for such city-to-enemy paths, and note why this is needed (e.g. prevents unintended aggression from automated units on ice-only routes)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of arbitrary decisions with no framing · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of arbitrary decisions with no framing fastlane/metadata/android/en-US/changelogs/1124.txt — Add a Context section explaining what unit triggerables were previously triggering on new units (e.g. why this matters) and a Consequences section noting any trade-offs such as breaking existing triggers
D20 · ADR Quality · Context/problem is thin (only one-line "Don't choose one-time-action promotions" title and no rationale) with only the decision and two unrelated patch notes as context; consequences/trade-offs are absent · ×1
  • Context/problem is thin (only one-line "Don't choose one-time-action promotions" title and no rationale) with only the decision and two unrelated patch notes as context; consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1125.txt — Add a Context section explaining why one-time-action promotions are undesirable (e.g. reward inflation, abuse of conditional logic), then a Consequences section covering trade-offs such as how to handle legacy branches or how to prevent abuse
D20 · ADR Quality · Title is a one-line emoji-driven bug note ('Disabled android-specific behaviour of text fields since it's broken currently · ×1
  • Title is a one-line emoji-driven bug note ('Disabled android-specific behaviour of text fields since it's broken currently :|') plus 'Fixed city screen buildings panel not fully scrollable'; no context/problem and no consequences/trade-offs for any decision fastlane/metadata/android/en-US/changelogs/1126.txt — Rewrite the title to be informative (e.g. 'Disable Android text-field scrolling for now while fixing the scroll issue') then flesh out each of the three elements: problem/context, explicit decision with rationale, and consequences/trade-offs
D20 · ADR Quality · Context/problem is thin (only 'Don't spawn prophet in holy city if it's been taken over') with no rationale and consequences are only hints ('Avoid crashes from ...'); the ranking/modding stats table scrollability claims are also present but not tied to the decision · ×1
  • Context/problem is thin (only 'Don't spawn prophet in holy city if it's been taken over') with no rationale and consequences are only hints ('Avoid crashes from ...'); the ranking/modding stats table scrollability claims are also present but not tied to the decision fastlane/metadata/android/en-US/changelogs/1127.txt — Add a Context section explaining why holy cities should not spawn prophets after occupation (theft, player intent) and a Consequences section on trade-offs like false prophet presence or mod crash coverage
D20 · ADR Quality · No context/problem and no consequences/trade-offs for the four listed policies; only a policy-filter countable is named with author · ×1
  • No context/problem and no consequences/trade-offs for the four listed policies; only a policy-filter countable is named with author fastlane/metadata/android/en-US/changelogs/1128.txt — Add a Context section explaining why each policy (e.g. 'prevent frame-rate drops from unbounded split-atlas rendering') and a Consequences section noting trade-offs like added work for reviewers or reduced flexibility of modding.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of unexplained fixes with author names · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of unexplained fixes with author names fastlane/metadata/android/en-US/changelogs/1129.txt — State what city-resource resource each fix addresses (e.g. 'fixes false positives where cities show "0 turns" without researching the tech') and document trade-offs like added complexity or new comparison metrics
D20 · ADR Quality · The title 'Mod checking · ×1
  • The title 'Mod checking: Catch unexpected validation exceptions' is informative but the body is a list of unrelated patch notes (Ending Golden Age unique, Fix Civilopedia) with no context/problem and no explicit decision/consequences fastlane/metadata/android/en-US/changelogs/1131.txt — Convert each entry into an ADR: one contextualizing why mod-checking matters, another stating the decision (unique removal/fix), and a third covering consequences/trade-offs
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only three unrelated patch/fix titles with no decision or rationale · ×1
  • No context/problem and no consequences/trade-offs; only three unrelated patch/fix titles with no decision or rationale fastlane/metadata/android/en-US/changelogs/1132.txt — Add the problem (e.g. trade offer peace treaties fail because Gold is mistranslated) and its consequences (e.g. diplomacy broken, player frustration), then document the decision and any new trade mechanic
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of tasks with vague labels (e.g. 'update missing world screen image annotation') · ×1
  • No context/problem and no consequences/trade-offs; only a list of tasks with vague labels (e.g. 'update missing world screen image annotation') fastlane/metadata/android/en-US/changelogs/1133.txt — State the problem each task addresses (e.g. broken diplomacy screen for human player relations, auto-upgrade bug) and document the consequences (e.g. increased build time for translations fix, new conditional unique stacking mechanic trade-offs)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only arbitrary aesthetic/availability claims plus a requirements-simplification list · ×1
  • No context/problem and no consequences/trade-offs; only arbitrary aesthetic/availability claims plus a requirements-simplification list fastlane/metadata/android/en-US/changelogs/1134.txt — State the real problem (e.g. 'Large screens make text appear blurry under current font sizing') and document trade-offs of increasing font size (e.g. readability at smaller screens, cost to change) as well as the availability rule fix ('connect road' fails when railroads are present)
D20 · ADR Quality · No single decision is clearly stated and the body is a list of unrelated patches (sprites changing color, barbarian workers constructing improvements, modding stat reserve, console turn setting) with no context/problem or consequences · ×1
  • No single decision is clearly stated and the body is a list of unrelated patches (sprites changing color, barbarian workers constructing improvements, modding stat reserve, console turn setting) with no context/problem or consequences fastlane/metadata/android/en-US/changelogs/1136.txt — State the problem each patch addresses as a numbered decision and document its trade-offs
D20 · ADR Quality · No context/problem and no consequences/trade-offs for any of the listed fixes; only task/authoring metadata is present · ×1
  • No context/problem and no consequences/trade-offs for any of the listed fixes; only task/authoring metadata is present fastlane/metadata/android/en-US/changelogs/1137.txt — Add a Context section explaining why each fix matters (e.g. number formatting annoyance, tile-control usability) and a Consequences section noting trade-offs like increased code complexity or loss of readability
D20 · ADR Quality · Decision is a vague 'better handling of improvement-buildings' with no context/problem and no consequences; the title is uninformative · ×1
  • Decision is a vague 'better handling of improvement-buildings' with no context/problem and no consequences; the title is uninformative fastlane/metadata/android/en-US/changelogs/1138.txt — State what tile damage AI currently ignores (e.g. only heals on ruins) and why it matters for maintenance, then document the explicit decision (which tiles to heal when) and its trade-offs
D20 · ADR Quality · The title 'CPU performance improvements' is vague; the body lists only three fixes (console scrolling, quoted input find, auto-update Uniques) and a non-Natural Wonder mountain requirement with no context/problem or consequences · ×1
  • The title 'CPU performance improvements' is vague; the body lists only three fixes (console scrolling, quoted input find, auto-update Uniques) and a non-Natural Wonder mountain requirement with no context/problem or consequences fastlane/metadata/android/en-US/changelogs/1139.txt — Rephrase the title to reflect real subject matter (e.g. fix console scrolling on small UI settings). Add Context/Problem for each listed change and Consequences/trade-offs
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a decision list of fixes plus authoring notes are present · ×1
  • No context/problem and no consequences/trade-offs; only a decision list of fixes plus authoring notes are present fastlane/metadata/android/en-US/changelogs/1140.txt — State the problem each fix addresses (e.g. ancient ruins spawning, Happiness as global stat) and document any trade-offs or workarounds for each change
D20 · ADR Quality · Context/problem is thin (only the two patches listed) and consequences/trade-offs are absent; no decision statement · ×1
  • Context/problem is thin (only the two patches listed) and consequences/trade-offs are absent; no decision statement fastlane/metadata/android/en-US/changelogs/1141.txt — Add a Context section explaining what tiles countable globally and why it matters, then an explicit Decision stating the rule plus how to implement it, followed by Consequences such as false-positive detection and tile type ordering
D20 · ADR Quality · No context/problem and no consequences/trade-offs for any of the four elements; only titles and a translation-translation task are present · ×1
  • No context/problem and no consequences/trade-offs for any of the four elements; only titles and a translation-translation task are present fastlane/metadata/android/en-US/changelogs/1142.txt — Add a Context section explaining what each ADR addresses (e.g. why swapping spaceship parts is needed) and a Consequences section noting trade-offs such as balancing difficulty or game-breaking risks
D20 · ADR Quality · Context/problem and consequences/trade-offs are absent; only the decision statements plus a 'By...' note appear · ×1
  • Context/problem and consequences/trade-offs are absent; only the decision statements plus a 'By...' note appear fastlane/metadata/android/en-US/changelogs/1143.txt — Add context (why line-of-sight matters for nukes) and consequences (false-positive detection, performance cost of pantheon notifications) under each decision
D20 · ADR Quality · Title 'Better way to brighten colors' is a non sequitur; no context/problem and no decision. Body only lists two unrelated bug fixes with no rationale or consequences. · ×1
  • Title 'Better way to brighten colors' is a non sequitur; no context/problem and no decision. Body only lists two unrelated bug fixes with no rationale or consequences. fastlane/metadata/android/en-US/changelogs/1144.txt — Rewrite the title to reflect the real topic (e.g. "Fix color-brightness inconsistency in AI units"), then state the problem, the explicit decision (algorithm/setting change), and its trade-offs.
D20 · ADR Quality · No context/problem and no consequences; the entries are all single-paragraph decisions with no framing · ×1
  • No context/problem and no consequences; the entries are all single-paragraph decisions with no framing fastlane/metadata/android/en-US/changelogs/1146.txt — Add a Context section explaining why each change matters (e.g. city-building fairness, worker escape behavior) and a Consequences section noting trade-offs like WLTK fireworks annoyance or alert fatigue
D20 · ADR Quality · Context/problem and consequences are both thin; the body lists only AI/feature goals with no narrative explaining why counteroffer notifications should be removed for invalid trades · ×1
  • Context/problem and consequences are both thin; the body lists only AI/feature goals with no narrative explaining why counteroffer notifications should be removed for invalid trades fastlane/metadata/android/en-US/changelogs/1148.txt — Add a Context section stating the problem (counteroffers annoy players when requests are invalid) and a Consequences section noting trade flow pain and lost trust
D20 · ADR Quality · Only the first bullet (unit icon vanishing on right-click) is visible; the second bullet (autoplay+tutorials softlock) and the misspelling corrections context are clipped by the scanner before any decision or consequences · ×1
  • Only the first bullet (unit icon vanishing on right-click) is visible; the second bullet (autoplay+tutorials softlock) and the misspelling corrections context are clipped by the scanner before any decision or consequences fastlane/metadata/android/en-US/changelogs/1150.txt — Add a Context section explaining why the victory-screen crash matters for modders, then state the explicit fix (correcting spelling in unique parameters), and document trade-offs such as how the fixes interact with existing checks
D20 · ADR Quality · All three ADRs are single-paragraph decisions with no context/problem and no consequences; the titles alone give nothing away · ×1
  • All three ADRs are single-paragraph decisions with no context/problem and no consequences; the titles alone give nothing away fastlane/metadata/android/en-US/changelogs/1151.txt — Each should state the problem (e.g. Ancient Ruin appearing on higher difficulties) in one sentence, explain why it matters, and note any trade-offs
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the body is a list of unrelated bugfix titles with no decision or rationale · ×1
  • No context/problem and no consequences/trade-offs; the body is a list of unrelated bugfix titles with no decision or rationale fastlane/metadata/android/en-US/changelogs/1153.txt — Add an Context section explaining what problem the ADR addresses (e.g. war uniques not triggering when only one major civ remains) and a Consequences section on trade-offs like false positives or unintended side effects
D20 · ADR Quality · Title is a vague placeholder ('Fix combat conditionals not working correctly') and the body records only two arbitrary AI worker goals with no context/problem or consequences · ×1
  • Title is a vague placeholder ('Fix combat conditionals not working correctly') and the body records only two arbitrary AI worker goals with no context/problem or consequences fastlane/metadata/android/en-US/changelogs/1154.txt — Replace the placeholder title with an informative problem statement (e.g. 'Combat conditionals fail under all scenarios' or 'Conditional battle outcomes are inconsistent across maps'). Add a Context section explaining why the conditionals broke, and Consequences covering trade-offs like increased worker load
D20 · ADR Quality · Only two fixes; no context/problem and no consequences/trade-offs are stated · ×1
  • Only two fixes; no context/problem and no consequences/trade-offs are stated fastlane/metadata/android/en-US/changelogs/1155.txt — State the problem (map editor tile click does not show stats) and the alternative (stats hidden), plus any trade-offs for each fix
D20 · ADR Quality · No context/problem and no consequences; only vague decision statements with task lists (Victory Type) and author names · ×1
  • No context/problem and no consequences; only vague decision statements with task lists (Victory Type) and author names fastlane/metadata/android/en-US/changelogs/1156.txt — State the problem (AI is warping humans on high difficulties, bad scenarios break new screen) and its consequences (players lose trust in AI fairness, higher difficulty curve), then document the explicit decision (add Brave New World Victory Type, Civilopedia Victory Types)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of decisions (city-state icons removed, healing-on-dangerous-tiles fixed) appear · ×1
  • No context/problem and no consequences/trade-offs; only a list of decisions (city-state icons removed, healing-on-dangerous-tiles fixed) appear fastlane/metadata/android/en-US/changelogs/1157.txt — Add the problem motivating each decision (e.g. 'multiple images on last mod is distracting') and document trade-offs such as loss of city-state icon guidance and the new heal-on-non-dangerous-tile rule
D20 · ADR Quality · Context/problem is thin (only one concrete problem stated) and consequences/trade-offs are absent; the decision 'force rankings doesn't evaluate all unit conditionals as multiplicative' is a restatement of the title with no rationale · ×1
  • Context/problem is thin (only one concrete problem stated) and consequences/trade-offs are absent; the decision 'force rankings doesn't evaluate all unit conditionals as multiplicative' is a restatement of the title with no rationale fastlane/metadata/android/en-US/changelogs/1158.txt — Add context for each listed bug (e.g. why mod removal of techs matters, why post-battle movement depends on battle state) and document consequences such as increased conditional complexity or reduced playability
D20 · ADR Quality · Decision and consequences are both present but the context/problem is non-existent (no problem statement) and trade-offs are absent · ×1
  • Decision and consequences are both present but the context/problem is non-existent (no problem statement) and trade-offs are absent fastlane/metadata/android/en-US/changelogs/1160.txt — Add a Context section explaining why peace trade ends notification matters (e.g. it feels unfair when you lose a war without warning) and a Consequences section on how to handle the new behavior, such as balancing the game
D20 · ADR Quality · Only the decision "Added map autosave" and a list of fixes are present; no context/problem and no consequences/trade-offs · ×1
  • Only the decision "Added map autosave" and a list of fixes are present; no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1161.txt — Add the problem motivating each fix (e.g. 'notification categories can be minimized by clicking on the title') and its consequences (e.g. autosaving may cause corruption if canceled)
D20 · ADR Quality · Decision is a list of fixes but no context/problem and no consequences/trade-offs are stated · ×1
  • Decision is a list of fixes but no context/problem and no consequences/trade-offs are stated fastlane/metadata/android/en-US/changelogs/1162.txt — State the problem for each fix (e.g. rare crash on map editor close, non-visible tiles not showing roads, spying-on-city info overload) and document the trade-offs (e.g. added ModConstant cost, new spy limit)
D20 · ADR Quality · Only two entries in the list are named; the title and body give no context/problem and no consequences · ×1
  • Only two entries in the list are named; the title and body give no context/problem and no consequences fastlane/metadata/android/en-US/changelogs/1163.txt — Give each listed change a descriptive problem statement (e.g. 'Civilopedia lacks global uniqueness for policy/belief') and note any trade-offs
D20 · ADR Quality · Decision is a list of fixes with no context/problem and no consequences/trade-offs · ×1
  • Decision is a list of fixes with no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1164.txt — State the problem (e.g. "Crash on declare war triggers") for each fix and document trade-offs such as reduced cultural victory rewards or added complexity in multiplayer auth
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a decision (allow weighted AI decisions) with patch lists and by-line changers · ×1
  • No context/problem and no consequences/trade-offs; only a decision (allow weighted AI decisions) with patch lists and by-line changers fastlane/metadata/android/en-US/changelogs/1165.txt — State the problem (weighted choices for AI reasoning) and its trade-offs (game balance/decision weight fairness), then document consequences of enabling this change
D20 · ADR Quality · The body is a list of commit messages with no context/problem and no explicit decision; the only substantive content is 'Better "acceptable modifier for" validation - accepts timed uniques as triggerable' · ×1
  • The body is a list of commit messages with no context/problem and no explicit decision; the only substantive content is 'Better "acceptable modifier for" validation - accepts timed uniques as triggerable' fastlane/metadata/android/en-US/changelogs/1166.txt — Add Context: explain why timing-based modifiers are problematic (e.g. false triggers, inconsistent behavior) and the problem this fixes. Add Decision: describe the validation rule implemented and any new API it adds. Add Consequences: note trade-offs like increased false-positive rate or longer test suite.
D20 · ADR Quality · Context/problem is thin (only one attack rule plus a mod-checker policy) and consequences/trade-offs are absent; the body clips mid-policies list · ×1
  • Context/problem is thin (only one attack rule plus a mod-checker policy) and consequences/trade-offs are absent; the body clips mid-policies list fastlane/metadata/android/en-US/changelogs/1167.txt — Expand each rule with a rationale (e.g. why siege cannot attack unhealthed cities) and note any trade-offs such as increased AI aggression or counter-surge scenarios
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a vague title "Avoid rare crash concurrent modification when calculating construction costs" plus modding/AbsoluteUnits examples · ×1
  • No context/problem and no consequences/trade-offs; only a vague title "Avoid rare crash concurrent modification when calculating construction costs" plus modding/AbsoluteUnits examples fastlane/metadata/android/en-US/changelogs/1168.txt — State the concrete problem (e.g. concurrent-modification crash during cost calculation) and its impact on gameplay, then document the trade-offs of the fix (e.g. slower cost recalculation or higher memory usage)
D20 · ADR Quality · No context/problem and no consequences/trade-offs; the three entries are feature tickets with no decision or rationale · ×1
  • No context/problem and no consequences/trade-offs; the three entries are feature tickets with no decision or rationale fastlane/metadata/android/en-US/changelogs/1169.txt — State what Civilopedia GlobalUniques currently lacks (e.g. inconsistent display) and why the trade-off of allowing units to destroy cities is acceptable
D20 · ADR Quality · Only the decision and a partial rationale are present; no context/problem and consequences/trade-offs · ×1
  • Only the decision and a partial rationale are present; no context/problem and consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1170.txt — Add the problem motivating each change (e.g. prevent stale building-improvements from appearing when a buildable structure is removed) and document trade-offs such as how Stockpile visibility impacts resource management
D20 · ADR Quality · Only the decision and a partial list of fixes are present; no context/problem and consequences/trade-offs · ×1
  • Only the decision and a partial list of fixes are present; no context/problem and consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1171.txt — Add a Context section explaining why Libgdx was upgraded to 1.14.0 (e.g., resolved Wayand/Android bugs) and a Consequences section noting any new trade-offs such as breaking existing mods or requiring rework
D20 · ADR Quality · No context/problem and no consequences/trade-offs for any of the listed changes; only a 'Fix X' list with no rationale · ×1
  • No context/problem and no consequences/trade-offs for any of the listed changes; only a 'Fix X' list with no rationale fastlane/metadata/android/en-US/changelogs/1172.txt — For each change in the list (e.g. add/change port ability, fix translation bugs) explain what problem it solves or why parallelization matters
D20 · ADR Quality · Only four short patch-level fixes are listed; no context/problem and no consequences/trade-offs · ×1
  • Only four short patch-level fixes are listed; no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1173.txt — Add a Context section explaining why each fix is needed (e.g. parse errors after download are disruptive) and a Consequences section noting any downsides of the proposed changes
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of arbitrary tasks with no rationale · ×1
  • No context/problem and no consequences/trade-offs; only a list of arbitrary tasks with no rationale fastlane/metadata/android/en-US/changelogs/1174.txt — State the problem each task addresses (e.g. buttons misaligned on the main menu, background maps stretched to ruin aspect ratios, Civilopedia stats wrong) and document the trade-offs for each change
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of tasks with author names · ×1
  • No context/problem and no consequences/trade-offs; only a list of tasks with author names fastlane/metadata/android/en-US/changelogs/1175.txt — State the problem each task addresses (e.g. broken minimap state after maximising, compatibility with rounded corners) and document any consequences such as repositioning the maximize button or disabling settling in shared territory
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of features with author names is present · ×1
  • No context/problem and no consequences/trade-offs; only a list of features with author names is present fastlane/metadata/android/en-US/changelogs/1177.txt — State the problem (e.g. slow map generation or high memory usage for large maps) and document the trade-offs of each proposed change
D20 · ADR Quality · No context/problem and no consequences; the body is a list of unrelated modding patches with no decision or trade-offs · ×1
  • No context/problem and no consequences; the body is a list of unrelated modding patches with no decision or trade-offs fastlane/metadata/android/en-US/changelogs/1179.txt — State what problem the ADR addresses (e.g. players find it unfair that cloned units trigger after data copy) and document the consequences (modder friction, new balancing burden)
D20 · ADR Quality · Decision is an incomplete list of fixes with no context/problem and no consequences/trade-offs · ×1
  • Decision is an incomplete list of fixes with no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1180.txt — State the problem each fix addresses (e.g. 'Units that upgrade continue escorting should not force players to re-escort') and document the trade-offs for each change
D20 · ADR Quality · Every entry is a short patch/feature bullet with no context/problem and no consequences; the title 'Memory + CPU performance improvements' is vague and the author list does not explain what it addresses · ×1
  • Every entry is a short patch/feature bullet with no context/problem and no consequences; the title 'Memory + CPU performance improvements' is vague and the author list does not explain what it addresses fastlane/metadata/android/en-US/changelogs/1181.txt — Add a Context section explaining which game mechanics or load issues were identified (e.g. slow search, unresponsive modding) and a Consequences section on trade-offs like balancing new espionage or ensuring no unintended side effects
D20 · ADR Quality · Only two decisions (encampment-finding vs ruins-finding separation; better 'city to attack' logic) are listed; the second decision fix ('fix battle notification order') is a separate entry with no context or consequences · ×1
  • Only two decisions (encampment-finding vs ruins-finding separation; better 'city to attack' logic) are listed; the second decision fix ('fix battle notification order') is a separate entry with no context or consequences fastlane/metadata/android/en-US/changelogs/1182.txt — Add a Context section explaining why encampment and ruins finding need to be separated, and why city bombardment target selection matters. For the notification-order fix, note what the wrong ordering causes and any performance cost of reordering
D20 · ADR Quality · Only the list of fixes is present; no context/problem and no consequences/trade-offs are stated · ×1
  • Only the list of fixes is present; no context/problem and no consequences/trade-offs are stated fastlane/metadata/android/en-US/changelogs/1184.txt — Add a Context section explaining why map width matters for distance checks (e.g. terrain navigation or combat) and a Consequences section noting any performance cost of relaxing this check
D20 · ADR Quality · Context/problem and consequences/trade-offs are absent; only bare bullet lists of fixes appear · ×1
  • Context/problem and consequences/trade-offs are absent; only bare bullet lists of fixes appear fastlane/metadata/android/en-US/changelogs/1185.txt — Add the problem motivating each fix (e.g. AI tile-to-work picking is suboptimal) and the trade-offs of each change (e.g. false-positive unit attacks)
D20 · ADR Quality · Context/problem is thin (only "Fix City button problems" listed) with no rationale for the changes; consequences/trade-offs are absent · ×1
  • Context/problem is thin (only "Fix City button problems" listed) with no rationale for the changes; consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1188.txt — Add a Context section explaining why each change matters and a Consequences section noting any risks or alternatives
D20 · ADR Quality · Context/problem is thin (only the incompatible improvements listed and a vague modding note) with no consequences; decision is a list of fixes but each fix's rationale and trade-offs are missing · ×1
  • Context/problem is thin (only the incompatible improvements listed and a vague modding note) with no consequences; decision is a list of fixes but each fix's rationale and trade-offs are missing fastlane/metadata/android/en-US/changelogs/1189.txt — Add a Context section explaining why terrain-incompatible mods must be removed (e.g. prevent conflicts between favoredReligion and defensivePacts) and a Consequences section noting the trade-offs of removing these changes, such as losing intended modding flexibility
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of change tickets with author names · ×1
  • No context/problem and no consequences/trade-offs; only a list of change tickets with author names fastlane/metadata/android/en-US/changelogs/1190.txt — State the problem each ticket addresses (e.g. first-turn time in MP games, AI not sending workers to foreign territory) and document the trade-offs for each decision
D20 · ADR Quality · The body is a list of patch-level change tickets with no context/problem and no explicit decision; each entry is a one-line task plus author but there is no overarching ADR framing · ×1
  • The body is a list of patch-level change tickets with no context/problem and no explicit decision; each entry is a one-line task plus author but there is no overarching ADR framing fastlane/metadata/android/en-US/changelogs/1191.txt — Convert the entries into an ADR describing the problem (e.g. MP first-turn time, terrain-change order) and the decisions (better ordering of ignore-terrain-change ops, AI rules for wandering, URL error display/redirect optimization), then list consequences/trade-offs
D20 · ADR Quality · No single decision is framed as a coherent architectural choice; the entries are mostly feature/bug fixes with no context/problem and no consequences · ×1
  • No single decision is framed as a coherent architectural choice; the entries are mostly feature/bug fixes with no context/problem and no consequences fastlane/metadata/android/en-US/changelogs/1192.txt — State each ADR's problem (e.g. 'unit promotion notifications fail to appear') and its trade-offs under one Decision section
D20 · ADR Quality · No context/problem statement; only the decision (units unset sleep/automation on manual repair commands) is present with no consequences · ×1
  • No context/problem statement; only the decision (units unset sleep/automation on manual repair commands) is present with no consequences fastlane/metadata/android/en-US/changelogs/1193.txt — Add a Context section explaining why units should not sleep/automate during manual repair and the crash it prevents. Then document the consequences: loss of automated rest, increased downtime from re-activating, and any new workarounds.
D20 · ADR Quality · All four elements (context/problem, explicit decision, consequences/trade-offs, informative title) are absent; the entries look like modding ticket titles and no ADR is present · ×1
  • All four elements (context/problem, explicit decision, consequences/trade-offs, informative title) are absent; the entries look like modding ticket titles and no ADR is present fastlane/metadata/android/en-US/changelogs/1195.txt — Replace with a single architecture decision record stating what improvements are being considered, why they matter, the trade-offs of implementing them, and any constraints
D20 · ADR Quality · Title is a vague placeholder ('Fixed map generation on world wrap and 3 continents') with no problem statement; body contains only the decision (use default tileset if configured one exists but cannot be loaded) plus an unrelated game-speed adjustment note. No consequences. · ×1
  • Title is a vague placeholder ('Fixed map generation on world wrap and 3 continents') with no problem statement; body contains only the decision (use default tileset if configured one exists but cannot be loaded) plus an unrelated game-speed adjustment note. No consequences. fastlane/metadata/android/en-US/changelogs/1196.txt — Give the title a real problem (e.g. 'Map tiles fail to load when the specified world-wrap tileset is corrupted') and document trade-offs such as breaking existing tileset usage.
D20 · ADR Quality · No Context/Problem statement; no Decision body; consequences/trade-offs not present · ×1
  • No Context/Problem statement; no Decision body; consequences/trade-offs not present fastlane/metadata/android/en-US/changelogs/1197.txt — State the specific modding problem (e.g. divide-by-zero error in an expression) and the explicit decision (default expressions to zero instead of crashing), plus a Consequences section noting trade-offs like false-positive behavior
D20 · ADR Quality · All four entries are feature/behavior titles with no context/problem statement, no explicit decision, and no consequences; the title alone gives no signal · ×1
  • All four entries are feature/behavior titles with no context/problem statement, no explicit decision, and no consequences; the title alone gives no signal fastlane/metadata/android/en-US/changelogs/1198.txt — Each entry is a one-line task title without any framing (why this change matters), scope, or trade-offs. Add a Context section for each explaining the problem and an Explicit Decision section stating what exactly will be done.
D20 · ADR Quality · Context/problem and consequences/trade-offs are absent; only a list of fixes is present · ×1
  • Context/problem and consequences/trade-offs are absent; only a list of fixes is present fastlane/metadata/android/en-US/changelogs/1199.txt — Add the problem each fix addresses (e.g. 'unit promotion notification shows wrong name') and its consequence (e.g. 'fixes incorrect unit display for promoted units'). Also note any trade-offs such as increased complexity or reduced discoverability.
D20 · ADR Quality · Context/problem is thin and the consequences/trade-offs are absent; only resolved policy changes are listed · ×1
  • Context/problem is thin and the consequences/trade-offs are absent; only resolved policy changes are listed fastlane/metadata/android/en-US/changelogs/1200.txt — Add a Context section explaining when overridden branches should no longer 'stick around' and why the missing-mod detection was added. Add Consequences noting trade-offs like increased download load for large mods
D20 · ADR Quality · Context/problem is thin (only one bullet about resurrected civs and one about puppeted cities) with no consequences; the decision list is a modding feature set while the border expansion rationale and trade-offs are absent · ×1
  • Context/problem is thin (only one bullet about resurrected civs and one about puppeted cities) with no consequences; the decision list is a modding feature set while the border expansion rationale and trade-offs are absent fastlane/metadata/android/en-US/changelogs/1201.txt — Add context for each listed change: why uniques override default costs, why unit trigger conditions work on placed units, and what problems the border expansion bugs fix (e.g. false-flagged contested tiles). Then document consequences such as increased modding complexity or new bug windows
D20 · ADR Quality · No context/problem statement; only a single decision (add star icon) with no consequences and an unidentifiable author · ×1
  • No context/problem statement; only a single decision (add star icon) with no consequences and an unidentifiable author fastlane/metadata/android/en-US/changelogs/1202.txt — Add the problem motivating the decision (e.g. players want to quickly tell which resources are currently available vs those locked in promotions), the trade-offs of adding stars, and any consequences
D20 · ADR Quality · Context/problem is thin ("Catch base terrains with occursOn in ruleset validation" and "Removing improvement-creating buildings where the no city tile has the improvement, no longer crashes") but the explicit decision and consequences/trade-offs are cut by a clip marker mid-sentence; the body ends before any trade-off section appears · ×1
  • Context/problem is thin ("Catch base terrains with occursOn in ruleset validation" and "Removing improvement-creating buildings where the no city tile has the improvement, no longer crashes") but the explicit decision and consequences/trade-offs are cut by a clip marker mid-sentence; the body ends before any trade-off section appears fastlane/metadata/android/en-US/changelogs/1204.txt — Add a Consequences section covering the new alternate-pathing cost, the rareFeatures/normal-tile placement change's impact on terrain diversity, and whether max/min countable-expr functions are considered stable
D20 · ADR Quality · Decision is a bare 'changed default max RAM from 1GB to 4GB' with no context or consequences; the remaining entries are feature/spy restrictions and a natural-wonders change without any contextual problem statement or trade-offs · ×1
  • Decision is a bare 'changed default max RAM from 1GB to 4GB' with no context or consequences; the remaining entries are feature/spy restrictions and a natural-wonders change without any contextual problem statement or trade-offs fastlane/metadata/android/en-US/changelogs/1205.txt — Replace each entry with an explicit Context (why this change, what it addresses), Decision (the exact value changed and why), and Consequences/trade-offs (e.g. increased RAM cost, new bugs from 4GB limits) for all four entries
D20 · ADR Quality · Consequences/trade-offs are not present in the visible text · ×1
  • Consequences/trade-offs are not present in the visible text fastlane/metadata/android/en-US/changelogs/1206.txt — Add a Consequences section covering how new players will no longer be able to offer negative gold and what happens when existing offers break due to the change
D20 · ADR Quality · Context/problem is thin ("Ignore free promotions for promotion path costs") and the decision "Allow gaining free promotions before gaining XP" contradicts the cost-first rationale; consequences/trade-offs are absent · ×1
  • Context/problem is thin ("Ignore free promotions for promotion path costs") and the decision "Allow gaining free promotions before gaining XP" contradicts the cost-first rationale; consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1209.txt — Add a Context section explaining why promotion costs matter (economy/leveling balance) and why allowing free promotions would break that, then document the trade-off of weakening XP-gain as an alternative
D20 · ADR Quality · Only two bugfix decisions; context/problem and consequences/trade-offs are absent · ×1
  • Only two bugfix decisions; context/problem and consequences/trade-offs are absent fastlane/metadata/android/en-US/changelogs/1210.txt — Add a Context section explaining the problem (AIs ignore dead civs) and a Consequences section on trade-offs such as how to handle the old behavior when the mod is reloaded
D20 · ADR Quality · No context/problem and no explicit decision; only task lists with no rubric for prioritization · ×1
  • No context/problem and no explicit decision; only task lists with no rubric for prioritization fastlane/metadata/android/en-US/changelogs/1211.txt — State the problem each entry addresses (e.g. 'fix embassy trade logic bug so peace treaties are signed correctly') and document the decision (e.g. 'add a conditional to check if both parties have accepted the treaty before proceeding') along with its consequences
D20 · ADR Quality · Context/problem is thin (only one of the four listed problems is named) and consequences/trade-offs are not present; the body reads like a list of fixes with no rationale · ×1
  • Context/problem is thin (only one of the four listed problems is named) and consequences/trade-offs are not present; the body reads like a list of fixes with no rationale fastlane/metadata/android/en-US/changelogs/1212.txt — Add a Context section explaining why each fix matters (e.g. Barbarian encampments draining memory, trade gift misbehavior, crash on city purchase) and a Consequences section noting any new problems or balancing concerns
D20 · ADR Quality · Only the two decisions are recorded; the context/problem and consequences sections are missing (and the body is clipped mid-decision) · ×1
  • Only the two decisions are recorded; the context/problem and consequences sections are missing (and the body is clipped mid-decision) fastlane/metadata/android/en-US/changelogs/1213.txt — Add a Context section explaining why each decision was needed (e.g. 'unitset rendering is optional for accessibility') and a Consequences section noting trade-offs like increased complexity or unintended behavior
D20 · ADR Quality · Context/problem is thin ("Custom maps are retained when starting a new game from an old one" and "Spectators can see the building list again") with no consequences; decisions are listed by author names with only vague problem statements · ×1
  • Context/problem is thin ("Custom maps are retained when starting a new game from an old one" and "Spectators can see the building list again") with no consequences; decisions are listed by author names with only vague problem statements fastlane/metadata/android/en-US/changelogs/1214.txt — Add context for each decision: why retain/custom maps, what happens if they are lost, and why spectators need to see the building list again. Give explicit trade-offs (load time penalty, map corruption) for retaining custom maps and consequences of losing them.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of ruleset-specific error-ignoring rules with no rationale or negative side effects · ×1
  • No context/problem and no consequences/trade-offs; only a list of ruleset-specific error-ignoring rules with no rationale or negative side effects fastlane/metadata/android/en-US/changelogs/1215.txt — Add the problem (e.g. unique errors are broken when disabled) and document consequences such as false-positive tolerance and save-scumming risk
D20 · ADR Quality · The body is a list of vaguely related tasks with no context/problem statement and no consequences/trade-offs · ×1
  • The body is a list of vaguely related tasks with no context/problem statement and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1216.txt — State the problem each task addresses (e.g. ruleset-disabled unique filtering, AI getting stuck in event loops) and document the consequences for each one
D20 · ADR Quality · No context/problem statement; the four items listed are only decisions with no rationale or consequences · ×1
  • No context/problem statement; the four items listed are only decisions with no rationale or consequences fastlane/metadata/android/en-US/changelogs/1218.txt — Add a Context section explaining why embassies should be enabled by uniques and why sending-embassy requirements are redundant. For each decision, note the trade-offs (e.g., added complexity for countables)
D20 · ADR Quality · No context/problem and no consequences; the title is a vague placeholder ("Rendering improvements for large maps") · ×1
  • No context/problem and no consequences; the title is a vague placeholder ("Rendering improvements for large maps") fastlane/metadata/android/en-US/changelogs/1219.txt — State what problem the changes fix (e.g. rendering of xx structures on very large maps) and document trade-offs such as performance cost or texture loading under load
D20 · ADR Quality · No context/problem and no consequences; only two vague improvement bullet points in the header · ×1
  • No context/problem and no consequences; only two vague improvement bullet points in the header fastlane/metadata/android/en-US/changelogs/1220.txt — State what procedural map generation gap this addresses (e.g. unwrapping seams on small screens) and document trade-offs such as memory usage or runtime cost
D20 · ADR Quality · No context/problem and no consequences; the body is a list of unrelated patch tickets with no decision statement · ×1
  • No context/problem and no consequences; the body is a list of unrelated patch tickets with no decision statement fastlane/metadata/android/en-US/changelogs/1222.txt — State what problem the ADR addresses (e.g. AI stopping city creation late-game) and its trade-offs, then document each listed ticket as an independent fix
D20 · ADR Quality · No context/problem and no consequences; the body is a list of arbitrary features plus an uninformative title · ×1
  • No context/problem and no consequences; the body is a list of arbitrary features plus an uninformative title fastlane/metadata/android/en-US/changelogs/1224.txt — Add a Context section explaining why policy notifications, music track selection, and fewer surprises matter, then a Consequences section covering trade-offs like reduced friction or increased complexity
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes with 'By' attribution · ×1
  • No context/problem and no consequences/trade-offs; only a list of fixes with 'By' attribution fastlane/metadata/android/en-US/changelogs/1225.txt — State the problem each fix addresses (e.g. double buttons for great people, black outlines on Stat symbols) and document trade-offs such as CPU cost or new work required
D20 · ADR Quality · No contextual problem statement; the only decisions are stub entries with no rationale or consequences · ×1
  • No contextual problem statement; the only decisions are stub entries with no rationale or consequences fastlane/metadata/android/en-US/changelogs/1226.txt — State what spy-name translation hides (e.g. prevent clutter) and why ruleset name collisions matter, plus the consequences of each fix
D20 · ADR Quality · No explicit decision and no consequences; the four listed items are only context/fix notes with no overarching architecture decision · ×1
  • No explicit decision and no consequences; the four listed items are only context/fix notes with no overarching architecture decision fastlane/metadata/android/en-US/changelogs/1227.txt — State a single architectural decision (e.g. "allow map tiles to be loaded in bulk without breaking memory limits") and its consequences under each of the four context points
D20 · ADR Quality · Only three fixes; context/problem and consequences are absent (no decision body) and the title is a bug label rather than an informative ADR · ×1
  • Only three fixes; context/problem and consequences are absent (no decision body) and the title is a bug label rather than an informative ADR fastlane/metadata/android/en-US/changelogs/1228.txt — Rephrase the header to name the real decision (e.g. "Fix black screen on next-turn button"), then flesh out each fix with its own Context, Decision, and Consequences section
D20 · ADR Quality · No context/problem and no consequences/trade-offs for any of the listed items; all are bare bullet points with author names · ×1
  • No context/problem and no consequences/trade-offs for any of the listed items; all are bare bullet points with author names fastlane/metadata/android/en-US/changelogs/1230.txt — State each decision's motivation (e.g. why cap force bonus is needed) and document the trade-offs (e.g. balancing penalty for lower movement, moddability cost)
D20 · ADR Quality · Decision is a single line with no context/problem and no consequences; the title is uninformative · ×1
  • Decision is a single line with no context/problem and no consequences; the title is uninformative fastlane/metadata/android/en-US/changelogs/1231.txt — State what problem each fix addresses (e.g. crash on encampment removal, Boreal map lake formation bug) and document trade-offs such as performance cost or new bugs introduced
D20 · ADR Quality · No context/problem statement (why conditional worker uniques are problematic) and no consequences/trade-offs · ×1
  • No context/problem statement (why conditional worker uniques are problematic) and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1232.txt — Add a Context section explaining the problem (e.g. hotkeys triggering twice when two improvements share the same key) and a Consequences section on trade-offs like increased unique-key surface area or changed behavior for users who rely on duplicate keys
D20 · ADR Quality · No context/problem statement; only a vague title and a one-line 'Hopefully solved city-screen audio problems' with no rationale or scope · ×1
  • No context/problem statement; only a vague title and a one-line 'Hopefully solved city-screen audio problems' with no rationale or scope fastlane/metadata/android/en-US/changelogs/1234.txt — State the specific audio conflict (e.g. overlapping sounds from shared styles) and the problem it causes, then explain why sharing style across nations is the root cause
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of contributors and fixes are present · ×1
  • No context/problem and no consequences/trade-offs; only a list of contributors and fixes are present fastlane/metadata/android/en-US/changelogs/1235.txt — State the problem (e.g. duplicate EventChoice entries causing duplication) and document consequences such as mod compatibility or data-loss risk
D20 · ADR Quality · The body is a list of arbitrary patch-level fixes with no context/problem and no explicit decision/consequences · ×1
  • The body is a list of arbitrary patch-level fixes with no context/problem and no explicit decision/consequences fastlane/metadata/android/en-US/changelogs/1236.txt — Convert the entries into an ADR describing the problem (e.g. stockpiled resources not transferring) and the explicit decision (add build-weight per personality, fix flat-earth map generation), plus consequences/trade-offs
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes with authorship and some minor non-consequential notes are present · ×1
  • No context/problem and no consequences/trade-offs; only a list of fixes with authorship and some minor non-consequential notes are present fastlane/metadata/android/en-US/changelogs/1237.txt — State the problem each fix addresses (e.g. recursive citywide-resource countable, missing -NC sounds) and document the trade-offs for each proposed change
D20 · ADR Quality · The body is a chaotic mix of unrelated decisions (don't wipe city-state relations on liberation; freeze Demographics rankings to turn-start snapshots) and a separate 'fix · ×1
  • The body is a chaotic mix of unrelated decisions (don't wipe city-state relations on liberation; freeze Demographics rankings to turn-start snapshots) and a separate 'fix: MP upload no longer causes improvements to advance' with its own subsections (AI improvements, CPU performance), all written by different authors without any context or consequences section fastlane/metadata/android/en-US/changelogs/1238.txt — Structure the document around a single problem/context and a clear decision with trade-offs. The existing entries are unrelated; consolidate them into one ADR.
D20 · ADR Quality · The body is a list of PR-style patches with no context/problem and no consequences/trade-offs · ×1
  • The body is a list of PR-style patches with no context/problem and no consequences/trade-offs fastlane/metadata/android/en-US/changelogs/1239.txt — State the problem (map lag, generation latency) and the decision (CPU performance improvements via these fixes), then document trade-offs such as new bugs or balancing costs
D20 · ADR Quality · The title 'CPU performance improvements' is generic and the body lists only arbitrary task-queueing rulesets, upload-warnings, nation-colored names, and a modding rule with no context/problem or consequences · ×1
  • The title 'CPU performance improvements' is generic and the body lists only arbitrary task-queueing rulesets, upload-warnings, nation-colored names, and a modding rule with no context/problem or consequences fastlane/metadata/android/en-US/changelogs/1242.txt — Rephrase the title to reflect real content (e.g. 'Allow XP ruin rewards for civilian units in base rulesets') and flesh out each listed change with its problem statement and trade-offs
D20 · ADR Quality · Decision is a one-line bugfix with no context/problem statement (only "ANR Bugfix"), no consequences/trade-offs, and the authoring note lists unrelated fixes instead of the real decision · ×1
  • Decision is a one-line bugfix with no context/problem statement (only "ANR Bugfix"), no consequences/trade-offs, and the authoring note lists unrelated fixes instead of the real decision fastlane/metadata/android/en-US/changelogs/1243.txt — Replace the single-line fix with an explicit problem statement (e.g. "Rebuild minimap only when its size changes to avoid ANR stalls on drag") plus a Consequences section covering rebuild cost vs. frame-rate benefit, and ensure all listed authoring notes are grouped under the real decision
D20 · ADR Quality · Context/problem and consequences/trade-offs are absent; only resolved issues and an unciv-loof rationale appear · ×1
  • Context/problem and consequences/trade-offs are absent; only resolved issues and an unciv-loof rationale appear fastlane/metadata/android/en-US/changelogs/1246.txt — Add a Context section explaining why the river-fixed decision was needed (e.g. gameplay balance) and a Consequences section on trade-offs such as increased erosion simulation or new bugs from untested terrain.
D20 · ADR Quality · Context/problem is non-existent; the body lists only fixes with author names and no rationale or consequences · ×1
  • Context/problem is non-existent; the body lists only fixes with author names and no rationale or consequences fastlane/metadata/android/en-US/changelogs/1247.txt — Add a Context section explaining why singleplayer map visibility matters (e.g. preventing cheating) and a Consequences section on trade-offs like reduced AI realism
D20 · ADR Quality · Each entry is a one-line task with no context/problem statement or consequences; titles are uninformative and the authoring metadata (unciv-loof, SomeTroglodyte) does not explain why each decision matters · ×1
  • Each entry is a one-line task with no context/problem statement or consequences; titles are uninformative and the authoring metadata (unciv-loof, SomeTroglodyte) does not explain why each decision matters fastlane/metadata/android/en-US/changelogs/1249.txt — For each listed change, add a Context section explaining what it addresses (e.g. 'Fixes scroll position loss when multiple units are promoted') and a Consequences section on trade-offs (e.g. 'May reduce the number of visible promotions in the promotion queue'). Use the authoring metadata to attribute decisions to their owners.
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a patch list with by-line fixes · ×1
  • No context/problem and no consequences/trade-offs; only a patch list with by-line fixes fastlane/metadata/android/en-US/changelogs/1252.txt — State what problem each fix addresses (e.g. ANR when opening civilopedia, Future Tech quest not counting) and the consequences of each decision
D20 · ADR Quality · Context/problem is thin and the consequences/trade-offs section is cut by the clip marker mid-decision body; trade-off details are not visible before truncation · ×1
  • Context/problem is thin and the consequences/trade-offs section is cut by the clip marker mid-decision body; trade-off details are not visible before truncation fastlane/metadata/android/en-US/changelogs/1253.txt — Add a Context section explaining when saving/loading to files causes rare crashes (e.g. concurrent event handling) and a Consequences section on how the RAM reduction will impact existing save/load behavior
D20 · ADR Quality · No context/problem statement; no explicit decision (only vague 'Minor CPU performance improvements'); consequences/trade-offs not present · ×1
  • No context/problem statement; no explicit decision (only vague 'Minor CPU performance improvements'); consequences/trade-offs not present fastlane/metadata/android/en-US/changelogs/1254.txt — Add the problem motivating this ADR (e.g. spectator-as-civ showing only civ units) and state the concrete decision (AI sets production focus for wonders/spaceship parts), then document the trade-offs of that change
D20 · ADR Quality · Only a patch list appears; no context/problem and no consequences/trade-offs are stated · ×1
  • Only a patch list appears; no context/problem and no consequences/trade-offs are stated fastlane/metadata/android/en-US/changelogs/1255.txt — State the specific minimap problems (e.g. flickering or occlusion) being fixed and document any consequences such as performance cost of recording turn submission
D20 · ADR Quality · The body is a list of unrelated patch notes (visual flash fix, tech-research discipline rule, time-to-first-pixels goal, war-against-multiple-civs AI decision, localization/stat suppression, luxury diversity) with no context/problem and no explicit decision/consequences · ×1
  • The body is a list of unrelated patch notes (visual flash fix, tech-research discipline rule, time-to-first-pixels goal, war-against-multiple-civs AI decision, localization/stat suppression, luxury diversity) with no context/problem and no explicit decision/consequences fastlane/metadata/android/en-US/changelogs/1257.txt — Convert the entries into an ADR: state the problem each entry addresses (e.g. 'Visual flash during city transitions is jarring'), document the explicit decision (e.g. 'Features cannot be removed for improvements unless a verified tech path exists') and its consequences
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only AI/retention fixes are listed with no rationale or impact · ×1
  • No context/problem and no consequences/trade-offs; only AI/retention fixes are listed with no rationale or impact fastlane/metadata/android/en-US/changelogs/1258.txt — Add a Context section explaining why the startup time was too long (e.g. loading screens, world generation) and a Consequences section on trade-offs like reduced immersion vs performance
D20 · ADR Quality · Decision is a vague 'Avoid ANRs from multiple sources' with no context/problem and no consequences; the body lists only fixes under By Angais/varchasgopalaswamy/SomeTroglodyte without any trade-offs · ×1
  • Decision is a vague 'Avoid ANRs from multiple sources' with no context/problem and no consequences; the body lists only fixes under By Angais/varchasgopalaswamy/SomeTroglodyte without any trade-offs fastlane/metadata/android/en-US/changelogs/1259.txt — State what ANR types are targeted (load crashes, neighbor adjacency bugs) and why they matter, then document each listed fix with its consequence/trade-off
D20 · ADR Quality · Context/problem is thin and the decision/consequences are each only one sentence; no trade-offs for the listed fixes · ×1
  • Context/problem is thin and the decision/consequences are each only one sentence; no trade-offs for the listed fixes fastlane/metadata/android/en-US/changelogs/1260.txt — Expand each fix with a clear problem statement and at least one consequence/trade-off (e.g. "clamping city-state count may limit flexibility for players who want more cities" or "glyph contrast loss is unavoidable when mipmaps are disabled")
D20 · ADR Quality · Context/problem is thin and the decisions are listed as 'By...' entries with no single decision statement; consequences/trade-offs are not present · ×1
  • Context/problem is thin and the decisions are listed as 'By...' entries with no single decision statement; consequences/trade-offs are not present fastlane/metadata/android/en-US/changelogs/1261.txt — State a clear problem (e.g. invisible units hidden from their own civ) and an explicit decision (e.g. visible units to their own civ, or new map selection behavior) before listing the By/fix contributors
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes with author names · ×1
  • No context/problem and no consequences/trade-offs; only a list of fixes with author names fastlane/metadata/android/en-US/changelogs/1262.txt — State the problem (e.g. crash on ID-from-clipboard when clipboard is empty) for each fix and document any consequences such as loss of auto-scroll or added complexity
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only a list of fixes with authors and some vague motivation ('Fix defensive pact count motivation clamp - By Angais') · ×1
  • No context/problem and no consequences/trade-offs; only a list of fixes with authors and some vague motivation ('Fix defensive pact count motivation clamp - By Angais') fastlane/metadata/android/en-US/changelogs/1263.txt — Add the problem motivating each fix (e.g. 'UI deselect order breaks the defensive pact count invariant') and document any consequences such as performance or compatibility impact
D20 · ADR Quality · No context/problem and no consequences; only a one-line title with two arbitrary cosmetic changes · ×1
  • No context/problem and no consequences; only a one-line title with two arbitrary cosmetic changes fastlane/metadata/android/en-US/changelogs/1264.txt — State the rendering-lag problem (e.g. screen-switching stutter) and the decision's motivation, plus any trade-offs such as loss of rename flexibility for non-base units
D20 · ADR Quality · This is a list of arbitrary decision stub entries with no context/problem and no consequences; each one is an incomplete decision note · ×1
  • This is a list of arbitrary decision stub entries with no context/problem and no consequences; each one is an incomplete decision note fastlane/metadata/android/en-US/changelogs/1265.txt — Convert the list into a single coherent ADR: state the problem (e.g. stale unit automation, displacement captures), document the explicit decision (movement logic for hidden units, only alive major civs for time victory), and detail consequences/trade-offs
D20 · ADR Quality · No context/problem statement; only two one-line priorities with no rationale or problem they solve · ×1
  • No context/problem statement; only two one-line priorities with no rationale or problem they solve fastlane/metadata/android/en-US/changelogs/1266.txt — Add a Context section explaining why the game crashes (F6) and what it breaks, then state each decision as an explicit Decision with its motivation
D20 · ADR Quality · No context/problem statement; each entry is a decision with no rationale or consequences · ×1
  • No context/problem statement; each entry is a decision with no rationale or consequences fastlane/metadata/android/en-US/changelogs/1268.txt — Add a Context section explaining what the ADR addresses (e.g. why numeric text formatting matters for gameplay) and a Consequences section noting trade-offs like added work for localization
D20 · ADR Quality · Only four short bullet points are listed; context/problem and consequences/trade-offs are absent (e.g. why overflow science matters, what snapping granularity is acceptable) · ×1
  • Only four short bullet points are listed; context/problem and consequences/trade-offs are absent (e.g. why overflow science matters, what snapping granularity is acceptable) fastlane/metadata/android/en-US/changelogs/1269.txt — Add a Context section explaining the Overflow/loss-of-science problem and a Consequences section on trade-offs like increased game complexity for overflow handling
D20 · ADR Quality · No context/problem and no consequences; only a list of UI/feature additions with no rationale or trade-offs · ×1
  • No context/problem and no consequences; only a list of UI/feature additions with no rationale or trade-offs fastlane/metadata/android/en-US/changelogs/1270.txt — Add the problem motivating each change (e.g. 'Players find it frustrating to hit the collapse arrow') and document any consequences such as increased complexity or loss of flexibility
D20 · ADR Quality · Only the decision and four listed fixes are present; no context/problem and consequences/trade-offs for any change · ×1
  • Only the decision and four listed fixes are present; no context/problem and consequences/trade-offs for any change fastlane/metadata/android/en-US/changelogs/1272.txt — Add a Context section explaining why each fix is needed (e.g. 'Random map generation now generates land-only after custom mode to avoid unintended terrain') and a Consequences section noting trade-offs such as increased runtime or new bugs from the changes
D20 · ADR Quality · Decision is a list of two unrelated tasks with no context/problem and no consequences; title is uninformative · ×1
  • Decision is a list of two unrelated tasks with no context/problem and no consequences; title is uninformative fastlane/metadata/android/en-US/changelogs/1274.txt — Add a Context section explaining why city status layout ordering matters (e.g. player decision-making) and a Consequences section on trade-offs such as breaking existing workflows
D20 · ADR Quality · No context/problem and no consequences/trade-offs; only the decision (fixes) are present · ×1
  • No context/problem and no consequences/trade-offs; only the decision (fixes) are present fastlane/metadata/android/en-US/changelogs/1275.txt — Add a Context section explaining why each fix matters (e.g. 'the leave mapeditor popup should not cancel without warning') and a Consequences section noting any new trade-offs
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
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
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:416 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:416-545 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:548-605 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:608-653 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:656-697 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:705-750 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:786-831 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:834-951 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:954-1087 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1090-1143 — These 9 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 9 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 9 times.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:224 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:224-238 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:315-330 — 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 (10–16 lines × 2) · ×1
  • Duplicated block (10–16 lines × 2) core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorOdImporter.kt:86 — core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorOdImporter.kt:86-95 | core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorWesnothImporter.kt:89-104 — 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 `core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorOdImporter.kt:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:181 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:181-188 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:222-229 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:313-321 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:311` calls `getCivilizationOrNull` and `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:180` 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–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) core/src/com/unciv/logic/civilization/Civilization.kt:659 — core/src/com/unciv/logic/civilization/Civilization.kt:659-665 | core/src/com/unciv/logic/civilization/Civilization.kt:684-691 — 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 `core/src/com/unciv/logic/civilization/Civilization.kt:659` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:292 — core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:292-298 | core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:301-307 | core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:310-316 — 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 `core/src/com/unciv/logic/map/mapgenerator/mapregions/MapRegions.kt:292` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:257 — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:257-274 | core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:345-362 — 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 `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:277` calls `getCivilizationOrNull` and `core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:365` 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 (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) core/src/com/unciv/logic/map/MapPathing.kt:90 — core/src/com/unciv/logic/map/MapPathing.kt:90-105 | core/src/com/unciv/logic/map/MapPathing.kt:124-140 — 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 `core/src/com/unciv/logic/map/MapPathing.kt:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:101 — core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:101-105 | core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:162-166 | core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:189-193 — 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 `core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:101` 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 (72 lines × 3) · ×1
  • Duplicated block (72 lines × 3) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:426 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:426-497 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:844-915 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:964-1035 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:621 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:621-630 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:665-674 — 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 (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:802 — core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:802-808 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:922-928 | core/src/com/unciv/ui/screens/basescreen/TextureArraySpriteBatch.java:1112-1120 — 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.
P5 · DR & Backup · No DR/backup evidence · ×1
  • No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) desktop/src/com/unciv/app/desktop/SystemUtils.kt:80 — The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`).
X27 · Collection changed while being enumerated · Collection is structurally changed while it is being enumerated · ×1
  • Collection is structurally changed while it is being enumerated core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt:238 — `gameDetails.keys` is a live view over `gameDetails` and shares its modification count; it is walked by the loop on line 238, and line 240 calls `gameDetails.remove` on `gameDetails` inside the loop body — a structural change to a `LinkedHashMap`. The loop's hidden iterator is fail-fast, so its next `next()` throws `ConcurrentModificationException`: every pass that reaches this call ends the loop by exception instead of by running out of elements, and the remaining elements are never seen.
Minor — 84 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×32
  • Orphaned file core/src/com/unciv/ui/components/widgets/ZoomableScrollPane.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/apiv2/ResponseStructs.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/apiv2/WebSocketStructs.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/chat/ChatWebSocket.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/apiv2/ApiV2Wrapper.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/storage/DropBox.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/event/EventBus.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/ApiVersion.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file buildSrc/src/main/kotlin/AndroidImagePacker.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/models/skins/SkinStrings.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/apiv2/JsonSerializers.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/pickerscreens/PickerPane.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/components/ZoomGestureListener.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/worldscreen/status/MultiplayerStatusButton.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/chat/ChatStore.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/components/extensions/FormattingExtensions.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/models/ruleset/validation/TextSimilarity.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/storage/UncivServerFileStorage.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/models/skins/SkinCache.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/multiplayerscreens/EditFriendScreen.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file desktop/src/com/unciv/app/desktop/CreateGameFromSettings.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/logic/multiplayer/storage/ApiV2FileStorageEmulator.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/multiplayerscreens/ViewFriendsListScreen.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/multiplayerscreens/AddFriendScreen.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/com/unciv/ui/screens/worldscreen/chat/ChatButton.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 7 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate core/src/com/unciv/models/ruleset/Building.kt:476 — `!it.isPuppet && !it.cityConstructions.containsBuildingOrEquivalent(building)` appears character-identically in 2 files — core/src/com/unciv/models/ruleset/Building.kt, core/src/com/unciv/models/ruleset/unit/BaseUnit.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 core/src/com/unciv/logic/map/AStar.kt:116 — `!tilesReached.containsKey(destination) && !hasEnded()` appears character-identically in 2 files — core/src/com/unciv/logic/map/AStar.kt, core/src/com/unciv/logic/map/BFS.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 core/src/com/unciv/logic/civilization/managers/PolicyManager.kt:268 — `!unique.isTriggerable || unique.hasTriggerConditional() || !unique.conditionalsApply(civInfo.state)` appears character-identically in 2 files — core/src/com/unciv/logic/civilization/managers/PolicyManager.kt, core/src/com/unciv/logic/civilization/managers/TechManager.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 core/src/com/unciv/logic/battle/Battle.kt:388 — `attacker.isRanged() && !attacker.isAirUnit()` appears character-identically in 2 files — core/src/com/unciv/logic/battle/Battle.kt, core/src/com/unciv/logic/battle/BattleDamage.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 core/src/com/unciv/logic/automation/Automation.kt:144 — `city.isWeLoveTheKingDayActive() && city.civ.getHappiness() >= 0` appears character-identically in 2 files — core/src/com/unciv/logic/automation/Automation.kt, core/src/com/unciv/logic/city/CityStats.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 core/src/com/unciv/logic/battle/BattleDamage.kt:108 — `civInfo.cities.isEmpty() || civInfo.getCapital() == null` appears character-identically in 4 files — core/src/com/unciv/logic/battle/BattleDamage.kt, core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt, core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt, core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.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 core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt:188 — `civInfo.cities.isEmpty() || otherCiv.cities.isEmpty()` appears character-identically in 2 files — core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.kt, core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.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 core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt:529 — `civInfo.isAI() || UncivGame.Current.worldScreen?.autoPlay?.isAutoPlayingAndFullAutoPlayAI() == true` appears character-identically in 2 files — core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.kt, core/src/com/unciv/ui/components/MayaCalendar.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 core/src/com/unciv/logic/civilization/diplomacy/DiplomacyFunctions.kt:42 — `civInfo.isCityState && otherCiv.isMajorCiv()` appears character-identically in 2 files — core/src/com/unciv/logic/civilization/diplomacy/DiplomacyFunctions.kt, core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.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 core/src/com/unciv/ui/objectdescriptions/DescriptionHelpers.kt:53 — `colorConsumesResources && unique.type == UniqueType.ConsumesResources` appears character-identically in 2 files — core/src/com/unciv/ui/objectdescriptions/DescriptionHelpers.kt, core/src/com/unciv/ui/objectdescriptions/FormattedLineListBuilder.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 core/src/com/unciv/ui/popups/CityScreenConstructionMenu.kt:97 — `construction is Building && construction.hasCreateOneImprovementUnique()` appears character-identically in 2 files — core/src/com/unciv/ui/popups/CityScreenConstructionMenu.kt, core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.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 core/src/com/unciv/logic/city/CityConstructions.kt:556 — `construction is Building && construction.isWonder` appears character-identically in 2 files — core/src/com/unciv/logic/city/CityConstructions.kt, core/src/com/unciv/logic/city/managers/CityTurnManager.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 core/src/com/unciv/logic/automation/civilization/DeclareWarPlanEvaluator.kt:161 — `diploManager.hasFlag(DiplomacyFlags.WaryOf) && diploManager.getFlag(DiplomacyFlags.WaryOf) < 0` appears character-identically in 2 files — core/src/com/unciv/logic/automation/civilization/DeclareWarPlanEvaluator.kt, core/src/com/unciv/logic/automation/unit/UnitAutomation.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 core/src/com/unciv/ui/screens/multiplayerscreens/AddFriendScreen.kt:56 — `friendNameTextField.text.isEmpty() && friend.name.isNotEmpty()` appears character-identically in 2 files — core/src/com/unciv/ui/screens/multiplayerscreens/AddFriendScreen.kt, core/src/com/unciv/ui/screens/multiplayerscreens/EditFriendScreen.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 core/src/com/unciv/ui/images/AtlasPreview.kt:110 — `innerException.cause != null && innerException.cause !== innerException` appears character-identically in 2 files — core/src/com/unciv/ui/images/AtlasPreview.kt, desktop/src/com/unciv/app/desktop/ImagePacker.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 core/src/com/unciv/logic/map/tile/TileNormalizer.kt:41 — `it == tile.baseTerrain || tile.terrainFeatures.contains(it)` appears character-identically in 2 files — core/src/com/unciv/logic/map/tile/TileNormalizer.kt, core/src/com/unciv/models/ruleset/unique/UniqueTriggerActivation.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 core/src/com/unciv/models/ruleset/Building.kt:463 — `it.cityConstructions.containsBuildingOrEquivalent(building) && it.matchesFilter(cityFilter)` appears character-identically in 2 files — core/src/com/unciv/models/ruleset/Building.kt, core/src/com/unciv/models/ruleset/unit/BaseUnit.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 core/src/com/unciv/logic/city/City.kt:747 — `it.getModifiers(trigger).any(triggerFilter) && it.conditionalsApply(gameContext)` appears character-identically in 2 files — core/src/com/unciv/logic/city/City.kt, core/src/com/unciv/logic/civilization/Civilization.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 core/src/com/unciv/logic/automation/civilization/ThreatManager.kt:144 — `it.isCityCenter() && it.getCity()!!.owningCiv().isAtWarWith(civ)` appears character-identically in 2 files — core/src/com/unciv/logic/automation/civilization/ThreatManager.kt, core/src/com/unciv/logic/automation/unit/UnitAutomation.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 core/src/com/unciv/logic/GameStarter.kt:258 — `it.isMajorCiv && !it.hasUnique(UniqueType.WillNotBeChosenForNewGames)` appears character-identically in 2 files — core/src/com/unciv/logic/GameStarter.kt, core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.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 core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:329 — `it.religionManager.religion != null && it.religionManager.religionState >= ReligionState.Religion` appears character-identically in 2 files — core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt, core/src/com/unciv/logic/civilization/managers/ReligionManager.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 core/src/com/unciv/logic/automation/civilization/TradeAutomation.kt:111 — `it.type == TradeOfferType.Luxury_Resource || it.type == TradeOfferType.Strategic_Resource` appears character-identically in 2 files — core/src/com/unciv/logic/automation/civilization/TradeAutomation.kt, core/src/com/unciv/logic/civilization/diplomacy/DiplomacyTurnManager.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 core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt:494 — `it.type == beliefType || beliefType == BeliefType.Any` appears character-identically in 2 files — core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt, core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.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 core/src/com/unciv/models/metadata/OverviewPersistableData.kt:44 — `jsonData.isObject && jsonData.notEmpty()` appears character-identically in 2 files — core/src/com/unciv/models/metadata/OverviewPersistableData.kt, core/src/com/unciv/ui/components/input/KeyboardBindings.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 core/src/com/unciv/models/ruleset/Belief.kt:32 — `matchesSingleFilter(filter, state) || state != null && hasTagUnique(filter, state) || state == null && hasTagUnique(filter)` appears character-identically in 2 files — core/src/com/unciv/models/ruleset/Belief.kt, core/src/com/unciv/models/ruleset/tech/Technology.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.
M4 · Documentation accuracy · README/code drift · ×10
  • README/code drift docs/Developers/Testing-AI-changes.md:18 — docs/Developers/Testing-AI-changes.md names `desktop\src\ConsoleLauncher.kt`, but no file or folder `desktop/src/ConsoleLauncher.kt` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:107 — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `See`, but `docs/Modders/Mod-file-structure/See` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:109 — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Personalities`, but `docs/Modders/Mod-file-structure/Personalities` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md:128 — docs/Modders/Mod-file-structure/2-Civilization-related-JSON-files.md links to `Similar`, but `docs/Modders/Mod-file-structure/Similar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:32 — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `If`, but `docs/Modders/Mod-file-structure/If` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:79 — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `Special`, but `docs/Modders/Mod-file-structure/Special` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:80 — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `Improvements`, but `docs/Modders/Mod-file-structure/Improvements` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:82 — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `They`, but `docs/Modders/Mod-file-structure/They` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md:127 — docs/Modders/Mod-file-structure/3-Map-related-JSON-files.md links to `The`, but `docs/Modders/Mod-file-structure/The` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/Modders/Mod-file-structure/5-Miscellaneous-JSON-files.md:74 — docs/Modders/Mod-file-structure/5-Miscellaneous-JSON-files.md links to `Successfully`, but `docs/Modders/Mod-file-structure/Successfully` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 55 significant file(s) lose their only recent owner: core/src/com/unciv/models/ruleset/unique/DeprecatedUniques.kt, core/src/com/unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt, core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorScreen.kt, core/src/com/unciv/ui/components/tilegroups/layers/TileLayerTerrain.kt, core/src/com/unciv/view/MapUnitView.kt, core/src/com/unciv/view/CityView.kt, core/src/com/unciv/ui/components/tilegroups/TileGroupMap.kt, core/src/com/unciv/ui/screens/newgamescreen/NationPickerPopup.kt (+47 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 20 significant file(s) lose their only recent owner: core/src/com/unciv/ui/screens/civilopediascreen/FormattedLine.kt, core/src/com/unciv/logic/civilization/managers/quests/QuestImplementation.kt, core/src/com/unciv/ui/components/widgets/UncivTextField.kt, core/src/com/unciv/logic/files/IMediaFinder.kt, core/src/com/unciv/ui/screens/basescreen/StageMouseOverDebug.kt, core/src/com/unciv/logic/civilization/managers/quests/QuestTargetHelpers.kt, android/src/com/unciv/app/AndroidLogBackend.kt, core/src/com/unciv/logic/map/CarrierSlotMatcher.kt (+12 more). Pair on, review, or document these before any departure.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch desktop/src/com/unciv/app/desktop/SystemUtils.kt:93 — `getWinVer` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch desktop/src/com/unciv/app/desktop/SystemUtils.kt:113 — `getLinuxDistro` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (83 single-owned of 543 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 543 of the 711 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: core/src/com/unciv/logic/battle/AttackRecorder.kt, core/src/com/unciv/logic/battle/AttackEvent.kt, core/src/com/unciv/logic/map/pathingmap/FixedPointMovement.kt, core/src/com/unciv/logic/map/mapgenerator/mapregions/MapGenTileData.kt, core/src/com/unciv/logic/multiplayer/chat/ChatWebSocket.kt, core/src/com/unciv/ui/screens/mapeditorscreen/tabs/MapEditorModsTab.kt, core/src/com/unciv/ui/screens/modmanager/ModDecoratedButton.kt, core/src/com/unciv/ui/components/fonts/ModFonts.kt.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 6.0/10. The most over is `core` (120348 LoC, 3653 module-visible types across 91 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 32 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: core/src/com/unciv/ui/components/widgets/ZoomableScrollPane.kt, core/src/com/unciv/logic/multiplayer/apiv2/ResponseStructs.kt, core/src/com/unciv/logic/multiplayer/apiv2/WebSocketStructs.kt, core/src/com/unciv/logic/multiplayer/chat/ChatWebSocket.kt, core/src/com/unciv/logic/multiplayer/apiv2/ApiV2Wrapper.kt, core/src/com/unciv/logic/multiplayer/storage/DropBox.kt, core/src/com/unciv/logic/event/EventBus.kt, core/src/com/unciv/logic/multiplayer/ApiVersion.kt (and 24 more) (33 orphaned of 543 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 543 of the 711 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D7 · Architectural Integrity · Checkable ADR rule enforced only by prose · ×1
  • Checkable ADR rule enforced only by prose: 1112 fastlane/metadata/android/en-US/changelogs/1112.txt — ADR '1112' declares `enforcement: prose` but states a rule a test or analyzer can check: "Warn against Resource uniques cannot use countables that depend on citywide resources" Nothing in the build fails when the code breaks it — add an architecture test or analyzer (and `enforcement: test|analyzer` with an `enforcement_link`).
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 31899 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.
P4 · Deployment & Rollback · No rollback/health safety · ×1
  • No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
X5 · Nullable reference types · Not-null assertions (`!!`) reduce the null safety score · ×1
  • Not-null assertions (`!!`) reduce the null safety score — ~10.6 `!!` not-null assertions per 1k Kotlin product lines — 1499 across the 141261 line(s) of the 702 Kotlin file(s) read (generated, test and sample code not counted). Densest: core/src/com/unciv/logic/simulation/Simulation.kt (82), core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt (40), core/src/com/unciv/logic/automation/civilization/DiplomacyAutomation.kt (37). Each one tells the compiler to trust the author about null and becomes a `NullPointerException` the first time the author is wrong.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e8a1773907554742aea5237d0c6b59b4/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e8a1773907554742aea5237d0c6b59b4/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .98artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/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 51 file(s) — `core/src/com/unciv/logic/civilization/Civilization.kt`, `core/src/com/unciv/logic/civilization/diplomacy/CityStateFunctions.kt`, `core/src/com/unciv/logic/github/GithubAPI.kt`, `core/src/com/unciv/logic/map/HexMath.kt`, `core/src/com/unciv/logic/map/mapgenerator/MapGenerationRandomness.kt`, … (+46 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 Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).0—

Run 01a16f66-b0e2-73c9-985a-9e28293eb71f · 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