Public report of moreSwift/swift-cross-ui, published 29 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 reportMeasured 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, 29 October 2026, 11:06 UTC Β· Survey ID cd_d4c55ae6bbd441dfa8eccf3873f0848f
moreSwift/swift-cross-ui
Measured 29 October 2026, 11:02 UTC, at code version 0f3ec39
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 scoreWeak
CriticalWeakAdequateStrongExemplary
Up 1 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 medium codebase: 60,539 lines of product code in 22 projects, tests not counted Β· Estimated rebuild effort: about 0.4 person-years Β· Weakest lens: Production Readiness, 35
Findings by how serious they are
39 critical382 serious24 minor
18 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
29 October 2026, 11:02 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 βΈ
62of 62 dimensions measured by tools.
425of 445 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
62dimensions across 6 lenses, read from 60,539 lines of product code in 22 projects.
moreSwift/swift-cross-ui falls short of our standard for a preview release because its Testing dimensions are rated Critical, and we found no automated security scanning of the code, its secrets or its dependencies. It scores 53 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.
Production Readiness, at 35, is the weakest lens and counts most in the score. The best first step is rebalancing the test suite towards unit tests, worth about 16 points. Making the 18 tests that check nothing check their results comes next, worth about 14 points. Raising Production Readiness to 62 would lift the score to about 65.
Thirty-five pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two pipeline steps run downloads nobody checks, and one pipeline step puts outside input straight into a shell command, so an attacker can run commands in the build pipeline. Pinning each tool to an exact version, checking each download against a checksum and passing outside input through environment variables would close these risks. The unsafe setting in infrastructure or container files needs changing to safe values.
The product code is 60,539 lines, about β¬60,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
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: 2 findings
These 2 critical or serious findings were in the previous survey, on 15 October 2026, and are gone from this one.
β¬20,000 to β¬100,000, for 333 to 1,057 hours of work, about 0.4 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 60,539 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: 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 1 Inverted test pyramid finding(s) in Test Distribution.
Raises the score by about 16 points Β· Low effort Β· Test Distribution
2
Resolve the 18 No assertions finding(s) in Test Quality β start with EntryMacroTests.swift (7), ObservableObjectMacroTests.swift (7), StackContextRendersDifferently.swift (3).
Raises the score by about 14 points Β· Medium effort Β· Test Quality
3
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 4 points Β· Low effort Β· ADR Quality
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 β¬60,000 to build again, about 0.4 person-years of work. Its weakest lens is Production Readiness, at 35 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first Β· First action
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution. Of all the actions in this report, it raises the score most for the work it takes: about 16 points for low effort, because it clears the 1 Test Distribution findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture β module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
35 modules, with 102 dependencies between them. 3 loops run through 20 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Gtk3Backend uses WinUIBackend, so a change to WinUIBackend can break Gtk3Backend, while a change to Gtk3Backend can't break WinUIBackend.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13β27 Gtk3Backend uses SwiftCrossUIpart of a loop✕
Connections
26 pairs of types, where a type in Gtk3Backend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
1 pair of types, where a type in dev.swiftcrossui.androidbackend.activityresults uses a type in dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract.
dev.swiftcrossui.androidbackend.activityresults uses dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract, so a change to dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract can break dev.swiftcrossui.androidbackend.activityresults, while a change to dev.swiftcrossui.androidbackend.activityresults can't break dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract.
Position
Below the diagonal: dev.swiftcrossui.androidbackend.activityresults uses a module listed above it, which is the healthy direction.
17β21 dev.swiftcrossui.androidbackend.activityresults uses dev.swiftcrossui.androidbackendpart of a loop✕
Connections
2 pairs of types, where a type in dev.swiftcrossui.androidbackend.activityresults uses a type in dev.swiftcrossui.androidbackend.
dev.swiftcrossui.androidbackend.activityresults uses dev.swiftcrossui.androidbackend, so a change to dev.swiftcrossui.androidbackend can break dev.swiftcrossui.androidbackend.activityresults, while a change to dev.swiftcrossui.androidbackend.activityresults can't break dev.swiftcrossui.androidbackend.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18β23 dev.swiftcrossui.androidbackend.datepickers.DateButton uses dev.swiftcrossui.androidbackend.datepickerspart of a loop✕
Connections
1 pair of types, where a type in dev.swiftcrossui.androidbackend.datepickers.DateButton uses a type in dev.swiftcrossui.androidbackend.datepickers.
dev.swiftcrossui.androidbackend.datepickers.DateButton uses dev.swiftcrossui.androidbackend.datepickers, so a change to dev.swiftcrossui.androidbackend.datepickers can break dev.swiftcrossui.androidbackend.datepickers.DateButton, while a change to dev.swiftcrossui.androidbackend.datepickers.DateButton can't break dev.swiftcrossui.androidbackend.datepickers.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19β23 dev.swiftcrossui.androidbackend.datepickers.TimeButton uses dev.swiftcrossui.androidbackend.datepickerspart of a loop✕
Connections
1 pair of types, where a type in dev.swiftcrossui.androidbackend.datepickers.TimeButton uses a type in dev.swiftcrossui.androidbackend.datepickers.
dev.swiftcrossui.androidbackend.datepickers.TimeButton uses dev.swiftcrossui.androidbackend.datepickers, so a change to dev.swiftcrossui.androidbackend.datepickers can break dev.swiftcrossui.androidbackend.datepickers.TimeButton, while a change to dev.swiftcrossui.androidbackend.datepickers.TimeButton can't break dev.swiftcrossui.androidbackend.datepickers.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
GtkBackend uses WinUIBackend, so a change to WinUIBackend can break GtkBackend, while a change to GtkBackend can't break WinUIBackend.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20β27 GtkBackend uses SwiftCrossUIpart of a loop✕
Connections
31 pairs of types, where a type in GtkBackend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dev.swiftcrossui.androidbackend uses dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract, so a change to dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract can break dev.swiftcrossui.androidbackend, while a change to dev.swiftcrossui.androidbackend can't break dev.swiftcrossui.androidbackend.activityresults.FilesActivityContract.
Position
Below the diagonal: dev.swiftcrossui.androidbackend uses a module listed above it, which is the healthy direction.
dev.swiftcrossui.androidbackend uses dev.swiftcrossui.androidbackend.activityresults, so a change to dev.swiftcrossui.androidbackend.activityresults can break dev.swiftcrossui.androidbackend, while a change to dev.swiftcrossui.androidbackend can't break dev.swiftcrossui.androidbackend.activityresults.
Position
Below the diagonal: dev.swiftcrossui.androidbackend uses a module listed above it, which is the healthy direction.
WinUIBackend uses AppKitBackend, so a change to AppKitBackend can break WinUIBackend, while a change to WinUIBackend can't break AppKitBackend.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22β27 WinUIBackend uses SwiftCrossUIpart of a loop✕
Connections
34 pairs of types, where a type in WinUIBackend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dev.swiftcrossui.androidbackend.datepickers uses dev.swiftcrossui.androidbackend.datepickers.DateButton, so a change to dev.swiftcrossui.androidbackend.datepickers.DateButton can break dev.swiftcrossui.androidbackend.datepickers, while a change to dev.swiftcrossui.androidbackend.datepickers can't break dev.swiftcrossui.androidbackend.datepickers.DateButton.
Position
Below the diagonal: dev.swiftcrossui.androidbackend.datepickers uses a module listed above it, which is the healthy direction.
dev.swiftcrossui.androidbackend.datepickers uses dev.swiftcrossui.androidbackend.datepickers.TimeButton, so a change to dev.swiftcrossui.androidbackend.datepickers.TimeButton can break dev.swiftcrossui.androidbackend.datepickers, while a change to dev.swiftcrossui.androidbackend.datepickers can't break dev.swiftcrossui.androidbackend.datepickers.TimeButton.
Position
Below the diagonal: dev.swiftcrossui.androidbackend.datepickers uses a module listed above it, which is the healthy direction.
dev.swiftcrossui.androidbackend.datepickers uses dev.swiftcrossui.androidbackend, so a change to dev.swiftcrossui.androidbackend can break dev.swiftcrossui.androidbackend.datepickers, while a change to dev.swiftcrossui.androidbackend.datepickers can't break dev.swiftcrossui.androidbackend.
Position
Below the diagonal: dev.swiftcrossui.androidbackend.datepickers uses a module listed above it, which is the healthy direction.
dev.swiftcrossui.androidbackend.lists uses dev.swiftcrossui.androidbackend, so a change to dev.swiftcrossui.androidbackend can break dev.swiftcrossui.androidbackend.lists, while a change to dev.swiftcrossui.androidbackend.lists can't break dev.swiftcrossui.androidbackend.
Position
Below the diagonal: dev.swiftcrossui.androidbackend.lists uses a module listed above it, which is the healthy direction.
UIKitBackend uses _SwiftCrossUIPortingKit, so a change to _SwiftCrossUIPortingKit can break UIKitBackend, while a change to UIKitBackend can't break _SwiftCrossUIPortingKit.
Position
Below the diagonal: UIKitBackend uses a module listed above it, which is the healthy direction.
UIKitBackend uses WinUIBackend, so a change to WinUIBackend can break UIKitBackend, while a change to UIKitBackend can't break WinUIBackend.
Position
Below the diagonal: UIKitBackend uses a module listed above it, which is the healthy direction.
25β27 UIKitBackend uses SwiftCrossUIpart of a loop✕
Connections
65 pairs of types, where a type in UIKitBackend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
AppKitBackend uses UIKitBackend, so a change to UIKitBackend can break AppKitBackend, while a change to AppKitBackend can't break UIKitBackend.
Position
Below the diagonal: AppKitBackend uses a module listed above it, which is the healthy direction.
26β27 AppKitBackend uses SwiftCrossUIpart of a loop✕
Connections
43 pairs of types, where a type in AppKitBackend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
AppKitBackend uses APITool~APITool, so a change to APITool~APITool can break AppKitBackend, while a change to AppKitBackend can't break APITool~APITool.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftCrossUI uses _SwiftCrossUIPortingKit, so a change to _SwiftCrossUIPortingKit can break SwiftCrossUI, while a change to SwiftCrossUI can't break _SwiftCrossUIPortingKit.
Position
Below the diagonal: SwiftCrossUI uses a module listed above it, which is the healthy direction.
SwiftCrossUI uses AppKitBackend, so a change to AppKitBackend can break SwiftCrossUI, while a change to SwiftCrossUI can't break AppKitBackend.
Position
Below the diagonal: SwiftCrossUI uses a module listed above it, which is the healthy direction.
27β28 SwiftCrossUI uses LVGLBackendpart of a loop✕
Connections
69 pairs of types, where a type in SwiftCrossUI uses a type in LVGLBackend. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftCrossUI uses Gtk, so a change to Gtk can break SwiftCrossUI, while a change to SwiftCrossUI can't break Gtk.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27β31 SwiftCrossUI uses AndroidBackendpart of a loop✕
Connections
92 pairs of types, where a type in SwiftCrossUI uses a type in AndroidBackend. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
31 pairs of types, where a type in Gtk3 uses a type in AndroidBackend. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
45 pairs of types, where a type in Gtk uses a type in AndroidBackend. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
46 pairs of types, where a type in AndroidBackend uses a type in SwiftCrossUI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
AndroidBackend uses APITool~APITool, so a change to APITool~APITool can break AndroidBackend, while a change to AndroidBackend can't break APITool~APITool.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftCrossUIMacrosPlugin uses AndroidBackend, so a change to AndroidBackend can break SwiftCrossUIMacrosPlugin, while a change to SwiftCrossUIMacrosPlugin can't break AndroidBackend.
Position
Below the diagonal: SwiftCrossUIMacrosPlugin uses a module listed above it, which is the healthy direction.
APITool~APITool uses AndroidBackend, so a change to AndroidBackend can break APITool~APITool, while a change to APITool~APITool can't break AndroidBackend.
Position
Below the diagonal: APITool~APITool uses a module listed above it, which is the healthy direction.
APITool~APITool uses SwiftCrossUIMacrosPlugin, so a change to SwiftCrossUIMacrosPlugin can break APITool~APITool, while a change to APITool~APITool can't break SwiftCrossUIMacrosPlugin.
Position
Below the diagonal: APITool~APITool uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 β Injection
39
High / Critical
A03:2025 β Software Supply Chain Failures
8
Medium
A02:2025 β Security Misconfiguration
3
High / Critical
Roadmap
Begin by addressing the inverted test pyramid in Test Distribution and resolving the 18 missing assertions in Test Quality, prioritizing EntryMacroTests.swift, ObservableObjectMacroTests.swift, and StackContextRendersDifferently.swift. Next, integrate a SAST step into the CI pipeline using CodeQL or semgrep to ensure security regressions fail the build immediately. Finally, establish a baseline for architectural governance by creating an Architecture Decision Record and documenting significant design decisions in a dedicated folder.
Ranked by impact Γ· effort. "Helps" is the estimated gain on the 0β100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution.
Resolve the 18 No assertions finding(s) in Test Quality β start with EntryMacroTests.swift (7), ObservableObjectMacroTests.swift (7), StackContextRendersDifferently.swift (3).
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β or `semgrep --config=auto`, which runs on any language β so a security regression fails the build instead of landing.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Resolve the 6 REDACTED finding(s) charged to Static Analysis (SAST) β the other 29 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.
Per-file score 0β10 β a quality signature. Of 181 files carrying findings, judged against the Preview bar: 1% slop Β· 23% mixed Β· 76% near-clean.
File
Score
Band
Worst signal
REDACTED
1.3
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
4.1
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.8
Mixed
Static Analysis (SAST): High: REDACTED
Sources/Gtk3Backend/Gtk3Backend.swift
4.8
Mixed
God Classes: TooManyMethods: Gtk3Backend
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.8
Mixed
Static Analysis (SAST): High: REDACTED
Sources/DummyBackend/DummyBackend.swift
5.9
Mixed
God Classes: TooManyMethods: DummyBackend
Sources/WinUIBackend/WinUIBackend.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/GtkCodeGen/GtkCodeGen.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/SwiftCrossUI/Views/ScrollView.swift
6.0
Mixed
Explicit Debt: TodoComment
APITool/Sources/APITool/Analyzer.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/SwiftCrossUI/Views/ForEach.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/UIKitBackend/UIKitBackend.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/AndroidBackend/AndroidBackend.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/SwiftCrossUI/Layout/LayoutSystem.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/SwiftCrossUI/Views/EitherView.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/Gtk3Backend/Features/Core.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/SwiftCrossUI/Views/VStack.swift
6.0
Mixed
Explicit Debt: TodoComment
Sources/LVGLBackend/LVGLBackend.swift
6.0
Mixed
Explicit 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 β 39
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 β 382
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 β 24
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved β 18
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. 62 of 62 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 β 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
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality β in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report β three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line β never an absolute scratch path. Here, 425 of 445 do; the remainder are repo-wide signals β a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it β Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled Β· advisory β not a narrative.
Does re-running give the same result? Run it again on the same commit and the score β and this report, byte for byte β is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) β re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time β a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage β not measured this run β 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: the Swift half could not be measured β the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and 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 (.swift) and this repository declares a SwiftPM test suite (swift-cross-ui), but it was not re-run: no test result was produced. Not scored β this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance β 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. 2 of this repository's SwiftPM dependencies could not be fetched at a pinned revision and are repositories api.deps.dev has not indexed, so their licences were not read and the verdict does not cover them: androidkit, swift-java.
D21 Naming 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. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run β this says nothing about whether its names are consistent.
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's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value β 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach β not a finding about this repository.
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.
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. `Examples/Sources/AdvancedCustomizationExample/AdvancedCustomizationApp.swift`, `Examples/Sources/ColorsExample/ColorsApp.swift`, `Examples/Sources/ControlsExample/ControlsApp.swift`, `Examples/Sources/CounterExample/CounterApp.swift`, `Examples/Sources/ForEachExample/ForEachApp.swift`, β¦ (+101 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.
D44 Platform End-of-Life β 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported β a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
AX6 Interface segregation β 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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 REDACTED (REDACTED). the image ran but published no HTTP port β nothing to crawl (EXPOSE the web port to unlock runtime evidence).
C1 Data Protection β 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 personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β not a finding that the repository lacks personal data controls.
C2 Access Controls β not measured this run β 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.
C3 Audit Trail β 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 audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach β not a finding that the repository lacks audit controls.
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 Kotlin, Swift, c, cpp 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Kotlin, Swift, c, cpp is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy β measured, with a gap in what it reached β 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup β not measured this run β This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found β and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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.
X2 Cancellation propagation β 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, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped β 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, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored β auditable in any diff, honored by GitHub the same way.
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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals β a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural β it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles β a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree β a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy β mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history β a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension β pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual β undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded β it is never the team's dead code to delete.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project β a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns β a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) β it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases β a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules β it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension β code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS β files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen β a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention β a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
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".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is β methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
9 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was WinUIBackend.applyActions at 29. A further 5 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 AndroidBackend.getCurrentCalendarAndLocale at 20 β 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: Sources/AndroidBackend/AndroidBackend+Locale.swift (AndroidBackend.getCurrentCalendarAndLocale at 20), Sources/Gtk3Backend/Features/Colors.swift (Gtk3Backend.resolveAdaptiveColor at 19), Sources/GtkBackend/Features/Colors.swift (GtkBackend.resolveAdaptiveColor at 19), Sources/WinUIBackend/WinUIBackend+Color.swift (WinUIBackend.resolveAdaptiveColor at 19). 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.
+ 4 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Bring the 9 bodies over 15 down to 15 or less in Cyclomatic Complexity β start with WinUIBackend.applyActions (cyclomatic 29), GtkCodeGen.generateClass (cyclomatic 24), Locale.windowsCurrent (cyclomatic 20). β 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 9 together lifts Cyclomatic Complexity from 8.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
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.
+ 17 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 30 down to 30 or less in Cognitive Complexity β start with WinUIBackend.applyActions (cognitive 53), WinUIBackend.updatePicker (cognitive 35), GtkCodeGen.generateClass (cognitive 32). β 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 Cognitive Complexity from 6.9 to about 7.5/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
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.
Do you agree with this assessment?
D3 Β· God Classes9.0 / 10Stronggated by 17 serious findingsβ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 8 TooManyMethods finding(s) in God Classes β start with AppKitBackend.swift, GtkBackend.swift, UIKitBackend.swift. β One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 MethodTooLong finding(s) in God Classes β start with RoundedRectangle.swift, WinUIBackend.swift, WindowReference.swift. β One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 ClassTooLong finding(s) in God Classes β start with WinUIBackend.swift, GtkCodeGen.swift, LayoutSystem.swift. β One of this dimension's main actionable groups (3 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). β Hardens enforcement from Documented toward Prevented β provenance only; does not change the score.
Detailed fixes: d3_recommendation.md Β· top locations in Appendix A, every location in findings.md.
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.
137 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 141 are in trees this repository does not ship β vendored, example/demo, project-template, fixture and benchmark code β and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 54 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Duplicated block (11 lines × 2) finding(s) in Code Duplication β start with main.swift (2), Sheets.swift, SplitViews.swift. β One of this dimension's main actionable groups (12 warning-level).
Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication β start with main.swift (2), HStack.swift, FocusableModifier.swift. β One of this dimension's main actionable groups (11 warning-level).
Resolve the 8 Duplicated block (7 lines × 2) finding(s) in Code Duplication β start with CornerRadius.swift, SelectableListViews.swift, IncomingURLs.swift. β One of this dimension's main actionable groups (8 warning-level).
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.
Do you agree with this assessment?
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.
22 production modules (SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 13 of the 22 (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).
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.
Resolve the 20 Low cohesion finding(s) in Cohesion (LCOM4) β start with UIKitBackend.swift (3), UIKitBackend+Picker.swift (3), NSCustomWindow.swift (2). β One of this dimension's main actionable groups (20 warning-level).
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.
Do you agree with this assessment?
D9 Β· Test Distribution0.1 / 10Criticalβ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
41 test methods: 1 unit, 0 integration, 0 BDD, 40 e2e.
Inverted test pyramid
What to do
Resolve the 1 Inverted test pyramid finding(s) in Test Distribution. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d9_recommendation.md Β· top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 Β· Test Quality3.4 / 10Weakβ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 18 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 41 tests.
No assertions: testEntryGeneratesWithLiteral Β· Γ18Tests/SwiftCrossUITests/EntryMacroTests.swift:13
What to do
Resolve the 18 No assertions finding(s) in Test Quality β start with EntryMacroTests.swift (7), ObservableObjectMacroTests.swift (7), StackContextRendersDifferently.swift (3). β One of this dimension's main actionable groups (18 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). β Hardens enforcement from Documented toward Prevented β provenance only; does not change the score.
Detailed fixes: d10_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
2 outdated direct SwiftPM dependencies, 2 pinning defect(s). 15 of 18 direct dependencies had their releases listed (0 naming no readable repository, 3 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported β a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.
Dependency not covered by the committed resolution: androidkit Β· Γ2
Outdated: swift-collections Β· Γ2
What to do
Resolve the 2 Dependency not covered by the committed resolution finding(s) in Dependency Hygiene. β One of this dimension's main actionable groups (2 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). β Hardens enforcement from Documented toward Verified β provenance only; does not change the score.
Detailed fixes: d12_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 51 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 50 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 β unpinned, or whose licence file could not be read or named β from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 2 of them are declared by a manifest that commits no Package.resolved (a library, whose resolution is its consumer's), so their own dependencies are resolved by whoever builds it and are not in this verdict. 2 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. β 2 package(s) could not be read at a pinned revision and are not known to the index, and were NOT graded β this verdict does not cover them: `androidkit`, `swift-java`.
What it measures: Files that change often and are also complex β the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots β start with AndroidBackend+Locale.swift. β 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.
Do you agree with this assessment?
D16 Β· Bus Factor9.0 / 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.
27 source file(s) have their living knowledge concentrated in one author (β₯90% of recent, decayed contribution). The largest is Sources/WinUIBackend/WinUIBackend+Button.swift. Counted over 262 of the 798 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
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. β One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code β TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
138 deducted task-comment markers across 60539 LoC (0.2/KLoC) β score 9.6. 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.
Resolve the 134 TodoComment finding(s) in Explicit Debt β start with WinUIBackend.swift (11), AndroidBackend.swift (9), CoreWindowing.swift (8). β One of this dimension's main actionable groups (134 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt β start with WindowBehaviors.swift (2), UnimplementedFeatures.swift, Differ.swift. β One of this dimension's main actionable groups (4 warning-level).
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.
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.
1 of 2 build units (SwiftPM) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed β scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout β the full git history, then a second --no-git pass over the working tree as it stands β merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side β unscored and excluded from the lens, never a hedged middling score.
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).
39 finding(s): 0 critical, 38 high, 1 medium, 0 low. 29 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` β one pinning decision is charged once, not once per lens. semgrep hit a parse error in 2 file(s) β `Scripts/format.sh` (lines 34β38), `Sources/AppKitBackend/Features/CoreWindowing.swift` (lines 124β127) β so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 6 REDACTED finding(s) charged to Static Analysis (SAST) β the other 29 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. β One of this dimension's main actionable groups (35 issue-level, 6 of them charged here).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED (2). β One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) β start with REDACTED. β One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares β Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 1 High IaC finding(s) in IaC & Container Security β start with REDACTED. β One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security β start with REDACTED (2). β One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d31_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned β last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge β recently and meaningfully worked. Counted over 262 of the 798 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together β pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only β tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file β₯10 revisions, β₯5 shared commits, β₯50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only β test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real productionβproduction coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a codeβdocs pair β a command and the reference page that restates it β is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 4 Change coupling finding(s) in Change Coupling β start with DummyBackend.swift (2), EitherView.swift, Gtk3Backend.swift. β One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling β start with AppKitBackend.swift, GtkBackend.swift. β One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity β generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals β generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions β scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 1 more group(s) β more in Appendix A; the complete list is findings.md.
What to do
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 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. β One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. β One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md Β· top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable β a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it β a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
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.
Other Β· Architecture β Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other Β· Architecture β Whether dependencies point inward (Domain β Application β Infrastructure/Web) β the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 Β· Test isolation10.0 / 10Exemplaryβ Tool-verified
Other Β· Architecture β Whether production projects stay free of references to test projects β tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other Β· Architecture β Whether read (query) handlers stay side-effect-free β a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set β a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
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 1 of 2 project(s) that lack one β worth up to 1 pts.
Maturity Β· Maturity β Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape β no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is β¦" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document β not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
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.
Readiness Β· Readiness β Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 Β· Library API & versioning6.0 / 10Adequateβ Tool-verified
Readiness Β· Readiness β For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
778/1078 types (72%) declared in the published library are public. For a library, every public type is a stability contract β keep implementation types off the surface and expose only the intended API.
What to do
Keep implementation types off the public surface (Kotlin: `internal`; Swift: leave it `internal` (the default) instead of `public`) so internals can change without breaking consumers.
Only 1/2 runnable modules use logging (modules with no entry point or server are excluded β they are libraries a runnable module hosts). Silent: `APITool`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness Β· Readiness β Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step β in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (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 25012 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. β REDACTED:7
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β 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.
Readiness Β· Readiness β Whether releases are automated and safely reversible (probes, rolling updates, approval gates) β from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where Watchdog can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness Β· Readiness β Whether releases are traceable β a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file β what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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 19 use(s) across 64,140 production line(s) (~0.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
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.
Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
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.
Other Β· Code Health β Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other Β· Code Health β Whether any branch is dead by construction β a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 Β· Undrained process stream10.0 / 10Exemplaryβ Nothing flagged
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.
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.
Do you agree with this assessment?
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.
Other Β· Code Health β Whether a loop that shortens a string until it fits a length budget has a floor β one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything β a direct comparison on the length, a body guard, a break β bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engineβs own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose bodyβs one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression β never compared directly, never tested for truthiness, and with no other read of `x` β and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 Β· Uncapped recursion over a caller-supplied document10.0 / 10Exemplaryβ Nothing flagged
Other Β· Security β Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go β an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engineβs own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value β `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, β¦) or a DOM node global the file does not rebind β that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other Β· Code Health β Whether a 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.
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.
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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
X27 Β· Collection changed while being enumerated10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a `for (x in c)` or `c.forEach { β¦ }` leaves the collection it is walking alone β a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.
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.
Do you agree with this assessment?
X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a condition that tests a value for emptiness indexes that same value only where the test holds β an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty β a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 Β· Per-element action decided by a fixed element10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a decision taken once per element is taken ABOUT that element β a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`βs condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move β written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engineβs own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = β¦; β¦; β¦)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other Β· Code Health β Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
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. β Sources/GtkBackend/Features/RevealFiles.swift:32
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 Β· Support guard that admits what it rejects10.0 / 10Exemplaryβ Nothing flagged
Other Β· Code Health β Whether a guard written as a NEGATED `||` says what its author meant β `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read β an identifier or member access, never an invocation, which is a predicate rather than a capability flag β and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other Β· Code Health β Whether 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.
Do you agree with this assessment?
Reference β by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by β¦") and is never the strongest area however high its average.
Unscored β 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score β either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate β 5 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
X7 Silent fallback defaults β 1 observation(s) recorded Β· Advisory β this card reports evidence and never carries a score.
Not evidenced β 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase β the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail β Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup β not evidenced β repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included β 54 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC2 Forms & labels β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC3 Page structure β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC4 Keyboard semantics β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC5 ARIA correctness β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC6 Visual & motion safety β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AC7 A11y enforcement β Frontend below the scale floor (4 DOM element(s) < 25) β too little surface to assess accessibility.
AX1 Captive dependencies β Not applicable: this repository's Kotlin imports no dependency-injection container and defines no container of its own β nothing that both registers and resolves bindings, and nothing that names two lifetimes β so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own β nothing that both registers and resolves bindings, and nothing that names two lifetimes β so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons β No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
AX5 Architecture & structure β not assessed β architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation β not assessed β interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion β not applicable β not a vertical-slice architecture
AXB2 Runtime readiness β Advisory β this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility β the image ran but published no HTTP port β nothing to crawl (EXPOSE the web port to unlock runtime evidence) 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 β Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls β Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository β because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention β No personal data detected in a persisted data model β no PII-named property (email, firstName, dateOfBirth, phoneNumber, β¦) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, 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 property (email, firstName, dateOfBirth, phoneNumber, β¦) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, β¦) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability β Test reliability not included β the .swift suite was found but not re-run
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.
D19 Documentation Quality β No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D21 Naming Consistency β Naming consistency is measured on C# only; Kotlin, Python, Swift not measured.
D22 Internal API Consistency β API consistency is measured on C# only; the exposed Swift surface was not measured.
D23 Boundary Type-Coupling β No bounded-context organisation was detected either β neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (β₯2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it β e.g. `architecture:` β `contexts:` β `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value β D24 reads C# and Visual Basic comments only β this repository's production source is .kt, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance β no ADRs to check
D27 Navigability β D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.swift), 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.
D32 Data Compliance (PII/GDPR) β 106 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.
D44 Platform End-of-Life β Platform end-of-life not assessed β this repository declares no platform this pass reads
D7 Architectural Integrity β no checkable ADRs, and no project-reference graph for the cycle pass to read β so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage β Coverage not measured β Swift suite
DM1 Domain Modelling β not scored β this repository shows only 1 of the 3 signals this lens looks for (4 value object(s))
ED2 Event/command shape β not scored β deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
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'.
P7 Outbound HTTP resilience β not applicable β no HTTP server, API framework or worker entry point was found in the JVM, Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations β no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage β no coverage report found on disk β produce a coverage report in a standard format (lcov β `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) 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 file importing package-benchmark, or package-benchmark in Package.swift, 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.
X2 Cancellation propagation β not analysed β these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped β 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
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.
TodoComment Tests/SwiftCrossUITests/EntryMacroTests.swift:254β // TODO: Add test for raw identifiers after SwiftSyntax version bump to 602.0.0+ β 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 Tests/SwiftCrossUITests/PublisherTests.swift:78β // TODO: Create mock backend so that this can be tested on all platforms. There's β 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 Tests/Gtk3BackendTests/LayoutTests.swift:11β // TODO(stackotter): Figure out how to fix autoreleasepool crash that β 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 Sources/WinUIBackend/InspectionModifiers.swift:49β // TODO(stackotter): Repair Picker.inspect implementations post PickerStyle refactor β 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 Sources/UIKitBackend/InspectionModifiers.swift:65β // TODO(stackotter): Repair Picker.inspect implementations post PickerStyle refactor β 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 Sources/GtkBackend/InspectionModifiers.swift:49β // TODO(stackotter): Repair Picker.inspect implementations post PickerStyle refactor β 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 Sources/AppKitBackend/InspectionModifiers.swift:49β // TODO(stackotter): Repair Picker.inspect implementations post PickerStyle refactor β 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 Sources/WinUIBackend/WinUIBackend.swift:241β // TODO: Read in previously hardcoded values from the application's β 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 Sources/WinUIBackend/WinUIBackend.swift:339β // TODO: Detect whether window is fullscreen β 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 Sources/GtkBackend/Features/CoreWindowing.swift:59β // TODO: Detect whether window is fullscreen β 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 Sources/Gtk3Backend/Features/CoreWindowing.swift:59β // TODO: Detect whether window is fullscreen β 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 Sources/WinUIBackend/WinUIBackend.swift:555β // TODO: Compute window scale factor (easy enough, but we would also have to keep β 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 Sources/WinUIBackend/WinUIBackend.swift:565β // TODO: Notify when window scale factor changes β 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 Sources/UIKitBackend/UIKitBackend.swift:238β // TODO: Notify when window scale factor changes β 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 Sources/GtkBackend/Features/CoreWindowing.swift:119β // TODO: Notify when window scale factor changes β 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 Sources/WinUIBackend/WinUIBackend.swift:623β // TODO: Find out if there's an efficient way to do this without WinUI β 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 Sources/WinUIBackend/WinUIBackend.swift:866β // TODO(bbrk24): Look into removing the container, like on AppKit β 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 Sources/WinUIBackend/WinUIBackend.swift:945β // TODO: Font design handling (monospace vs normal) β 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 Sources/WinUIBackend/WinUIBackend.swift:1250β // TODO: Understands how to get ComboBox items in WinUI β 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 Sources/WinUIBackend/WinUIBackend.swift:1277β // TODO: Proper picker updating logic β 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 Sources/WinUIBackend/WinUIBackend.swift:1278β // TODO: Picker font handling β 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 Sources/WinUIBackend/WinUIBackend.swift:2144β // TODO(parity): foreground color ignored β 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 Sources/UIKitBackend/UIKitBackend+Control.swift:95β // TODO: localization? β 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 Sources/UIKitBackend/UIKitBackend+CustomButton.swift:88β // TODO: Replace with .accent β 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 Sources/UIKitBackend/UIKitBackend+FilePicker.swift:37β // TODO(#235): Respect fileDialogOptions.allowedContentTypes and fileDialogOptions.allowOtherContentTypes
Low cohesion: AppKitBackend (LCOM4 130) Sources/AppKitBackend/AppKitBackend.swift:12β AppKitBackend's methods fall into 130 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 130 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: UIKitBackend (LCOM4 118) Sources/UIKitBackend/UIKitBackend.swift:5β UIKitBackend's methods fall into 118 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 118 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: Gtk3Backend (LCOM4 100) Sources/Gtk3Backend/Gtk3Backend.swift:15β Gtk3Backend's methods fall into 100 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 100 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: GtkBackend (LCOM4 97) Sources/GtkBackend/GtkBackend.swift:15β GtkBackend's methods fall into 97 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 97 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: WinUIBackend (LCOM4 93) Sources/WinUIBackend/WinUIBackend.swift:89β WinUIBackend's methods fall into 93 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 93 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: DummyBackend (LCOM4 91) Sources/DummyBackend/DummyBackend.swift:4β DummyBackend's methods fall into 91 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 91 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: AndroidBackend (LCOM4 88) Sources/AndroidBackend/AndroidBackend.swift:83β AndroidBackend's methods fall into 88 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 88 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: CursesBackend (LCOM4 16) Sources/CursesBackend/CursesBackend.swift:9β CursesBackend's methods fall into 16 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 16 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: LVGLBackend (LCOM4 14) Sources/LVGLBackend/LVGLBackend.swift:10β LVGLBackend's methods fall into 14 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 14 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: NSCustomButton (LCOM4 9) Sources/AppKitBackend/Helpers/NSCustomButton.swift:4β NSCustomButton's methods fall into 9 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 9 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: NSCustomWindow (LCOM4 6) Sources/AppKitBackend/Helpers/NSCustomWindow.swift:4β NSCustomWindow's methods fall into 6 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 6 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: AnyViewGraphNode (LCOM4 6) Sources/SwiftCrossUI/ViewGraph/AnyViewGraphNode.swift:5β AnyViewGraphNode's methods fall into 6 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 6 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: SceneDelegate (LCOM4 6) Sources/UIKitBackend/UIKitBackend.swift:433β SceneDelegate's methods fall into 6 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 6 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: NSCustomTableViewDelegate (LCOM4 5) Sources/AppKitBackend/Helpers/NSCustomTableViewDelegate.swift:4β NSCustomTableViewDelegate's methods fall into 5 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 5 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: UICustomTableViewDelegate (LCOM4 5) Sources/UIKitBackend/UIKitBackend+List.swift:70β UICustomTableViewDelegate's methods fall into 5 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 5 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: UIPickerViewPicker (LCOM4 5) Sources/UIKitBackend/UIKitBackend+Picker.swift:11β UIPickerViewPicker's methods fall into 5 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 5 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: Delegate (LCOM4 4) Sources/AppKitBackend/Helpers/NSCustomWindow.swift:49β Delegate'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: UITableViewPicker (LCOM4 4) Sources/UIKitBackend/UIKitBackend+Picker.swift:84β UITableViewPicker'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: UISegmentedControlPicker (LCOM4 4) Sources/UIKitBackend/UIKitBackend+Picker.swift:150β UISegmentedControlPicker'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: ApplicationDelegate (LCOM4 4) Sources/UIKitBackend/UIKitBackend.swift:307β ApplicationDelegate'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.
No assertions: testEntryGeneratesWithLiteral Tests/SwiftCrossUITests/EntryMacroTests.swift:13β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testGeneratesWithTypeAnnotation Tests/SwiftCrossUITests/EntryMacroTests.swift:44β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: entryThrowsWithoutInitialValue Tests/SwiftCrossUITests/EntryMacroTests.swift:75β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: entryGeneratesDefaultValueNilWithoutInitialValueOnOptionalTypeDefinition Tests/SwiftCrossUITests/EntryMacroTests.swift:102β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: entryGeneratesForAppStorage Tests/SwiftCrossUITests/EntryMacroTests.swift:147β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: entryOnValueWithoutDirectParentSupportedValuesExtensionFails Tests/SwiftCrossUITests/EntryMacroTests.swift:194β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: entryFailsWhenAppliedToLet Tests/SwiftCrossUITests/EntryMacroTests.swift:227β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: duplicateIds Tests/SwiftCrossUITests/ForEachTests.swift:8β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testStoredPropertyGetsAttribute Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:13β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testComputedPropertyIsIgnored Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:38β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPropertyWithObserversGetsAttribute Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:64β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testPrivateAndStaticAreIgnored Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:92β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testObservationIgnoredIsHonored Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:120β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMultipleBindingsThrowError Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:144β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: namespacedObservationIgnoredBlocksApplication Tests/SwiftCrossUITests/ObservableObjectMacroTests.swift:168β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testVStack Tests/SwiftCrossUITests/Layout/StackContextRendersDifferently.swift:19β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testHStack Tests/SwiftCrossUITests/Layout/StackContextRendersDifferently.swift:29β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testZStack Tests/SwiftCrossUITests/Layout/StackContextRendersDifferently.swift:39β This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* β so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Duplicated block (11 lines × 2) Sources/Gtk3Backend/Features/Sheets.swift:81β Sources/Gtk3Backend/Features/Sheets.swift:81-91 | Sources/GtkBackend/Features/Sheets.swift:83-93 β before extracting anything, compare `Sources/Gtk3Backend/Features/Sheets.swift` and `Sources/GtkBackend/Features/Sheets.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) Sources/Gtk3Backend/Features/SplitViews.swift:36β Sources/Gtk3Backend/Features/SplitViews.swift:36-46 | Sources/GtkBackend/Features/SplitViews.swift:35-45 β 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 (11 lines × 2) Sources/Gtk3Backend/Features/ViewLabelButtons.swift:16β Sources/Gtk3Backend/Features/ViewLabelButtons.swift:16-26 | Sources/GtkBackend/Features/ViewLabelButtons.swift:16-26 β 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 (11 lines × 2) Sources/Gtk3Example/main.swift:56β Sources/Gtk3Example/main.swift:56-66 | Sources/Gtk3Example/main.swift:72-82 β 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 `Sources/Gtk3Example/main.swift:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Sources/GtkExample/main.swift:59β Sources/GtkExample/main.swift:59-69 | Sources/GtkExample/main.swift:75-85 β 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 `Sources/GtkExample/main.swift:59` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Sources/SwiftCrossUI/Views/ZStack.swift:58β Sources/SwiftCrossUI/Views/ZStack.swift:58-68 | Sources/SwiftCrossUI/Views/ZStack.swift:81-91 β 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 `Sources/SwiftCrossUI/Views/ZStack.swift:58` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) Sources/Gtk3Backend/Features/Alerts.swift:19β Sources/Gtk3Backend/Features/Alerts.swift:19-29 | Sources/GtkBackend/Features/Alerts.swift:24-34 β 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 (11 lines × 2) Sources/Gtk3Backend/Features/PopoverMenus.swift:42β Sources/Gtk3Backend/Features/PopoverMenus.swift:42-52 | Sources/GtkBackend/Features/PopoverMenus.swift:62-72 β 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 (11 lines × 2) Sources/SwiftCrossUI/Views/Shapes/Shape.swift:80β Sources/SwiftCrossUI/Views/Shapes/Shape.swift:80-90 | Sources/SwiftCrossUI/Views/Shapes/StyledShape.swift:59-69 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) Sources/Gtk3Backend/Features/Checkboxes.swift:10β Sources/Gtk3Backend/Features/Checkboxes.swift:10-20 | Sources/GtkBackend/Features/Checkboxes.swift:10-20 β 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 (11 lines × 2) Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:33β Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:33-43 | Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift:19-29 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift` and `Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) Examples/Sources/AdvancedCustomizationExample/AdvancedCustomizationApp.swift:158β Examples/Sources/AdvancedCustomizationExample/AdvancedCustomizationApp.swift:158-168 | Examples/Sources/AdvancedCustomizationExample/AdvancedCustomizationApp.swift:182-192 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) Sources/Gtk3Example/main.swift:60β Sources/Gtk3Example/main.swift:60-68 | Sources/GtkExample/main.swift:63-71 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Example/main.swift:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/Gtk3Example/main.swift:76β Sources/Gtk3Example/main.swift:76-84 | Sources/GtkExample/main.swift:79-87 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Example/main.swift:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/SwiftCrossUI/Views/HStack.swift:49β Sources/SwiftCrossUI/Views/HStack.swift:49-57 | Sources/SwiftCrossUI/Views/VStack.swift:71-80 β before extracting anything, compare `Sources/SwiftCrossUI/Views/HStack.swift` and `Sources/SwiftCrossUI/Views/VStack.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/HStack.swift:49` 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) Sources/SwiftCrossUI/Views/Modifiers/FocusableModifier.swift:56β Sources/SwiftCrossUI/Views/Modifiers/FocusableModifier.swift:56-64 | Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnHoverModifier.swift:56-64 β 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 `Sources/SwiftCrossUI/Views/Modifiers/FocusableModifier.swift:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/SwiftCrossUI/Views/Modifiers/HelpModifier.swift:56β Sources/SwiftCrossUI/Views/Modifiers/HelpModifier.swift:56-64 | Sources/SwiftCrossUI/Views/Modifiers/Style/CornerRadiusModifier.swift:55-63 β 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 `Sources/SwiftCrossUI/Views/Modifiers/HelpModifier.swift:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:178β Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:178-186 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:348-356 β 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 `Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:178` 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 (9 lines × 2) Sources/WinUIBackend/WinUIBackend+Gradient.swift:22β Sources/WinUIBackend/WinUIBackend+Gradient.swift:22-30 | Sources/WinUIBackend/WinUIBackend+Gradient.swift:58-66 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) Sources/Gtk3Backend/Features/GenericContainers.swift:20β Sources/Gtk3Backend/Features/GenericContainers.swift:20-28 | Sources/GtkBackend/Features/GenericContainers.swift:20-28 β 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 (9 lines × 2) Sources/Gtk3Backend/Features/SplitViews.swift:21β Sources/Gtk3Backend/Features/SplitViews.swift:21-29 | Sources/GtkBackend/Features/SplitViews.swift:20-28 β 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 (9 lines × 2) Sources/Gtk3Backend/Features/WindowClosing.swift:21β Sources/Gtk3Backend/Features/WindowClosing.swift:21-29 | Sources/GtkBackend/Features/WindowClosing.swift:10-18 β 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 (9 lines × 2) Sources/Gtk3Backend/Features/ViewLabelButtons.swift:6β Sources/Gtk3Backend/Features/ViewLabelButtons.swift:6-14 | Sources/GtkBackend/Features/ViewLabelButtons.swift:6-14 β 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.
TooManyMethods: AppKitBackend Sources/AppKitBackend/AppKitBackend.swift:12β TooManyMethods β 151 methods, declared across 48 files: Features/CoreWindowing.swift (13), Features/SelectableListViews.swift (7), Features/TextViews.swift (7), Features/GenericContainers.swift (6), +44 more file(s). The bar is 30 methods; this is 121 over it, 5.03× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: GtkBackend Sources/GtkBackend/GtkBackend.swift:15β TooManyMethods β 142 methods, declared across 43 files: Features/CoreWindowing.swift (15), Features/SelectableListViews.swift (7), Features/Core.swift (6), Features/GenericContainers.swift (6), +39 more file(s). The bar is 30 methods; this is 112 over it, 4.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: UIKitBackend Sources/UIKitBackend/UIKitBackend.swift:5β TooManyMethods β 141 methods, declared across 19 files: UIKitBackend/UIKitBackend+Control.swift (31), UIKitBackend/UIKitBackend+Container.swift (16), UIKitBackend/UIKitBackend.swift (15), UIKitBackend/UIKitBackend+Window.swift (12), +15 more file(s). The bar is 30 methods; this is 111 over it, 4.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: WinUIBackend Sources/WinUIBackend/WinUIBackend.swift:89β TooManyMethods β 141 methods, declared across 9 files: WinUIBackend/WinUIBackend.swift (107), WinUIBackend/WinUIBackend+TextField.swift (8), WinUIBackend/WinUIBackend+Button.swift (5), WinUIBackend/WinUIBackend+Sheets.swift (5), +5 more file(s). The bar is 30 methods; this is 111 over it, 4.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: AndroidBackend Sources/AndroidBackend/AndroidBackend.swift:83β TooManyMethods β 136 methods, declared across 24 files: AndroidBackend/AndroidBackend.swift (41), AndroidBackend/AndroidBackend+TextFields.swift (13), AndroidBackend/AndroidBackend+Toggles.swift (10), AndroidBackend/AndroidBackend+List.swift (7), +20 more file(s). The bar is 30 methods; this is 106 over it, 4.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Gtk3Backend Sources/Gtk3Backend/Gtk3Backend.swift:15β TooManyMethods β 131 methods, declared across 39 files: Features/CoreWindowing.swift (14), Features/Core.swift (7), Features/SelectableListViews.swift (7), Features/GenericContainers.swift (6), +35 more file(s). The bar is 30 methods; this is 101 over it, 4.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: DummyBackend Sources/DummyBackend/DummyBackend.swift:4β TooManyMethods β 100 methods, declared across 28 files: Features/CoreWindowing.swift (13), Features/SelectableListViews.swift (7), DummyBackend/UnimplementedFeatures.swift (7), Features/GenericContainers.swift (6), +24 more file(s). The bar is 30 methods; this is 70 over it, 3.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: BaseStubs Sources/SwiftCrossUI/Backend/BackendFeatures/BaseStubs.swift:78β TooManyMethods β 81 methods. The bar is 30 methods; this is 51 over it, 2.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.
Duplicated block (7 lines × 2) Sources/Gtk3Backend/Features/CornerRadius.swift:8β Sources/Gtk3Backend/Features/CornerRadius.swift:8-14 | Sources/GtkBackend/Features/CornerRadius.swift:6-12 β 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 (7 lines × 2) Sources/AppKitBackend/Features/SelectableListViews.swift:41β Sources/AppKitBackend/Features/SelectableListViews.swift:41-47 | Sources/UIKitBackend/UIKitBackend+List.swift:24-30 β 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 (7 lines × 2) Sources/Gtk3Backend/Features/IncomingURLs.swift:7β Sources/Gtk3Backend/Features/IncomingURLs.swift:7-13 | Sources/GtkBackend/Features/IncomingURLs.swift:7-13 β 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 (7 lines × 2) Sources/Gtk3Backend/Gtk3Backend.swift:34β Sources/Gtk3Backend/Gtk3Backend.swift:34-40 | Sources/GtkBackend/GtkBackend.swift:41-47 β `Sources/Gtk3Backend/Gtk3Backend.swift` and `Sources/GtkBackend/GtkBackend.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 3 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (7 lines × 2) Sources/SwiftCrossUI/State/Cancellable.swift:45β Sources/SwiftCrossUI/State/Cancellable.swift:45-51 | Sources/SwiftCrossUI/State/Publisher.swift:63-69 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) Sources/SwiftCrossUI/Views/Modifiers/Lifecycle/OnAppearModifier.swift:20β Sources/SwiftCrossUI/Views/Modifiers/Lifecycle/OnAppearModifier.swift:20-26 | Sources/SwiftCrossUI/Views/Modifiers/Lifecycle/OnCommitModifier.swift:15-21 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) Sources/GtkBackend/Features/Checkboxes.swift:22β Sources/GtkBackend/Features/Checkboxes.swift:22-28 | Sources/GtkBackend/Features/ToggleButtons.swift:28-34 β 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/GtkBackend/Features/ToggleButtons.swift:22` calls `clear`, `set`, `cssProperties` and `Sources/GtkBackend/Features/Checkboxes.swift:19` 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.
Duplicated block (7 lines × 2) Sources/SwiftCrossUI/Scenes/Modifiers/SceneEnvironmentModifier.swift:7β Sources/SwiftCrossUI/Scenes/Modifiers/SceneEnvironmentModifier.swift:7-14 | Sources/SwiftCrossUI/Views/Modifiers/EnvironmentModifier.swift:63-69 β 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 (14 lines × 2) Sources/Gtk3Backend/Features/Sheets.swift:56β Sources/Gtk3Backend/Features/Sheets.swift:56-69 | Sources/GtkBackend/Features/Sheets.swift:55-68 β before extracting anything, compare `Sources/Gtk3Backend/Features/Sheets.swift` and `Sources/GtkBackend/Features/Sheets.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/Sheets.swift:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:189β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:189-202 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:203-216 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:189` 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 (14 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:278β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:278-291 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:292-305 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:278` 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 (14 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:364β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:364-377 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:378-391 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:364` 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 (14 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:439β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:439-452 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:453-466 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:439` 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 (14 lines × 2) Sources/Gtk3Backend/Features/ScrollContainers.swift:14β Sources/Gtk3Backend/Features/ScrollContainers.swift:14-27 | Sources/GtkBackend/Features/ScrollContainers.swift:14-27 β 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 (14 lines × 2) Sources/Gtk3Backend/Features/WindowBehaviors.swift:6β Sources/Gtk3Backend/Features/WindowBehaviors.swift:6-19 | Sources/GtkBackend/Features/WindowBehaviors.swift:6-19 β 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 (13 lines × 2) Sources/AppKitBackend/Features/HoverGestures.swift:16β Sources/AppKitBackend/Features/HoverGestures.swift:16-28 | Sources/AppKitBackend/Features/TapGestures.swift:16-28 β 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 `Sources/AppKitBackend/Features/HoverGestures.swift:16` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) Sources/Gtk3Backend/Features/ColorPickers.swift:10β Sources/Gtk3Backend/Features/ColorPickers.swift:10-22 | Sources/GtkBackend/Features/ColorPickers.swift:10-22 β 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 `Sources/Gtk3Backend/Features/ColorPickers.swift:10` 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 (13 lines × 2) Sources/Gtk3Example/main.swift:29β Sources/Gtk3Example/main.swift:29-41 | Sources/GtkExample/main.swift:32-44 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (13 lines × 2) Sources/Gtk3Backend/Features/CoreWindowing.swift:127β Sources/Gtk3Backend/Features/CoreWindowing.swift:127-139 | Sources/GtkBackend/Features/CoreWindowing.swift:128-140 β 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 (13 lines × 2) Sources/SwiftCrossUI/Views/AnyView.swift:128β Sources/SwiftCrossUI/Views/AnyView.swift:128-140 | Sources/SwiftCrossUI/Views/HotReloadableView.swift:126-138 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:108β Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:108-120 | Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift:83-95 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift` and `Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:125β Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:125-137 | Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift:68-80 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift` and `Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) Sources/Gtk3Backend/Features/TextEditors.swift:18β Sources/Gtk3Backend/Features/TextEditors.swift:18-25 | Sources/GtkBackend/Features/TextEditors.swift:18-25 β 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 `Sources/Gtk3Backend/Features/TextEditors.swift:18` 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/GtkBackend/Features/TextEditors.swift:30` calls `withBlockedSignal` and `Sources/Gtk3Backend/Features/TextEditors.swift:29` 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.
Duplicated block (8 lines × 2) Sources/Gtk3Backend/Features/Tooltips.swift:6β Sources/Gtk3Backend/Features/Tooltips.swift:6-13 | Sources/GtkBackend/Features/Tooltips.swift:6-13 β 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) Sources/AppKitBackend/Helpers/CustomWKWebView.swift:11β Sources/AppKitBackend/Helpers/CustomWKWebView.swift:11-18 | Sources/UIKitBackend/UIKitBackend+WebView.swift:37-44 β 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) Sources/Gtk3Backend/Helpers/TooltipContainer.swift:33β Sources/Gtk3Backend/Helpers/TooltipContainer.swift:33-40 | Sources/GtkBackend/Helpers/TooltipContainer.swift:33-40 β before extracting anything, compare `Sources/Gtk3Backend/Helpers/TooltipContainer.swift` and `Sources/GtkBackend/Helpers/TooltipContainer.swift` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) Sources/GtkBackend/Features/CoreWindowing.swift:106β Sources/GtkBackend/Features/CoreWindowing.swift:106-113 | Sources/WinUIBackend/WinUIBackend.swift:551-559 β 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) Sources/AppKitBackend/Features/SecureFields.swift:5β Sources/AppKitBackend/Features/SecureFields.swift:5-12 | Sources/AppKitBackend/Features/TextFields.swift:5-12 β before extracting anything, compare `Sources/AppKitBackend/Features/SecureFields.swift` and `Sources/AppKitBackend/Features/TextFields.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) Examples/Sources/NotesExample/NotesApp.swift:11β Examples/Sources/NotesExample/NotesApp.swift:11-18 | Examples/Sources/SplitExample/SplitApp.swift:140-147 β 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 (6 lines × 2) Sources/Gtk3Backend/Features/Widgets.swift:19β Sources/Gtk3Backend/Features/Widgets.swift:19-24 | Sources/GtkBackend/Features/Widgets.swift:19-24 β 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 (6 lines × 2) Sources/LVGLBackend/LVGLBackend.swift:94β Sources/LVGLBackend/LVGLBackend.swift:94-99 | Sources/LVGLBackend/LVGLBackend.swift:127-132 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) Sources/AppKitBackend/Features/ViewLabelButtons.swift:28β Sources/AppKitBackend/Features/ViewLabelButtons.swift:28-33 | Sources/GtkBackend/Features/ViewLabelButtons.swift:28-33 β 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 (6 lines × 2) Sources/AppKitBackend/Helpers/Conversions.swift:7β Sources/AppKitBackend/Helpers/Conversions.swift:7-12 | Sources/UIKitBackend/UIKitBackend+Gradient.swift:212-217 β 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. 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) Sources/SwiftCrossUI/Views/Modifiers/AlertModifier.swift:61β Sources/SwiftCrossUI/Views/Modifiers/AlertModifier.swift:61-66 | Sources/SwiftCrossUI/Views/Modifiers/SheetModifier.swift:62-67 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) Sources/SwiftCrossUI/Views/AnyView.swift:35β Sources/SwiftCrossUI/Views/AnyView.swift:35-42 | Sources/SwiftCrossUI/Views/Modifiers/Style/CornerRadiusModifier.swift:31-36 β 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 (6 lines × 2) Sources/SwiftCrossUI/Views/GeometryReader.swift:45β Sources/SwiftCrossUI/Views/GeometryReader.swift:45-53 | Sources/SwiftCrossUI/Views/OptionalView.swift:38-43 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) Sources/Gtk3Backend/Features/FileOpenDialogs.swift:7β Sources/Gtk3Backend/Features/FileOpenDialogs.swift:7-18 | Sources/GtkBackend/Features/FileOpenDialogs.swift:7-19 β 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 `Sources/Gtk3Backend/Features/FileOpenDialogs.swift:7` 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) Sources/Gtk3Example/main.swift:44β Sources/Gtk3Example/main.swift:44-55 | Sources/GtkExample/main.swift:47-58 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Example/main.swift:44` 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) Sources/SwiftCrossUI/Views/HStack.swift:53β Sources/SwiftCrossUI/Views/HStack.swift:53-64 | Sources/SwiftCrossUI/Views/HStack.swift:77-88 β 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 `Sources/SwiftCrossUI/Views/HStack.swift:53` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) Sources/SwiftCrossUI/Views/VStack.swift:76β Sources/SwiftCrossUI/Views/VStack.swift:76-87 | Sources/SwiftCrossUI/Views/VStack.swift:100-111 β 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 `Sources/SwiftCrossUI/Views/VStack.swift:76` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) Sources/Gtk3Backend/Features/ApplicationMenus.swift:6β Sources/Gtk3Backend/Features/ApplicationMenus.swift:6-17 | Sources/GtkBackend/Features/ApplicationMenus.swift:6-17 β before extracting anything, compare `Sources/Gtk3Backend/Features/ApplicationMenus.swift` and `Sources/GtkBackend/Features/ApplicationMenus.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) Sources/Gtk3Backend/Features/GenericContainers.swift:35β Sources/Gtk3Backend/Features/GenericContainers.swift:35-39 | Sources/GtkBackend/Features/GenericContainers.swift:35-39 β 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 (5 lines × 2) Sources/Gtk3Backend/Helpers/TooltipContainer.swift:7β Sources/Gtk3Backend/Helpers/TooltipContainer.swift:7-11 | Sources/GtkBackend/Helpers/TooltipContainer.swift:7-11 β before extracting anything, compare `Sources/Gtk3Backend/Helpers/TooltipContainer.swift` and `Sources/GtkBackend/Helpers/TooltipContainer.swift` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) Sources/SwiftCrossUI/Scenes/CommandMenu.swift:13β Sources/SwiftCrossUI/Scenes/CommandMenu.swift:13-17 | Sources/SwiftCrossUI/Views/Menu.swift:18-22 β 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 (5 lines × 2) Sources/AppKitBackend/InspectionModifiers.swift:6β Sources/AppKitBackend/InspectionModifiers.swift:6-10 | Sources/UIKitBackend/InspectionModifiers.swift:6-10 β 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 (5 lines × 2) Sources/WinUIBackend/WinUIBackend.swift:1921β Sources/WinUIBackend/WinUIBackend.swift:1921-1925 | Sources/WinUIBackend/WinUIBackend.swift:1933-1937 β 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β before the caller uses what it releases β so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
FixmeComment Sources/GtkBackend/Features/WindowBehaviors.swift:12β // FIXME: This doesn't seem to work on macOS at least β 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.
FixmeComment Sources/Gtk3Backend/Features/WindowBehaviors.swift:12β // FIXME: This doesn't seem to work on macOS at least β 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.
FixmeComment Sources/DummyBackend/UnimplementedFeatures.swift:4β // FIXME: Implement them so we can test them β 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.
FixmeComment APITool/Sources/APITool/Differ.swift:74β // FIXME: This is really janky, but it'd be a lot of effort to β 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.
MethodTooLong: RoundedRectangle.path Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:47β MethodTooLong β path runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× 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: WinUIBackend.applyActions Sources/WinUIBackend/WinUIBackend.swift:1889β MethodTooLong β applyActions runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
MethodTooLong: WindowReference.update Sources/SwiftCrossUI/Scenes/WindowReference.swift:140β MethodTooLong β update runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: GtkCodeGen.generateClass Sources/GtkCodeGen/GtkCodeGen.swift:381β MethodTooLong β generateClass runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β the runs of statements that work on the same values and would earn the same name β into its own named unit, and have this one call them in order.
Change coupling: EitherView.swift β OptionalView.swift Sources/SwiftCrossUI/Views/EitherView.swift:1β `Sources/SwiftCrossUI/Views/EitherView.swift` and `Sources/SwiftCrossUI/Views/OptionalView.swift` change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package β so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `fe55b944` Allow arbitrary views to be used in menus (w/ invalid views ignored) β¦; `fa5314b8` Reimplement NavigationStack under new layout system and fix EitherVieβ¦; `f0503376` Reimplement OptionalView β run `git show` on any of them.
Change coupling: Gtk3Backend.swift β Menu.swift Sources/Gtk3Backend/Gtk3Backend.swift:1β `Sources/Gtk3Backend/Gtk3Backend.swift` and `Sources/SwiftCrossUI/Views/Menu.swift` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder β so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `f68c6efa` Bump to Swift 6.1 in preparation for AndroidBackend (fix conc warnings); `2ff5a910` Support environment in menus (#514); `c17943d4` Add support for `Divider` in menus (#318) β run `git show` on any of them.
Change coupling: DummyBackend.swift β Gtk3Backend.swift Sources/DummyBackend/DummyBackend.swift:1β `Sources/DummyBackend/DummyBackend.swift` and `Sources/Gtk3Backend/Gtk3Backend.swift` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder β so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `1b89cc44` Introduce ColorPicker support (#735); `7ae81c81` AppKitBackend: Implement window frame restoration (fixes #383) (#652); `1e320506` Re-add corner radius container and implement on Android (#638) β run `git show` on any of them.
Change coupling: DummyBackend.swift β WinUIBackend.swift Sources/DummyBackend/DummyBackend.swift:1β `Sources/DummyBackend/DummyBackend.swift` and `Sources/WinUIBackend/WinUIBackend.swift` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder β so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `1b89cc44` Introduce ColorPicker support (#735); `7ae81c81` AppKitBackend: Implement window frame restoration (fixes #383) (#652); `1e320506` Re-add corner radius container and implement on Android (#638) β run `git show` on any of them.
Duplicated block (17 lines × 2) Sources/AppKitBackend/Features/SecureFields.swift:31β Sources/AppKitBackend/Features/SecureFields.swift:31-47 | Sources/AppKitBackend/Features/TextFields.swift:31-47 β before extracting anything, compare `Sources/AppKitBackend/Features/SecureFields.swift` and `Sources/AppKitBackend/Features/TextFields.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/AppKitBackend/Features/SecureFields.swift:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) Sources/Gtk3Backend/Features/Sheets.swift:98β Sources/Gtk3Backend/Features/Sheets.swift:98-114 | Sources/GtkBackend/Features/Sheets.swift:100-116 β before extracting anything, compare `Sources/Gtk3Backend/Features/Sheets.swift` and `Sources/GtkBackend/Features/Sheets.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) Sources/Gtk3Backend/Features/Sliders.swift:12β Sources/Gtk3Backend/Features/Sliders.swift:12-28 | Sources/GtkBackend/Features/Sliders.swift:12-28 β 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 (17 lines × 2) Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift:81β Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift:81-97 | Sources/GtkBackend/GtkWidgetRepresentable.swift:80-96 β 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 `Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift:81` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `gtkWidget` to `Gtk3WidgetType` in one and `GtkWidgetType` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β their common supertype where they have one, or a new abstraction over them where they do not β and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5β9 lines × 3) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:131β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:131-139 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:145-153 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:157-161 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:131` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:157` calls `SIMD2` and `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:131` does not β after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5β9 lines × 3) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:220β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:220-228 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:234-242 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:246-250 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:220` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:246` calls `SIMD2` and `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:220` does not β after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5β9 lines × 3) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:309β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:309-317 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:323-331 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:335-339 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:309` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:335` calls `SIMD2` and `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:309` does not β after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5β9 lines × 3) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:395β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:395-403 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:409-417 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:421-425 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:395` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:421` calls `SIMD2` and `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:395` 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.
ClassTooLong: WinUIBackend Sources/WinUIBackend/WinUIBackend.swift:89β ClassTooLong β 1281 significant lines (blank, comment-only and punctuation-only lines excluded), 141 methods. The bar is 400 significant lines; this is 881 over it, 3.20× 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: GtkCodeGen Sources/GtkCodeGen/GtkCodeGen.swift:11β ClassTooLong β 638 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 238 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.
ClassTooLong: LayoutSystem Sources/SwiftCrossUI/Layout/LayoutSystem.swift:1β ClassTooLong β 469 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 69 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.
Duplicated block (20 lines × 2) Sources/Gtk3Backend/Features/ApplicationMenus.swift:99β Sources/Gtk3Backend/Features/ApplicationMenus.swift:99-118 | Sources/GtkBackend/Features/ApplicationMenus.swift:99-118 β before extracting anything, compare `Sources/Gtk3Backend/Features/ApplicationMenus.swift` and `Sources/GtkBackend/Features/ApplicationMenus.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) Sources/Gtk3Backend/Features/TextFields.swift:10β Sources/Gtk3Backend/Features/TextFields.swift:10-29 | Sources/GtkBackend/Features/TextFields.swift:10-29 β 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 (20 lines × 2) Sources/GtkBackend/Features/LinearGradients.swift:40β Sources/GtkBackend/Features/LinearGradients.swift:40-59 | Sources/GtkBackend/Features/RadialGradients.swift:40-59 β 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 `Sources/GtkBackend/Features/LinearGradients.swift:40` 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 (16 lines × 2) Sources/Gtk3Backend/Features/TextViews.swift:32β Sources/Gtk3Backend/Features/TextViews.swift:32-47 | Sources/GtkBackend/Features/TextViews.swift:72-87 β 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 `Sources/Gtk3Backend/Features/TextViews.swift:32` 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 (16 lines × 2) Sources/UIKitBackend/UIKitBackend+Control.swift:367β Sources/UIKitBackend/UIKitBackend+Control.swift:367-382 | Sources/UIKitBackend/UIKitBackend+Control.swift:444-459 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) Sources/Gtk3Backend/Helpers/CustomColorButton.swift:7β Sources/Gtk3Backend/Helpers/CustomColorButton.swift:7-33 | Sources/GtkBackend/Helpers/CustomColorButton.swift:8-23 β 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 `Sources/Gtk3Backend/Helpers/CustomColorButton.swift:7` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 3) APITool/Sources/APITool/Analyzer.swift:25β APITool/Sources/APITool/Analyzer.swift:25-29 | APITool/Sources/APITool/Analyzer.swift:32-36 | APITool/Sources/APITool/Analyzer.swift:38-42 β 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 `APITool/Sources/APITool/Analyzer.swift:25` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) Sources/SwiftCrossUI/Environment/EnvironmentValues.swift:228β Sources/SwiftCrossUI/Environment/EnvironmentValues.swift:228-232 | Sources/SwiftCrossUI/Layout/ViewLayoutResult.swift:60-64 | Sources/SwiftCrossUI/ViewGraph/PreferenceValues.swift:60-64 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (5 lines × 3) Sources/Gtk3Backend/InspectionModifiers.swift:6β Sources/Gtk3Backend/InspectionModifiers.swift:6-10 | Sources/GtkBackend/InspectionModifiers.swift:6-10 | Sources/WinUIBackend/InspectionModifiers.swift:6-10 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (10 lines × 2) Sources/AppKitBackend/Features/LinearGradients.swift:9β Sources/AppKitBackend/Features/LinearGradients.swift:9-18 | Sources/UIKitBackend/UIKitBackend+Gradient.swift:9-18 β 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 (10 lines × 2) Sources/AppKitBackend/Features/RadialGradients.swift:9β Sources/AppKitBackend/Features/RadialGradients.swift:9-18 | Sources/UIKitBackend/UIKitBackend+Gradient.swift:24-33 β 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 (10 lines × 2) Examples/Sources/SplitExample/SplitApp.swift:78β Examples/Sources/SplitExample/SplitApp.swift:78-87 | Examples/Sources/SplitExample/SplitApp.swift:98-107 β 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 `Examples/Sources/SplitExample/SplitApp.swift:78` 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.
D12 Β· Dependency HygieneΒ· Dependency not covered by the committed resolution Β· Γ2
Dependency not covered by the committed resolution: androidkit β `androidkit` is declared in Package.swift but has no entry in the committed `Package.resolved` beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated `Package.resolved`.
Dependency not covered by the committed resolution: swift-java β `swift-java` is declared in Package.swift but has no entry in the committed `Package.resolved` beside it, so its version is resolved rather than pinned. Resolve the package and commit the updated `Package.resolved`.
FileTooLong: WinUIBackend/WinUIBackend.swift Sources/WinUIBackend/WinUIBackend.swiftβ FileTooLong β 1679 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: WinUIBackend (89-2193). The bar is 500 significant lines; this is 1179 over it, 3.36× 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: GtkCodeGen/GtkCodeGen.swift Sources/GtkCodeGen/GtkCodeGen.swiftβ FileTooLong β 646 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: GtkCodeGen (12-993). The bar is 500 significant lines; this is 146 over it, 1.29× 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.
D31 Β· IaC & Container SecurityΒ· Medium IaC Β· Γ2
Change-coupling hub: AppKitBackend.swift β DummyBackend.swift, Window.swift, Gtk3Backend.swift, GtkBackend.swift, EnvironmentValues.swift, WindowGroup.swift, WindowReference.swift, Menu.swift, UIKitBackend+Control.swift, UIKitBackend+Menu.swift, UIKitBackend.swift, WinUIBackend.swift Sources/AppKitBackend/AppKitBackend.swiftβ `Sources/AppKitBackend/AppKitBackend.swift` changes together with 12 other files β `Sources/DummyBackend/DummyBackend.swift`, `Sources/Gtk/Widgets/Window.swift`, `Sources/Gtk3Backend/Gtk3Backend.swift`, `Sources/GtkBackend/GtkBackend.swift`, `Sources/SwiftCrossUI/Environment/EnvironmentValues.swift`, `Sources/SwiftCrossUI/Scenes/WindowGroup.swift`, `Sources/SwiftCrossUI/Scenes/WindowReference.swift`, `Sources/SwiftCrossUI/Views/Menu.swift`, `Sources/UIKitBackend/UIKitBackend+Control.swift`, `Sources/UIKitBackend/UIKitBackend+Menu.swift`, `Sources/UIKitBackend/UIKitBackend.swift`, `Sources/WinUIBackend/WinUIBackend.swift` β none of which declares a dependency on it: one file is the hub of 12 separate couplings, not 12 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 12.
Change-coupling hub: GtkBackend.swift β DummyBackend.swift, WindowGroup.swift, Toggle.swift, UIKitBackend+Control.swift Sources/GtkBackend/GtkBackend.swiftβ `Sources/GtkBackend/GtkBackend.swift` changes together with 4 other files β `Sources/DummyBackend/DummyBackend.swift`, `Sources/SwiftCrossUI/Scenes/WindowGroup.swift`, `Sources/SwiftCrossUI/Views/Toggle.swift`, `Sources/UIKitBackend/UIKitBackend+Control.swift` β none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 Β· Code DuplicationΒ· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ2
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/Gtk3Backend/Gtk3Backend.swift:50β Sources/Gtk3Backend/Gtk3Backend.swift:50-62 | Sources/GtkBackend/GtkBackend.swift:59-71 | Sources/UIKitBackend/UIKitBackend.swift:108-120 | Sources/WinUIBackend/WinUIBackend.swift:115-127 β These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain β factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/SwiftCrossUI/Views/Group.swift:17β Sources/SwiftCrossUI/Views/Group.swift:17-26 | Sources/SwiftCrossUI/Views/HStack.swift:27-36 | Sources/SwiftCrossUI/Views/VStack.swift:44-53 | Sources/SwiftCrossUI/Views/ZStack.swift:28-37 β These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain β factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (23 lines × 2) Sources/AndroidBackend/AndroidViewRepresentable.swift:66β Sources/AndroidBackend/AndroidViewRepresentable.swift:66-88 | Sources/AndroidBackend/AndroidxFragmentRepresentable.swift:82-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. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/AndroidBackend/AndroidxFragmentRepresentable.swift:76` calls `getView` and `Sources/AndroidBackend/AndroidViewRepresentable.swift:65` 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.
Duplicated block (23 lines × 2) Sources/SwiftCrossUI/Views/EitherView.swift:66β Sources/SwiftCrossUI/Views/EitherView.swift:66-88 | Sources/SwiftCrossUI/Views/EitherView.swift:89-111 β 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 `Sources/SwiftCrossUI/Views/EitherView.swift:66` 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 (22 lines × 2) Sources/AppKitBackend/Features/Paths.swift:68β Sources/AppKitBackend/Features/Paths.swift:68-89 | Sources/UIKitBackend/UIKitBackend+Path.swift:26-47 β 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 (22 lines × 2) Sources/Gtk3Backend/Features/Alerts.swift:31β Sources/Gtk3Backend/Features/Alerts.swift:31-52 | Sources/GtkBackend/Features/Alerts.swift:36-57 β 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 (19 lines × 2) Sources/Gtk3Example/main.swift:9β Sources/Gtk3Example/main.swift:9-27 | Sources/GtkExample/main.swift:12-30 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Example/main.swift:9` 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 (19 lines × 2) Sources/AppKitBackend/Helpers/NSObservableSecureTextField.swift:4β Sources/AppKitBackend/Helpers/NSObservableSecureTextField.swift:4-22 | Sources/AppKitBackend/Helpers/NSObservableTextField.swift:4-22 β 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 `Sources/AppKitBackend/Helpers/NSObservableSecureTextField.swift:4` 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 (16 lines × 3) Sources/AndroidBackend/AndroidBackend+Gradients.swift:15β Sources/AndroidBackend/AndroidBackend+Gradients.swift:15-30 | Sources/AndroidBackend/AndroidBackend+Gradients.swift:58-73 | Sources/AndroidBackend/AndroidBackend+Gradients.swift:103-118 β 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 `Sources/AndroidBackend/AndroidBackend+Gradients.swift:15` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 3) Sources/AppKitBackend/Features/SecureFields.swift:35β Sources/AppKitBackend/Features/SecureFields.swift:35-50 | Sources/AppKitBackend/Features/TextEditors.swift:32-47 | Sources/AppKitBackend/Features/TextFields.swift:35-50 β before extracting anything, compare `Sources/AppKitBackend/Features/SecureFields.swift` and `Sources/AppKitBackend/Features/TextFields.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/AppKitBackend/Features/SecureFields.swift:35` 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 (10 lines × 4) Sources/SwiftCrossUI/Views/Group.swift:17β Sources/SwiftCrossUI/Views/Group.swift:17-26 | Sources/SwiftCrossUI/Views/HStack.swift:27-36 | Sources/SwiftCrossUI/Views/VStack.swift:44-53 | Sources/SwiftCrossUI/Views/ZStack.swift:28-37 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Group.swift` and `Sources/SwiftCrossUI/Views/HStack.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 4) Sources/SwiftCrossUI/Views/Group.swift:28β Sources/SwiftCrossUI/Views/Group.swift:28-37 | Sources/SwiftCrossUI/Views/HStack.swift:38-47 | Sources/SwiftCrossUI/Views/VStack.swift:55-68 | Sources/SwiftCrossUI/Views/ZStack.swift:39-49 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Group.swift` and `Sources/SwiftCrossUI/Views/HStack.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/Group.swift:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 3) Sources/SwiftCrossUI/Scenes/AlertScene.swift:50β Sources/SwiftCrossUI/Scenes/AlertScene.swift:50-59 | Sources/SwiftCrossUI/Scenes/Window.swift:67-76 | Sources/SwiftCrossUI/Scenes/WindowGroup.swift:80-89 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from all 3 call sites, so a change lands once.
Duplicated block (10 lines × 3) Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:52β Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:52-61 | Sources/SwiftCrossUI/Views/Gradients/LinearGradient.swift:34-43 | Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift:38-47 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift` and `Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 5) Sources/SwiftCrossUI/Views/Modifiers/FocusableModifier.swift:16β Sources/SwiftCrossUI/Views/Modifiers/FocusableModifier.swift:16-26 | Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnHoverModifier.swift:21-31 | Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnTapGestureModifier.swift:55-65 | Sources/SwiftCrossUI/Views/Modifiers/HelpModifier.swift:21-31 | Sources/SwiftCrossUI/Views/Modifiers/Style/CornerRadiusModifier.swift:15-21 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach β a location they all depend on today, or a new shared one if there is none β and call it from each site; until then, every change has to be made 5 times.
Duplicated block (7 lines × 5) Sources/SwiftCrossUI/Views/Modifiers/Layout/AspectRatioModifier.swift:50β Sources/SwiftCrossUI/Views/Modifiers/Layout/AspectRatioModifier.swift:50-56 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FixedSizeModifier.swift:43-49 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:122-128 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:223-229 | Sources/SwiftCrossUI/Views/Modifiers/Layout/PaddingModifier.swift:104-110 β there are 5 copies across 4 file(s) β more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
WinUIBackend.applyActions (cyclomatic 29) Sources/WinUIBackend/WinUIBackend.swift:1889β WinUIBackend.applyActions has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GtkCodeGen.generateClass (cyclomatic 24) Sources/GtkCodeGen/GtkCodeGen.swift:381β GtkCodeGen.generateClass 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.
Locale.windowsCurrent (cyclomatic 20) Sources/WinUIBackend/WindowsLocale.swift:48β Locale.windowsCurrent has cyclomatic complexity 20 (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.
Gtk3Backend.renderPathActions (cyclomatic 17) Sources/Gtk3Backend/Features/Paths.swift:109β Gtk3Backend.renderPathActions 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.
GtkBackend.renderPathActions (cyclomatic 17) Sources/GtkBackend/Features/Paths.swift:105β GtkBackend.renderPathActions 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.
ScrollView.computeLayout (cyclomatic 17) Sources/SwiftCrossUI/Views/ScrollView.swift:53β ScrollView.computeLayout 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.
Analyzer.analyze (cyclomatic 16) APITool/Sources/APITool/Analyzer.swift:23β Analyzer.analyze 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.
AppKitBackend.applyActions (cyclomatic 16) Sources/AppKitBackend/Features/Paths.swift:91β AppKitBackend.applyActions 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.
SecondaryClickListener.onTouch (cyclomatic 16) Sources/AndroidBackend/Kotlin/SecondaryClickListener.kt:23β SecondaryClickListener.onTouch 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.
Hotspot: Sources/AndroidBackend/AndroidBackend+Locale.swift Sources/AndroidBackend/AndroidBackend+Locale.swift:39β Sources/AndroidBackend/AndroidBackend+Locale.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AndroidBackend.getCurrentCalendarAndLocale at line 39. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-06-23..2026-09-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-23 11:34:05 +10:00' --until='2026-09-21 11:34:05 +10:00' --full-history --no-merges -- Sources/AndroidBackend/AndroidBackend+Locale.swift`: 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.
WinUIBackend.applyActions (cognitive 53) Sources/WinUIBackend/WinUIBackend.swift:1889β WinUIBackend.applyActions has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (41 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: Sources/WinUIBackend/WinUIBackend.swift holds 2 of the 22 methods over the threshold β including the worst β and 58 of the 144 points over it (40%), 2.9× the next-largest file (Sources/GtkCodeGen/GtkCodeGen.swift at 20). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
WinUIBackend.updatePicker (cognitive 35) Sources/WinUIBackend/WinUIBackend.swift:1229β WinUIBackend.updatePicker has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (21 pts), if/else 9 (14 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This file is where this pass's cognitive complexity CONCENTRATES: Sources/WinUIBackend/WinUIBackend.swift holds 2 of the 22 methods over the threshold β including the worst β and 58 of the 144 points over it (40%), 2.9× the next-largest file (Sources/GtkCodeGen/GtkCodeGen.swift at 20). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
GtkCodeGen.generateClass (cognitive 32) Sources/GtkCodeGen/GtkCodeGen.swift:381β GtkCodeGen.generateClass has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, loops 6 (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.
Analyzer.analyze (cognitive 24) APITool/Sources/APITool/Analyzer.swift:23β Analyzer.analyze has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 6 (7 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.
ForEach.computeLayout (cognitive 22) Sources/SwiftCrossUI/Views/ForEach.swift:66β ForEach.computeLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 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.
TimePicker.update (cognitive 21) Sources/GtkBackend/Helpers/TimePicker.swift:73β TimePicker.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UIKitBackend.setPresentationDetents (cognitive 21) Sources/UIKitBackend/UIKitBackend+Sheet.swift:128β UIKitBackend.setPresentationDetents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 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.
ScrollView.computeLayout (cognitive 20) Sources/SwiftCrossUI/Views/ScrollView.swift:53β ScrollView.computeLayout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 6, ternaries 2, loops 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.
SecondaryClickListener.onTouch (cognitive 20) Sources/AndroidBackend/Kotlin/SecondaryClickListener.kt:23β SecondaryClickListener.onTouch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (6 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.
Gtk3Backend.renderPathActions (cognitive 19) Sources/Gtk3Backend/Features/Paths.swift:109β Gtk3Backend.renderPathActions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 pts), ternaries 1 (3 pts), loops 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.
GtkBackend.renderPathActions (cognitive 19) Sources/GtkBackend/Features/Paths.swift:105β GtkBackend.renderPathActions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 pts), ternaries 1 (3 pts), loops 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.
AppKitBackend.updatePicker (cognitive 18) Sources/AppKitBackend/Features/Pickers.swift:24β AppKitBackend.updatePicker has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AppKitBackend.setSize (cognitive 18) Sources/AppKitBackend/Features/Widgets.swift:32β AppKitBackend.setSize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Image.computeLayout (cognitive 18) Sources/SwiftCrossUI/Views/Image.swift:76β Image.computeLayout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 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.
AndroidBackend.apply (cognitive 17) Sources/AndroidBackend/AndroidBackend+Paths.swift:119β AndroidBackend.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
AppKitBackend.applyActions (cognitive 17) Sources/AppKitBackend/Features/Paths.swift:91β AppKitBackend.applyActions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
GtkCodeGen.generateSources (cognitive 17) Sources/GtkCodeGen/GtkCodeGen.swift:114β GtkCodeGen.generateSources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 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.
ViewGraphSnapshotter.match (cognitive 17) Sources/SwiftCrossUI/ViewGraph/ViewGraphSnapshotter.swift:112β ViewGraphSnapshotter.match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 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.
CastBackendMacro.expansion (cognitive 17) Sources/SwiftCrossUIMacrosPlugin/CastBackendMacro.swift:8β CastBackendMacro.expansion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 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.
EntryMacro.ensureValidApplication (cognitive 17) Sources/SwiftCrossUIMacrosPlugin/EntryMacro.swift:95β EntryMacro.ensureValidApplication has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FocusStateManager.observeValue (cognitive 16) Sources/AppKitBackend/Helpers/FocusStateManager.swift:17β FocusStateManager.observeValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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.
GtkCodeGen.convertCamelCasingToSnake (cognitive 16) Sources/GtkCodeGen/GtkCodeGen.swift:919β GtkCodeGen.convertCamelCasingToSnake 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.
D4 Β· Code DuplicationΒ· Near-duplicate member family (3 members, 28 shared lines) Β· Γ1
Near-duplicate member family (3 members, 28 shared lines) Sources/Gtk3Backend/Features/Colors.swift:18β Sources/Gtk3Backend/Features/Colors.swift:18-47 | Sources/GtkBackend/Features/Colors.swift:17-46 | Sources/WinUIBackend/WinUIBackend+Color.swift:5-50 β These 3 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (80 shared lines) Sources/Gtk3Example/main.swift:9β Sources/Gtk3Example/main.swift:9-112 | Sources/GtkExample/main.swift:12-137 β These two members are variants of one another: 80 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain β factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (102 lines × 2) Sources/Gtk3Backend/Features/Paths.swift:109β Sources/Gtk3Backend/Features/Paths.swift:109-210 | Sources/GtkBackend/Features/Paths.swift:105-206 β before extracting anything, compare `Sources/Gtk3Backend/Features/Paths.swift` and `Sources/GtkBackend/Features/Paths.swift` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Gtk3Backend/Features/Paths.swift:106` calls `queueDraw` and `Sources/GtkBackend/Features/Paths.swift:102` 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 (79 lines × 2) Sources/Gtk3Backend/Features/ApplicationMenus.swift:19β Sources/Gtk3Backend/Features/ApplicationMenus.swift:19-97 | Sources/GtkBackend/Features/ApplicationMenus.swift:19-97 β before extracting anything, compare `Sources/Gtk3Backend/Features/ApplicationMenus.swift` and `Sources/GtkBackend/Features/ApplicationMenus.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (61 lines × 2) Sources/Gtk3Backend/Features/Paths.swift:44β Sources/Gtk3Backend/Features/Paths.swift:44-104 | Sources/GtkBackend/Features/Paths.swift:42-102 β before extracting anything, compare `Sources/Gtk3Backend/Features/Paths.swift` and `Sources/GtkBackend/Features/Paths.swift` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/Paths.swift:44` 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. β These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/Gtk3Backend/Features/Paths.swift:106` calls `queueDraw` and `Sources/GtkBackend/Features/Paths.swift:103` does not β after which the two agree again for 4 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 (49β53 lines × 2) Sources/Gtk3Backend/Gtk3Backend.swift:64β Sources/Gtk3Backend/Gtk3Backend.swift:64-112 | Sources/GtkBackend/GtkBackend.swift:73-125 β `Sources/Gtk3Backend/Gtk3Backend.swift` and `Sources/GtkBackend/GtkBackend.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 3 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Gtk3Backend.swift:64` 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 (38β39 lines × 2) Sources/Gtk3Backend/Features/FileSaveDialogs.swift:41β Sources/Gtk3Backend/Features/FileSaveDialogs.swift:41-78 | Sources/GtkBackend/Features/FileSaveDialogs.swift:41-79 β before extracting anything, compare `Sources/Gtk3Backend/Features/FileSaveDialogs.swift` and `Sources/GtkBackend/Features/FileSaveDialogs.swift` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/FileSaveDialogs.swift:41` 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 (36 lines × 2) Sources/Gtk3Backend/Features/RevealFiles.swift:7β Sources/Gtk3Backend/Features/RevealFiles.swift:7-42 | Sources/GtkBackend/Features/RevealFiles.swift:7-42 β before extracting anything, compare `Sources/Gtk3Backend/Features/RevealFiles.swift` and `Sources/GtkBackend/Features/RevealFiles.swift` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (33β36 lines × 2) Sources/SwiftCrossUI/Layout/LayoutSystem.swift:288β Sources/SwiftCrossUI/Layout/LayoutSystem.swift:288-320 | Sources/SwiftCrossUI/Layout/LayoutSystem.swift:587-622 β 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 `Sources/SwiftCrossUI/Layout/LayoutSystem.swift:288` 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 (34 lines × 2) Sources/SwiftCrossUI/Views/Shapes/Shape.swift:92β Sources/SwiftCrossUI/Views/Shapes/Shape.swift:92-125 | Sources/SwiftCrossUI/Views/Shapes/StyledShape.swift:71-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 `Sources/SwiftCrossUI/Views/Shapes/Shape.swift:92` 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 (28 lines × 2) Sources/SwiftCrossUI/Views/SecureField.swift:51β Sources/SwiftCrossUI/Views/SecureField.swift:51-78 | Sources/SwiftCrossUI/Views/TextField.swift:110-137 β 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 `Sources/SwiftCrossUI/Views/SecureField.swift:51` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21β22 lines × 2) Sources/UIKitBackend/UIKitBackend+Gradient.swift:58β Sources/UIKitBackend/UIKitBackend+Gradient.swift:58-78 | Sources/UIKitBackend/UIKitBackend+Gradient.swift:115-136 β 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 `Sources/UIKitBackend/UIKitBackend+Gradient.swift:58` 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 (21 lines × 2) Sources/AppKitBackend/Helpers/LinearGradientView.swift:10β Sources/AppKitBackend/Helpers/LinearGradientView.swift:10-30 | Sources/AppKitBackend/Helpers/RadialGradientView.swift:8-28 β 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 `Sources/AppKitBackend/Helpers/LinearGradientView.swift:10` 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 (15β21 lines × 2) Sources/GtkCodeGen/GtkCodeGen.swift:568β Sources/GtkCodeGen/GtkCodeGen.swift:568-588 | Sources/GtkCodeGen/GtkCodeGen.swift:665-679 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18β21 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:74β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:74-91 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:166-186 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:74` 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 (18β19 lines × 2) Sources/GtkBackend/Features/Core.swift:66β Sources/GtkBackend/Features/Core.swift:66-83 | Sources/GtkBackend/Features/Core.swift:93-111 β 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 `Sources/GtkBackend/Features/Core.swift:66` 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 (17β18 lines × 2) Sources/Gtk3Backend/Features/Core.swift:87β Sources/Gtk3Backend/Features/Core.swift:87-103 | Sources/Gtk3Backend/Features/Core.swift:113-130 β 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 `Sources/Gtk3Backend/Features/Core.swift:87` 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 (18 lines × 2) Sources/Gtk3Example/main.swift:91β Sources/Gtk3Example/main.swift:91-108 | Sources/GtkExample/main.swift:116-133 β `Sources/Gtk3Example/main.swift` and `Sources/GtkExample/main.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 6 separate duplicated blocks between them, totalling at least 80 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (16β18 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:93β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:93-108 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:344-361 β both copies are in the same file, so extract the block into one function there and call it from each site β the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15β17 lines × 2) Sources/SwiftCrossUI/Views/VStack.swift:58β Sources/SwiftCrossUI/Views/VStack.swift:58-74 | Sources/SwiftCrossUI/Views/ZStack.swift:42-56 β before extracting anything, compare `Sources/SwiftCrossUI/Views/VStack.swift` and `Sources/SwiftCrossUI/Views/ZStack.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/VStack.swift:58` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13β15 lines × 3) Sources/SwiftCrossUI/Views/ProgressView.swift:215β Sources/SwiftCrossUI/Views/ProgressView.swift:215-227 | Sources/SwiftCrossUI/Views/SecureField.swift:26-40 | Sources/SwiftCrossUI/Views/TextField.swift:85-99 β the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β a file they already depend on, or a new one alongside them β and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/ProgressView.swift:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14β15 lines × 2) Sources/Gtk3Backend/Features/FileSaveDialogs.swift:7β Sources/Gtk3Backend/Features/FileSaveDialogs.swift:7-21 | Sources/GtkBackend/Features/FileSaveDialogs.swift:7-20 β before extracting anything, compare `Sources/Gtk3Backend/Features/FileSaveDialogs.swift` and `Sources/GtkBackend/Features/FileSaveDialogs.swift` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/FileSaveDialogs.swift:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) Sources/SwiftCrossUI/Views/Group.swift:31β Sources/SwiftCrossUI/Views/Group.swift:31-45 | Sources/SwiftCrossUI/Views/HStack.swift:41-55 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Group.swift` and `Sources/SwiftCrossUI/Views/HStack.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/Group.swift:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β a one-line delegation has no helper inside it to lift β so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13β14 lines × 3) Sources/SwiftCrossUI/Views/Group.swift:55β Sources/SwiftCrossUI/Views/Group.swift:55-67 | Sources/SwiftCrossUI/Views/HStack.swift:68-81 | Sources/SwiftCrossUI/Views/VStack.swift:91-104 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Group.swift` and `Sources/SwiftCrossUI/Views/HStack.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCrossUI/Views/Group.swift:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 4) Sources/Gtk3Backend/Gtk3Backend.swift:50β Sources/Gtk3Backend/Gtk3Backend.swift:50-62 | Sources/GtkBackend/GtkBackend.swift:59-71 | Sources/UIKitBackend/UIKitBackend.swift:108-120 | Sources/WinUIBackend/WinUIBackend.swift:115-127 β `Sources/Gtk3Backend/Gtk3Backend.swift` and `Sources/GtkBackend/GtkBackend.swift` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other β this scan matched 3 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (11β13 lines × 2) Sources/Gtk3Backend/Features/Core.swift:71β Sources/Gtk3Backend/Features/Core.swift:71-81 | Sources/GtkBackend/Features/Core.swift:48-60 β 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 (3β12 lines × 6) Sources/Gtk3Backend/Features/Colors.swift:18β Sources/Gtk3Backend/Features/Colors.swift:18-27 | Sources/Gtk3Backend/Features/Colors.swift:38-40 | Sources/GtkBackend/Features/Colors.swift:17-26 | Sources/GtkBackend/Features/Colors.swift:37-39 | Sources/WinUIBackend/WinUIBackend+Color.swift:5-16 | Sources/WinUIBackend/WinUIBackend+Color.swift:35-39 β before extracting anything, compare `Sources/Gtk3Backend/Features/Colors.swift` and `Sources/GtkBackend/Features/Colors.swift` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/Colors.swift:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. β These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Gtk3Backend/Features/Colors.swift:15` calls `set`, `CSSProperty` and `Sources/GtkBackend/Features/Colors.swift:14` does not β after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8β11 lines × 2) Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:89β Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:89-96 | Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:262-272 β 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 `Sources/SwiftCrossUI/Views/Shapes/RoundedRectangle.swift:89` 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β8 lines × 3) Sources/Gtk3Backend/Features/Colors.swift:32β Sources/Gtk3Backend/Features/Colors.swift:32-37 | Sources/GtkBackend/Features/Colors.swift:31-36 | Sources/WinUIBackend/WinUIBackend+Color.swift:26-33 β before extracting anything, compare `Sources/Gtk3Backend/Features/Colors.swift` and `Sources/GtkBackend/Features/Colors.swift` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/Colors.swift:32` 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 (3β6 lines × 6) Sources/Gtk3Backend/Features/Colors.swift:29β Sources/Gtk3Backend/Features/Colors.swift:29-31 | Sources/Gtk3Backend/Features/Colors.swift:42-47 | Sources/GtkBackend/Features/Colors.swift:28-30 | Sources/GtkBackend/Features/Colors.swift:41-46 | Sources/WinUIBackend/WinUIBackend+Color.swift:20-24 | Sources/WinUIBackend/WinUIBackend+Color.swift:43-50 β before extracting anything, compare `Sources/Gtk3Backend/Features/Colors.swift` and `Sources/GtkBackend/Features/Colors.swift` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Gtk3Backend/Features/Colors.swift:29` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (29 lines × 2) Sources/Gtk3Backend/Features/SecureFields.swift:6β Sources/Gtk3Backend/Features/SecureFields.swift:6-34 | Sources/GtkBackend/Features/SecureFields.swift:6-34 β before extracting anything, compare `Sources/Gtk3Backend/Features/SecureFields.swift` and `Sources/GtkBackend/Features/SecureFields.swift` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it β treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) Sources/CursesBackend/CursesBackend.swift:45β Sources/CursesBackend/CursesBackend.swift:45-53 | Sources/LVGLBackend/LVGLBackend.swift:81-89 | Sources/QtBackend/QtBackend.swift:65-73 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (13 lines × 3) Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnHoverModifier.swift:41β Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnHoverModifier.swift:41-53 | Sources/SwiftCrossUI/Views/Modifiers/Handlers/OnTapGestureModifier.swift:75-87 | Sources/SwiftCrossUI/Views/Modifiers/HelpModifier.swift:41-53 β the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
Duplicated block (8 lines × 4) Sources/SwiftCrossUI/Views/Modifiers/Layout/FixedSizeModifier.swift:51β Sources/SwiftCrossUI/Views/Modifiers/Layout/FixedSizeModifier.swift:51-58 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:130-137 | Sources/SwiftCrossUI/Views/Modifiers/Layout/FrameModifier.swift:231-238 | Sources/SwiftCrossUI/Views/Modifiers/Layout/PaddingModifier.swift:112-119 β there are 4 copies across 3 file(s) β more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 24) Sources/Gtk3Backend/InspectionModifiers.swift:14β Sources/Gtk3Backend/InspectionModifiers.swift:14-19 | Sources/Gtk3Backend/InspectionModifiers.swift:23-28 | Sources/Gtk3Backend/InspectionModifiers.swift:32-37 | Sources/Gtk3Backend/InspectionModifiers.swift:41-46 | Sources/Gtk3Backend/InspectionModifiers.swift:50-55 | Sources/Gtk3Backend/InspectionModifiers.swift:59-64 | Sources/Gtk3Backend/InspectionModifiers.swift:68-73 | Sources/Gtk3Backend/InspectionModifiers.swift:100-105 | Sources/Gtk3Backend/InspectionModifiers.swift:109-114 | Sources/Gtk3Backend/InspectionModifiers.swift:118-123 | Sources/Gtk3Backend/InspectionModifiers.swift:127-132 | Sources/Gtk3Backend/InspectionModifiers.swift:136-141 | Sources/GtkBackend/InspectionModifiers.swift:14-19 | Sources/GtkBackend/InspectionModifiers.swift:23-28 | Sources/GtkBackend/InspectionModifiers.swift:32-37 | Sources/GtkBackend/InspectionModifiers.swift:41-46 | Sources/GtkBackend/InspectionModifiers.swift:60-65 | Sources/GtkBackend/InspectionModifiers.swift:69-74 | Sources/GtkBackend/InspectionModifiers.swift:78-83 | Sources/GtkBackend/InspectionModifiers.swift:110-115 | Sources/GtkBackend/InspectionModifiers.swift:119-124 | Sources/GtkBackend/InspectionModifiers.swift:128-133 | Sources/GtkBackend/InspectionModifiers.swift:137-142 | Sources/GtkBackend/InspectionModifiers.swift:146-151 β there are 24 copies across 2 file(s) β more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 24 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:45β Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift:45-50 | Sources/SwiftCrossUI/Views/Gradients/LinearGradient.swift:27-32 | Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift:31-36 β before extracting anything, compare `Sources/SwiftCrossUI/Views/Gradients/AngularGradient.swift` and `Sources/SwiftCrossUI/Views/Gradients/RadialGradient.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β extracting one helper per block leaves the fork in place.
Swallowed exception (empty catch) Sources/GtkBackend/Features/RevealFiles.swift:32β 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.
Duplicated predicate Sources/SwiftCrossUI/Views/Group.swift:35β `children is TupleViewChildren || children is EmptyViewChildren` appears character-identically in 4 files β Sources/SwiftCrossUI/Views/Group.swift, Sources/SwiftCrossUI/Views/HStack.swift, Sources/SwiftCrossUI/Views/VStack.swift, Sources/SwiftCrossUI/Views/ZStack.swift. 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 Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift:86β `gtkWidget.expandHorizontally && gtkWidget.useExpandHorizontally` appears character-identically in 2 files β Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift, Sources/GtkBackend/GtkWidgetRepresentable.swift. 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 Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift:87β `gtkWidget.expandVertically && gtkWidget.useExpandVertically` appears character-identically in 2 files β Sources/Gtk3Backend/Gtk3WidgetRepresentable.swift, Sources/GtkBackend/GtkWidgetRepresentable.swift. 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 Sources/AppKitBackend/Features/TextViews.swift:28β `limitedHeight < height || lineLimitSettings.reservesSpace` appears character-identically in 2 files β Sources/AppKitBackend/Features/TextViews.swift, Sources/UIKitBackend/UIKitBackend+Passive.swift. 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 Sources/CursesBackend/CursesBackend.swift:46β `os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)` appears character-identically in 3 files β Sources/CursesBackend/CursesBackend.swift, Sources/LVGLBackend/LVGLBackend.swift, Sources/QtBackend/QtBackend.swift. 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.
Off-boarding risk: anonymized user #1 β If anonymized user #1 becomes unavailable, 14 significant file(s) lose their only recent owner: Sources/WinUIBackend/WinUIBackend+Button.swift, APITool/Sources/APITool/Analyzer.swift, Sources/SwiftCrossUIMacrosPlugin/HotReloading/HotReloadableAppMacro.swift, Sources/WinUIBackend/InstancingHelpers.swift, APITool/Sources/APITool/Context.swift, APITool/Sources/APITool/StubGenerator.swift, APITool/Sources/APITool/Differ.swift, Sources/SwiftCrossUI/Backend/BackendFeatures/Core/Core.swift (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 β If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: Sources/AndroidBackend/AndroidBackend+Locale.swift, Sources/AndroidBackend/AndroidBackend+Menu.swift, Sources/WinUIBackend/WindowsLocale.swift, Sources/AndroidBackend/ActivityDelegate.swift, Benchmarks/LayoutPerformanceBenchmark/EnvironmentHeavyView.swift, Sources/AndroidBackend/Kotlin/datepickers/DateButton.kt, Sources/AndroidBackend/Kotlin/AlertFragment.kt, Sources/AndroidBackend/AndroidBackend+Toggles.swift (+2 more). Pair on, review, or document these before any departure.
D16 Β· Bus FactorΒ· Further sole-owners (lower concentration) Β· Γ1
Further sole-owners (lower concentration) β 2 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 (27 single-owned of 262 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 262 of the 798 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (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: Sources/SwiftCrossUI/State/ForEachField.swift, Sources/SwiftCrossUI/Backend/ResolvedMenu.swift, Sources/Gtk3Example/main.swift.
No ADRs found β No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these β unnumbered files outside any recognised directory, without those headings β is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 Β· Project CohesionΒ· Projects may be oversized for their cohesion Β· Γ1
Projects may be oversized for their cohesion β 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (48192 LoC, 1203 module-visible types across 73 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.
No ADRs β No Architecture Decision Records found β no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 Β· Architecture documentationΒ· No architecture diagram/doc Β· Γ1
No architecture diagram/doc β No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape β no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is β¦" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document β not evidence that nobody wrote the shape down.
P10 Β· Library API & versioningΒ· Large public API surface Β· Γ1
Large public API surface β 778/1078 types (72%) declared in the published library are public. For a library, every public type is a stability contract β keep implementation types off the surface and expose only the intended API.
P2 Β· ObservabilityΒ· Logging is not universal Β· Γ1
Logging is not universal β Only 1/2 runnable modules use logging (modules with no entry point or server are excluded β they are libraries a runnable module hosts). Silent: `APITool`.
P3 Β· Security & performance toolingΒ· No SAST Β· Γ1
No SAST REDACTED:7β No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (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 25012 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen β if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No changelog β No CHANGELOG/HISTORY/RELEASES file β what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Silent fallback default in catch Sources/SwiftCrossUIMacrosPlugin/EntryMacro.swift:58β `expansion` turns every thrown error into `[]` β a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Outdated: swift-collections β `swift-collections` is resolved at 1.6.0, but 1.7.5 is the newest release tagged on https://github.com/apple/swift-collections within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major β so `swift package update swift-collections` reaches this one with no change to Package.swift.
Outdated: swift-log β `swift-log` is resolved at 1.14.0, but 1.16.2 is the newest release tagged on https://github.com/apple/swift-log.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major β so `swift package update swift-log` reaches this one with no change to Package.swift.
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.
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 106 file(s) β `Examples/Sources/AdvancedCustomizationExample/AdvancedCustomizationApp.swift`, `Examples/Sources/ColorsExample/ColorsApp.swift`, `Examples/Sources/ControlsExample/ControlsApp.swift`, `Examples/Sources/CounterExample/CounterApp.swift`, `Examples/Sources/ForEachExample/ForEachApp.swift`, β¦ (+101 more) β so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable β No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a18753-8d7f-7d62-9722-41013f5cf38c Β· every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 39 Β· Warnings: 382 Β· Recommendations: 22 Β· Info: 2 β Appendix A Β· all findings Β· full markdown report.
Generated by Watchdog β deterministic code-health analysis. 29-10-2026 @ 11:02 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric β drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.