Public report — RepoBar, published 1 Oct 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this surveyFiledcd_b9a38f0e1ad4463b8b2c072b5a3f4377
Filed 1 October 2026, 09:34 UTC
Public
Medium · 44,954 LoC · 4 projects · rebuild ~0.5 person-years · weakest lens: Readiness (55%)
Findings by grade
5 critical293 serious11 minor35 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
1 October 2026, 09:11 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
294findings with an exact file:lineof 309 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
56/138dimensions across the health lenses44954 LoC · 4 projects — wide & deep
Preview (pre-1.0). This repo hasn't declared a stable release, so it's judged against a relaxed, pre-production bar.
This system holds a strong overall standing with a score of 65%, indicating a healthy asset that is largely well-structured but carries specific operational risks. The codebase is medium-sized, comprising nearly 45,000 lines of production code, yet it represents a modest investment to rebuild—approximately half a person-year or €70,000. This low rebuild cost suggests the core logic is concise and not bloated with boilerplate, making the system agile but also meaning that any operational failures can be costly in terms of immediate business disruption.
The primary risk lies in Production Readiness, which scores only 55%. While the code itself is clean and the architecture is robust, the system lacks the necessary safeguards for safe daily operation. This gap means that deploying changes carries a higher risk of defects reaching users, potentially leading to outages or reliability issues that erode customer trust. The lack of measured test coverage and incomplete documentation further compounds this, making it difficult for new team members to pick up the work or for the current team to confidently release updates without fear of regression.
Conversely, the system’s Security Posture and Code Health are genuine strengths. With a security score of 93% and strong code health at 79%, the foundation is solid. The architecture is mature and well-modeled, ensuring that changes do not ripple unpredictably through the system. These areas require little immediate attention and provide a stable base for improvement. However, the absence of measured data on event-driven patterns and performance means the full picture is partial; we cannot yet guarantee how the system behaves under load or in complex asynchronous scenarios.
To maximize leverage, the first action must be to add a static analysis step to the CI pipeline. Implementing a tool like CodeQL or Semgrep will automatically catch security regressions before they merge, turning a manual oversight into a reliable guardrail. This single change addresses the most critical gap in readiness with minimal effort. Once this is in place, the team can focus on expanding test coverage for unreached modules to further stabilize the release process.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
102 finding(s) are new versus the previous scan (2026-09-15) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
D22 · Redundant naming with unclear distinction. 'repositoryList' and 'cachedRepositoryList' appear to perform the same logical operation (fetching a list of repositories) but differ only by a 'cached' prefix. It is unclear if 'repositoryList' is uncached, or if 'cachedRepositoryList' is the primary method and 'repositoryList' is an alias/legacy. This creates confusion about which method to use for standard operations.
D22 · Inconsistent naming for content retrieval. 'repoContents' returns a list of items (metadata/directory listing), while 'repoFileContents' returns raw data. The naming convention 'repoContents' vs 'repoFileContents' is slightly inconsistent with the return types. 'Contents' usually implies a list, while 'FileContents' implies raw data. However, 'repoContents' with an optional path suggests it might also fetch a single file if a path is provided, but it returns [RepoContentItem]. This ambiguity makes it unclear if 'repoContents' is strictly for directories or if it handles files differently than 'repoFileContents'.
D22 · Ambiguous cache clearing operations. 'clearCache' and 'clearRepoDetailCache' suggest different scopes of caching. It is unclear if 'clearCache' is a global clear that includes 'repoDetailCache', or if they are distinct caches. This leads to potential redundancy or confusion about which method to call to clear specific data.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.9× (at 65% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.5 person-years of build effort (about ~€70,000 to rebuild). Its weakest lens is Readiness at 55% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.9× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
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.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.5 person-years to rebuild), and its weakest lens is Readiness at 55%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
10 modules, 21 dependencies. 1 dependency cycle across 2 modules, marked above the diagonal.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
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
A02:2021 — Cryptographic Failures
4
High / Critical
A03:2021 — Injection
1
High / Critical
Roadmap
First, resolve the leaked secret in REDACTED and integrate a SAST step into CI to prevent security regressions from reaching production. Next, establish type checking in CI and expand test coverage to include currently unreached production modules. Finally, document significant architectural decisions in a dedicated directory to preserve design context and rationale.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Resolve the 4 No assertions finding(s) in Test Quality — start with DiagnosticsLoggerTests.swift, RepoBarCoreModelsTests.swift, UserSettingsCoverageTests.swift.
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 — 5
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 — 293
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 — 11
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 35
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. 51 of 56 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.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 — 56 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, 294 of 309 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.
D10 Test Quality — 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. The 125 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 2 test source file(s) (.mjs, .ts) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
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, .mjs, .ts) and this repository declares a SwiftPM test suite (RepoBar), 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. This repository declares package.json, but the licence verdict published here was taken over its SwiftPM package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (21 contributor(s) across 1053 commit(s) sampled, automation and bot accounts excluded). One of them holds 97% of the history; the other 20 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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. `RepoBariOS/Sources/App/AppModel.swift`, `RepoBariOS/Sources/App/RepoBariOSApp.swift`, `RepoBariOS/Sources/Models/RepoDetailModel.swift`, `Sources/RepoBar/App/AppState+Accounts.swift`, `Sources/RepoBar/App/AppState+Activity.swift`, … (+33 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.
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.
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.
C4 Data Retention — 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 retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — 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 data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
PF3 Async & latency hygiene — 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. Those languages colour their functions async, so blocking inside them is the same defect this card counts elsewhere, but their blocking vocabulary is not modelled yet. That is a gap in this analyzer's language reach — not a finding that the code is free of it.
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.
X1 Async correctness — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X12 Unreachable branch — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X13 Undrained process stream — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X14 Bypassable address classification — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X15 Unvalidated length from an untrusted reader — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X16 Unfloored truncation loop — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X17 Uncapped recursion over a caller-supplied document — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X18 Disposal-pattern correctness — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X19 Unrestored process-global state — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X20 Mistyped argument guard — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X21 Side-effecting pattern guard — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X22 Contradicted release guard — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X23 Unguarded diagnostic materialisation — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X26 Unsynchronised callback handoff — 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 Java, Kotlin and Scala source only, and no C# was loaded, no Java, Kotlin or Scala was found, and this repository's Swift 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.
X27 Collection changed while being enumerated — 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 Java and Rust source only, and no C# was loaded and no Java or Rust 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.
X28 Index access outside its own emptiness guard — 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 Scala source only, and no C# was loaded and no Scala 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.
X3 Exception handling — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X30 Support guard that admits what it rejects — 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 Scala source only, and no C# was loaded and no Scala 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.
X4 Structured logging — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X5 Nullable reference types — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X7 Silent fallback defaults — 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust, Go, Java and Kotlin), and its Swift source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
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 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of 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.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (5): D19, D21, D22, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
30 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SettingsSupport.swift.applySetting at 67. A further 8 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 HelpTarget.from at 49 — they are counted neither in the figure above nor in this dimension's score. 5 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/repobarcli/CLIHelp.swift (HelpTarget.from at 49), Sources/RepoBarCore/Settings/MenuCustomization.swift (RepoSubmenuItemID.title at 23), RepoBariOS/Sources/Views/ActivityView.swift (ActivityRow.symbolName at 20), Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift (ActivityMenuCoordinator.activitySymbolName at 20), Sources/RepoBarCore/API/GitHubModels.swift (RepoEvent.displayName at 20). 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.
+ 25 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 SettingsSupport.swift.applySetting (cyclomatic 67) finding(s) in Cyclomatic Complexity — start with SettingsSupport.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 CLIArgumentNormalizer.normalize (cyclomatic 52) finding(s) in Cyclomatic Complexity — start with CLIArgumentNormalizer.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45) finding(s) in Cyclomatic Complexity — start with RepoSubmenuBuilder.swift. — One of this dimension's main actionable groups (1 warning-level).
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.
+ 56 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 SettingsSupport.swift.applySetting (cognitive 59) finding(s) in Cognitive Complexity — start with SettingsSupport.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 CLIArgumentNormalizer.normalize (cognitive 53) finding(s) in Cognitive Complexity — start with CLIArgumentNormalizer.swift. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 AccountSettingsView.body (cognitive 52) finding(s) in Cognitive Complexity — start with AccountSettingsView.swift. — One of this dimension's main actionable groups (1 warning-level).
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 Classes8.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 12 MethodTooLong finding(s) in God Classes — start with StatusBarMenuBuilder.swift (2), StatusBarMenuManager.swift, RepoDetailView.swift. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 9 TooManyMethods finding(s) in God Classes — start with AppState.swift, StatusBarMenuManager.swift, GitHubRestAPI.swift. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 5 ClassTooLong finding(s) in God Classes — start with LocalGitMenuCoordinator.swift, GitHubRestAPI.swift, AccountSettingsView.swift. — One of this dimension's main actionable groups (5 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.
138 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 53 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with OAuthCoordinator.swift (2), LocalGitService.swift (2), GitHubPullRequestNotificationRunner.swift. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with AppModel.swift, RepoListView.swift, AccountSettingsView.swift. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 10 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with AppModel.swift, AppState+IssueNavigation.swift, LocalBranchMenuRowView.swift. — One of this dimension's main actionable groups (10 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 · Coupling8.0 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
4 production modules (npm+SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.
Off the main sequence: RepoBarCore
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with StatusBarMenuManager.swift, AppState.swift. — One of this dimension's main actionable groups (2 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 Distribution10.0 / 10Exemplary✓ 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.
142 test methods: 142 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 17 `it`/`test` case(s) across 2 test file(s) declaring at least one beside 125 .NET test method(s); its tier split is read from package names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.5 / 10Stronggated by 4 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 4 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 125 tests. Measured on the .swift suite only — at least 2 test source file(s) (.mjs, .ts) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: · ×4Tests/RepoBarTests/DiagnosticsLoggerTests.swift:6
What to do
Resolve the 4 No assertions finding(s) in Test Quality — start with DiagnosticsLoggerTests.swift, RepoBarCoreModelsTests.swift, UserSettingsCoverageTests.swift. — One of this dimension's main actionable groups (4 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.
1 outdated direct SwiftPM dependencies, 0 pinning defect(s). 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.
Outdated: commander
✓ On the Gold path — maintain.
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.
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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 13 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 11 of them read from the licence file the repository carries at the revision Package.resolved pins, and 2 — 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 declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's SwiftPM package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
No churn × complexity hotspots in the window. Repeated repair below the complexity floor: Sources/RepoBarCore/API/GitHubRequestRunner.swift (4 of 5 changes were fixes); Sources/RepoBarCore/API/GraphQLClient.swift (3 of 4 changes were fixes); Sources/RepoBarCore/API/RateLimitSnapshot.swift (3 of 3 changes were fixes)
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with GitHubRequestRunner.swift, GraphQLClient.swift, RateLimitSnapshot.swift. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_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.
0 deducted task-comment markers across 44954 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
RepoBar's documentation is clear, complete, and well-structured: the root README (RepoBar — GitHub repositories in your menu bar) gives an overview, install, quick start, repository dashboard, authentication, a debuggable CLI reference, concurrency notes, REST/GraphQL helpers, local Git actions, and a canonical index.html landing page. The architecture/design docs cover auth storage, caching/archive design, and Swift concurrency with detailed precedence tables. The repository's documentation is strong and well-organized: the READMEs describe their own directories (e.g. release checklist for RepoBar) while the architecture/design docs cover cross-platform rendering, multi-account authentication, local projects scanning, and a full product spec including goals, UX, auth flow, data sources, and platform details. The visible content is complete and well-structured with clear headings, an overview section, and usage examples; clipped documents carry their full outline (all sections present).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyStrong◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
3 API inconsistencies across a 400-member sample of 189 exposed types.
Redundant naming with unclear distinction. 'repositoryList' and 'cachedRepositoryList' appear to perform the same logical operation (fetching a list of repositories) but differ only by a 'cached' prefix. It is unclear if 'repositoryList' is uncached, or if 'cachedRepositoryList' is the primary method and 'repositoryList' is an alias/legacy. This creates confusion about which method to use for standard operations.
Inconsistent naming for content retrieval. 'repoContents' returns a list of items (metadata/directory listing), while 'repoFileContents' returns raw data. The naming convention 'repoContents' vs 'repoFileContents' is slightly inconsistent with the return types. 'Contents' usually implies a list, while 'FileContents' implies raw data. However, 'repoContents' with an optional path suggests it might also fetch a single file if a path is provided, but it returns [RepoContentItem]. This ambiguity makes it unclear if 'repoContents' is strictly for directories or if it handles files differently than 'repoFileContents'.
Ambiguous cache clearing operations. 'clearCache' and 'clearRepoDetailCache' suggest different scopes of caching. It is unclear if 'clearCache' is a global clear that includes 'repoDetailCache', or if they are distinct caches. This leads to potential redundancy or confusion about which method to call to clear specific data.
What to do
Resolve the 1 Redundant naming with unclear distinction. 'repositoryList' and… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent naming for content retrieval. 'repoContents' returns a list… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Ambiguous cache clearing operations. 'clearCache' and… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 1 build units (npm) 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: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. semgrep hit a parse error in 1 file(s) — `Scripts/package_app.sh` (line 135, line 136, line 137, …) — 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.
REDACTED
What to do
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.
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.
8 of 183 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/RepoBarCore/Models/ActionsUsageInfo.swift. Counted over 183 of the 291 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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 3 Change coupling finding(s) in Change Coupling — start with CLIOutput.swift, SettingsView.swift, StatusBarMenuBuilder.swift. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with StatusBarMenuManager.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 1 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model6.8 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`Error` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/RepoBarCore/Support/Error+Auth.swift:3
What to do
Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
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
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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 & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 3138 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: 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 · 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 18 use(s) across 50,657 production line(s) (~0.4/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
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) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety5.6 / 10Adequate✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
5 typed · 4 plain JS — the untyped files are Scripts/docs-list.mjs, Scripts/generate-llms.mjs, Scripts/json_to_sdl.js, Scripts/package-app.test.mjs.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
Scripts/ghrest.ts:63 · Scripts/ghrest.ts:104 · Scripts/ghrest.ts:137 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Scripts/ghrest.ts:63
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
extractMetadata has cyclomatic complexity 16 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Scripts/docs-list.mjs:28
(anonymous) has cyclomatic complexity 11 and cognitive complexity 8; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Scripts/ghql.ts:72
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage5.7 / 10Adequate✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×3) — Scripts/docs-list.mjs, Scripts/generate-llms.mjs, Scripts/json_to_sdl.js
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling6.7 / 10Strong✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add `tsc --noEmit` as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
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. 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.
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.
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 — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 76 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: 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 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. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not 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 dev server did not expose a crawlable HTTP endpoint in time — no 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.
D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
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. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — symbol resolution incomplete — navigability not assessed
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 38 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
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.
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: 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. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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# syntax, and none was loaded for this repository. 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 JavaScript/TypeScript, 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.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — 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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — 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
X27 Collection changed while being enumerated — 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
X28 Index access outside its own emptiness guard — 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
X3 Exception handling — 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
X30 Support guard that admits what it rejects — 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 — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not 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
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
DM4 · Rich vs anemic domain model· Anemic domain model · ×1
Anemic domain model: Error Sources/RepoBarCore/Support/Error+Auth.swift:3— `Error` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
MethodTooLong: StatusBarMenuManager.openAPIUsage Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:5— MethodTooLong — openAPIUsage runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RepoDetailView.body RepoBariOS/Sources/Views/RepoDetailView.swift:16— MethodTooLong — body runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AdvancedSettingsView.body Sources/RepoBar/Settings/AdvancedSettingsView.swift:15— MethodTooLong — body runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RepoSubmenuBuilder.repoSubmenuItems Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:83— MethodTooLong — repoSubmenuItems runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AccountSettingsView.body Sources/RepoBar/Settings/AccountSettingsView.swift:23— MethodTooLong — body runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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: GitHubReferenceTranslator.lineScopedRepositoryIssueQueries Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:2— MethodTooLong — lineScopedRepositoryIssueQueries runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AppState.processGitHubPullRequestNotifications Sources/RepoBar/App/AppState.swift:4— MethodTooLong — processGitHubPullRequestNotifications runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: RepoDetailCoordinator.fullRepository Sources/RepoBarCore/API/RepoDetailCoordinator.swift:32— MethodTooLong — fullRepository runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StatusBarMenuBuilder.mainMenuItems Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:101— MethodTooLong — mainMenuItems runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StatusBarMenuBuilder.infoMessageItem Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:103— MethodTooLong — infoMessageItem runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RepoSettingsView.body Sources/RepoBar/Settings/RepoSettingsView.swift:20— MethodTooLong — body runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RecentMenuService.descriptors Sources/RepoBar/StatusBar/RecentMenuService.swift:58— MethodTooLong — descriptors runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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.
Duplicated block (7 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:61— RepoBariOS/Sources/Auth/OAuthCoordinator.swift:61-67 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:89-95 — 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 `RepoBariOS/Sources/Auth/OAuthCoordinator.swift:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:47— Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:47-53 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:59-65 — 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/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/RepoBarCore/API/GitHubRecentDecoders.swift:250— Sources/RepoBarCore/API/GitHubRecentDecoders.swift:250-256 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:120-126 — 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 `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 (7 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI.swift:331— Sources/RepoBarCore/API/GitHubRestAPI.swift:331-337 | Sources/RepoBarCore/API/GitHubRestAPI.swift:477-483 — 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/RepoBarCore/API/GitHubRestAPI.swift:331` 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 after the matched lines, `Sources/RepoBarCore/API/GitHubRestAPI.swift:484` calls `URLQueryItem` and `Sources/RepoBarCore/API/GitHubRestAPI.swift:338` 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/RepoBarCore/API/GraphQLClient.swift:75— Sources/RepoBarCore/API/GraphQLClient.swift:75-81 | Sources/RepoBarCore/API/GraphQLClient.swift:176-182 — 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/RepoBarCore/API/GraphQLClient.swift:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:255— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:255-261 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:373-379 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `git` to `LocalGitRunner` in one and `GitRunner` 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 (7 lines × 2) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:264— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:264-270 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:485-491 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `git` to `LocalGitRunner` in one and `GitRunner` 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 (7 lines × 2) RepoBariOS/Sources/App/AppModel.swift:69— RepoBariOS/Sources/App/AppModel.swift:69-75 | Sources/RepoBar/App/AppState+Refresh.swift:215-221 — 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) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:94— RepoBariOS/Sources/Auth/OAuthCoordinator.swift:94-100 | Sources/RepoBar/Auth/OAuthCoordinator.swift:40-48 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:456— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:456-462 | Sources/RepoBarCore/API/GitHubSearchModels.swift:120-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) Sources/RepoBarCore/Support/GitHubArchiveReader.swift:176— Sources/RepoBarCore/Support/GitHubArchiveReader.swift:176-182 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:409-415 — 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 (9 lines × 2) RepoBariOS/Sources/App/AppModel.swift:498— RepoBariOS/Sources/App/AppModel.swift:498-506 | Sources/RepoBarCore/Support/GlobalActivityMerger.swift:21-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. Read the line range as the matched WINDOW rather than a finished unit: at `RepoBariOS/Sources/App/AppModel.swift:498` 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 (9 lines × 2) RepoBariOS/Sources/Views/RepoListView.swift:60— RepoBariOS/Sources/Views/RepoListView.swift:60-68 | RepoBariOS/Sources/Views/RepoListView.swift:71-80 — 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 `RepoBariOS/Sources/Views/RepoListView.swift:71` 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/RepoBar/Settings/AccountSettingsView.swift:491— Sources/RepoBar/Settings/AccountSettingsView.swift:491-499 | Sources/RepoBar/Settings/AccountSettingsView.swift:520-528 — 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/RepoBar/Settings/AccountSettingsView.swift:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:240— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:240-248 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:464-472 — 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/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:240` 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/RepoBar/StatusBar/RepoSubmenuBuilder.swift:405— Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:405-413 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder+MenuItems.swift:83-91 — 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 (9 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:151— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:151-159 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:189-197 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:151` 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 (9 lines × 2) Sources/RepoBarCore/API/GraphQLClient.swift:102— Sources/RepoBarCore/API/GraphQLClient.swift:102-110 | Sources/RepoBarCore/API/GraphQLClient.swift:203-211 — 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/RepoBarCore/API/GraphQLClient.swift:102` 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 (9 lines × 2) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:289— Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:289-297 | Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:265-273 — 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/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:289` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Sources/RepoBarCore/Support/RateLimitJuice.swift:107— Sources/RepoBarCore/Support/RateLimitJuice.swift:107-115 | Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:491-499 — 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 (9 lines × 2) Sources/repobarcli/LocalListsOutput.swift:72— Sources/repobarcli/LocalListsOutput.swift:72-80 | Sources/repobarcli/RecentListsOutput.swift:253-261 — 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/repobarcli/LocalListsOutput.swift:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) RepoBariOS/Sources/App/AppModel.swift:113— RepoBariOS/Sources/App/AppModel.swift:113-120 | RepoBariOS/Sources/App/AppModel.swift:138-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) Sources/RepoBar/App/AppState+IssueNavigation.swift:91— Sources/RepoBar/App/AppState+IssueNavigation.swift:91-98 | Sources/RepoBar/App/AppState+IssueNavigation.swift:198-205 — 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/RepoBar/App/AppState+IssueNavigation.swift:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) Sources/RepoBar/Views/LocalBranchMenuRowView.swift:41— Sources/RepoBar/Views/LocalBranchMenuRowView.swift:41-48 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:31-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:14— Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:14-21 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:13-20 — 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/RepoBar/Views/ReleaseAssetMenuItemView.swift:14` 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 first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.center` in one and `.top` 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 (8 lines × 2) Sources/repobarcli/CLIArgumentNormalizer.swift:29— Sources/repobarcli/CLIArgumentNormalizer.swift:29-36 | Sources/repobarcli/CLIArgumentNormalizer.swift:85-92 — 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/repobarcli/CLIArgumentNormalizer.swift:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Sources/repobarcli/StatusCommand.swift:68— Sources/repobarcli/StatusCommand.swift:68-75 | Sources/repobarcli/StatusCommand.swift:128-135 — 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/repobarcli/StatusCommand.swift:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) RepoBariOS/Sources/Support/RefreshInterval+Label.swift:4— RepoBariOS/Sources/Support/RefreshInterval+Label.swift:4-11 | Sources/RepoBarCore/Settings/UserSettings.swift:480-487 — 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) RepoBariOS/Sources/Views/RepoDetailView.swift:524— RepoBariOS/Sources/Views/RepoDetailView.swift:524-531 | Sources/repobarcli/VerifyCommands.swift:459-466 — 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/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:14— Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:14-21 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationSnapshotStore.swift:14-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 (8 lines × 2) Sources/RepoBar/Views/MenuLabelChipsView.swift:59— Sources/RepoBar/Views/MenuLabelChipsView.swift:59-66 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:126-133 — 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/RepoBar/Views/RecentIssueFiltersView.swift:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:59— RepoBariOS/Sources/Views/HeatmapView.swift:59-63 | Sources/RepoBar/Views/HeatmapView.swift:47-51 — 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 (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:68— RepoBariOS/Sources/Views/HeatmapView.swift:68-72 | Sources/RepoBar/Views/HeatmapView.swift:56-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. Read the line range as the matched WINDOW rather than a finished unit: at `RepoBariOS/Sources/Views/HeatmapView.swift:68` 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 (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:75— RepoBariOS/Sources/Views/HeatmapView.swift:75-79 | Sources/RepoBar/Views/HeatmapView.swift:63-67 — 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) RepoBariOS/Sources/Support/RefreshScheduler.swift:12— RepoBariOS/Sources/Support/RefreshScheduler.swift:12-16 | Sources/RepoBar/Support/RefreshScheduler.swift:12-16 — before extracting anything, compare `RepoBariOS/Sources/Support/RefreshScheduler.swift` and `Sources/RepoBar/Support/RefreshScheduler.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 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 (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:9— RepoBariOS/Sources/Views/HeatmapView.swift:9-13 | Sources/RepoBar/Views/HeatmapView.swift:15-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 (5 lines × 2) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:23— Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:23-27 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationSnapshotStore.swift:23-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:34— RepoBariOS/Sources/Auth/OAuthCoordinator.swift:34-38 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:59-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.
Duplicated block (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:108— RepoBariOS/Sources/Views/HeatmapView.swift:108-112 | Sources/RepoBar/Views/RepoBarLoadingView.swift:152-156 — 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 `RepoBariOS/Sources/Views/HeatmapView.swift:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI.swift:199— Sources/RepoBarCore/API/GitHubRestAPI.swift:199-203 | Sources/RepoBarCore/API/GitHubRestAPI.swift:225-229 — 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/RepoBarCore/API/GitHubRestAPI.swift:199` 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 × 2) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:91— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:91-95 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:99-103 — 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/RepoBarCore/LocalProjects/LocalGitService.swift:91` 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.
TooManyMethods: AppState Sources/RepoBar/App/AppState.swift:5— TooManyMethods — 108 methods. The bar is 30 methods; this is 78 over it, 3.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StatusBarMenuManager Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6— TooManyMethods — 104 methods. The bar is 30 methods; this is 74 over it, 3.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GitHubRestAPI Sources/RepoBarCore/API/GitHubRestAPI.swift:10— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GitHubClient Sources/RepoBarCore/API/GitHubClient.swift:4— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RecentListMenuCoordinator Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:5— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TokenStore Sources/RepoBarCore/Auth/TokenStore.swift:37— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StatusBarMenuBuilder Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:6— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LocalGitMenuCoordinator Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:6— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GitHubReferenceStatusCoordinator Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:4— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (10 lines × 2) Sources/RepoBar/App/AppState+IssueNavigation.swift:176— Sources/RepoBar/App/AppState+IssueNavigation.swift:176-185 | Sources/RepoBar/Views/IssueNavigatorModel.swift:408-417 — 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 (10 lines × 2) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:155— Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:155-164 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:211-220 — 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/RepoBar/Views/ActionsLimitsMenuViews.swift:155` 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 × 2) Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:10— Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:10-19 | Sources/RepoBar/Views/TagMenuItemView.swift:10-19 — 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/RepoBar/Views/ReleaseAssetMenuItemView.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 (10 lines × 2) Sources/RepoBarCore/Auth/TokenStore.swift:574— Sources/RepoBarCore/Auth/TokenStore.swift:574-583 | Sources/RepoBarCore/Auth/TokenStore.swift:632-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Sources/RepoBarCore/Settings/MenuCustomization.swift:28— Sources/RepoBarCore/Settings/MenuCustomization.swift:28-37 | Sources/RepoBarCore/Settings/MenuCustomization.swift:46-55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/Settings/MenuCustomization.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.
Duplicated block (10 lines × 2) Sources/repobarcli/RecentListsOutput.swift:32— Sources/repobarcli/RecentListsOutput.swift:32-41 | Sources/repobarcli/RecentListsOutput.swift:91-100 — 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/repobarcli/RecentListsOutput.swift:32` 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. 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 (10 lines × 2) Sources/repobarcli/RecentListsOutput.swift:107— Sources/repobarcli/RecentListsOutput.swift:107-116 | Sources/repobarcli/RecentListsOutput.swift:133-142 — 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/repobarcli/RecentListsOutput.swift:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) Sources/repobarcli/RecentListsOutput.swift:271— Sources/repobarcli/RecentListsOutput.swift:271-280 | Sources/repobarcli/RecentListsOutput.swift:464-473 — 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/repobarcli/RecentListsOutput.swift:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) Sources/repobarcli/StatusCommand.swift:53— Sources/repobarcli/StatusCommand.swift:53-62 | Sources/repobarcli/StatusCommand.swift:115-124 — 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/repobarcli/StatusCommand.swift:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:507— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:507-512 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:343-348 — 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/RepoBarCore/API/GitHubRequestRunner.swift:381— Sources/RepoBarCore/API/GitHubRequestRunner.swift:381-386 | Sources/RepoBarCore/API/GitHubSearchModels.swift:136-141 — 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/RepoBarCore/API/GitHubRequestRunner.swift:381` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:124— Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:124-129 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationDetector.swift:89-94 — 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/RepoBarCore/Support/GitHubArchiveReader.swift:24— Sources/RepoBarCore/Support/GitHubArchiveReader.swift:24-29 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:40-45 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/RepoBarCore/Support/GitHubArchiveStore.swift:221— Sources/RepoBarCore/Support/GitHubArchiveStore.swift:221-226 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:234-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/repobarcli/RecentItemsOutput.swift:137— Sources/repobarcli/RecentItemsOutput.swift:137-142 | Sources/repobarcli/RecentListsOutput.swift:577-582 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:353— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:353-358 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:363-368 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:353` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
ClassTooLong: LocalGitMenuCoordinator Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:6— ClassTooLong — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 88 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GitHubRestAPI Sources/RepoBarCore/API/GitHubRestAPI.swift:10— ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 86 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AccountSettingsView Sources/RepoBar/Settings/AccountSettingsView.swift:5— ClassTooLong — 439 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 39 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StatusBarMenuManager Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6— ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods. The bar is 400 significant lines; this is 19 over it, 1.05× 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: AdvancedSettingsView Sources/RepoBar/Settings/AdvancedSettingsView.swift:5— ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 15 over it, 1.04× 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 (16 lines × 2) RepoBariOS/Sources/Views/RepoDetailView.swift:96— RepoBariOS/Sources/Views/RepoDetailView.swift:96-111 | RepoBariOS/Sources/Views/RepoDetailView.swift:124-139 — 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 `RepoBariOS/Sources/Views/RepoDetailView.swift:96` 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 × 2) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:464— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:464-479 | Sources/RepoBarCore/API/GitHubSearchModels.swift:143-158 — 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 (16 lines × 2) Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.swift:95— Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.swift:95-110 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.swift:141-156 — 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/repobarcli/LocalActionsCommands.swift:83— Sources/repobarcli/LocalActionsCommands.swift:83-98 | Sources/repobarcli/LocalActionsCommands.swift:138-153 — 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/repobarcli/LocalActionsCommands.swift:83` 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 (16 lines × 2) Sources/RepoBar/Views/PullRequestMenuItemView.swift:98— Sources/RepoBar/Views/PullRequestMenuItemView.swift:98-113 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:86-101 — before extracting anything, compare `Sources/RepoBar/Views/PullRequestMenuItemView.swift` and `Sources/RepoBar/Views/ReleaseMenuItemView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 (12 lines × 2) RepoBariOS/Sources/App/AppModel.swift:318— RepoBariOS/Sources/App/AppModel.swift:318-329 | Sources/RepoBar/App/AppState+Visibility.swift:44-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `RepoBariOS/Sources/App/AppModel.swift:318` 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 (12 lines × 2) Sources/RepoBar/StatusBar/RecentMenuService.swift:316— Sources/RepoBar/StatusBar/RecentMenuService.swift:316-327 | Sources/RepoBar/StatusBar/RecentMenuService.swift:330-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:153— Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:153-164 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:135-146 — 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/RepoBarCore/Models/RepoRecentItems.swift:99— Sources/RepoBarCore/Models/RepoRecentItems.swift:99-110 | Sources/RepoBarCore/Support/RepositoryPipeline.swift:33-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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/Models/RepoRecentItems.swift:99` 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/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:73— Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:73-84 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:116-127 — 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/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:268— Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:268-272 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:544-548 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:414-418 — 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. 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 (5 lines × 3) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510-514 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:335-339 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:346-350 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510` 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) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:231— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:231-235 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:258-262 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:285-289 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) Sources/repobarcli/ArchiveCommands.swift:169— Sources/repobarcli/ArchiveCommands.swift:169-173 | Sources/repobarcli/ArchiveCommands.swift:437-441 | Sources/repobarcli/ArchiveCommands.swift:477-481 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:218— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:218-222 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:245-249 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:272-276 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:218` 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.
No assertions: Tests/RepoBarTests/DiagnosticsLoggerTests.swift:6— 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: Tests/RepoBarTests/RepoBarCoreModelsTests.swift:6— 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: Tests/RepoBarTests/UserSettingsCoverageTests.swift:6— 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: Tests/repobarcliTests/CLIEndToEndTests.swift:10— 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 (15 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:223— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:223-237 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:380-394 — 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/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:223` 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 lines × 2) Sources/RepoBar/Views/MenuLabelChipsView.swift:40— Sources/RepoBar/Views/MenuLabelChipsView.swift:40-54 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:102-116 — 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/RepoBar/Views/MenuLabelChipsView.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/RepoBar/Views/RecentIssueFiltersView.swift:117` calls `buttonStyle`, `accessibilityLabel`, `Text` and `Sources/RepoBar/Views/MenuLabelChipsView.swift:55` 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 (15 lines × 2) Sources/RepoBarCore/API/GraphQLClient.swift:85— Sources/RepoBarCore/API/GraphQLClient.swift:85-99 | Sources/RepoBarCore/API/GraphQLClient.swift:186-200 — 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/RepoBarCore/API/GraphQLClient.swift:85` 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 (15 lines × 2) Sources/repobarcli/LoginCommands.swift:98— Sources/repobarcli/LoginCommands.swift:98-112 | Sources/repobarcli/LoginCommands.swift:263-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) Sources/RepoBarCore/Models/RepoRecentItems.swift:183— Sources/RepoBarCore/Models/RepoRecentItems.swift:183-195 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:54-66 — 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/RepoBarCore/Models/RepoRecentItems.swift:183` 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 lines × 2) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14— Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14-26 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:135-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14` 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/repobarcli/SettingsSupport.swift:425— Sources/repobarcli/SettingsSupport.swift:425-437 | Sources/repobarcli/SettingsSupport.swift:440-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:19— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:19-31 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:20-32 — 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) RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift:13— RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift:13-23 | Sources/RepoBar/Views/HeatmapAxisLabelsView.swift:13-23 — before extracting anything, compare `RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift` and `Sources/RepoBar/Views/HeatmapAxisLabelsView.swift` as WHOLE FILES: 100% 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 (11 lines × 2) Sources/RepoBar/Settings/AccountSettingsView.swift:507— Sources/RepoBar/Settings/AccountSettingsView.swift:507-517 | Sources/RepoBar/Settings/AccountSettingsView.swift:538-548 — 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/RepoBar/Settings/AccountSettingsView.swift:507` 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 (11 lines × 2) Sources/repobarcli/LocalActionsSupport.swift:143— Sources/repobarcli/LocalActionsSupport.swift:143-153 | Sources/repobarcli/LocalActionsSupport.swift:156-166 — 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/repobarcli/LocalActionsSupport.swift:143` 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 (11 lines × 2) Sources/repobarcli/RecentListCommands.swift:388— Sources/repobarcli/RecentListCommands.swift:388-398 | Sources/repobarcli/RecentListCommands.swift:487-497 — 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/repobarcli/RecentListCommands.swift:388` 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 × 3) Sources/RepoBar/Views/IssueMenuItemView.swift:24— Sources/RepoBar/Views/IssueMenuItemView.swift:24-32 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:24-32 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:24-32 — before extracting anything, compare `Sources/RepoBar/Views/IssueMenuItemView.swift` and `Sources/RepoBar/Views/PullRequestMenuItemView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 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/RepoBar/Views/IssueMenuItemView.swift:24` 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 × 3) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:342— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:342-350 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:391-399 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:436-444 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) Sources/repobarcli/RecentListsOutput.swift:33— Sources/repobarcli/RecentListsOutput.swift:33-41 | Sources/repobarcli/RecentListsOutput.swift:92-100 | Sources/repobarcli/RecentListsOutput.swift:237-245 — 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/repobarcli/RecentListsOutput.swift:33` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:174— Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:174-182 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:348-356 | Sources/RepoBar/Views/MenuBannerViews.swift:247-255 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Repeated repair: Sources/RepoBarCore/API/GitHubRequestRunner.swift Sources/RepoBarCore/API/GitHubRequestRunner.swift:50— Sources/RepoBarCore/API/GitHubRequestRunner.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is GitHubRequestRunner.get at line 50), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ship 0.9.3 quota accuracy improvements (#135)”; “fix: preserve observed usage over synthetic full quota reports”; “Fix GitHub quota tracking and stack menu bar counts for 0.9.2”; “fix: honor GitHub retry budgets across REST and GraphQL (#129)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 21:04:54 -07:00' --until='2026-09-30 21:04:54 -07:00' --full-history --no-merges -- Sources/RepoBarCore/API/GitHubRequestRunner.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.
Repeated repair: Sources/RepoBarCore/API/GraphQLClient.swift Sources/RepoBarCore/API/GraphQLClient.swift:58— Sources/RepoBarCore/API/GraphQLClient.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is GraphQLClient.repoSummary at line 58), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ship 0.9.3 quota accuracy improvements (#135)”; “Fix GitHub quota tracking and stack menu bar counts for 0.9.2”; “fix: honor GitHub retry budgets across REST and GraphQL (#129)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 21:04:54 -07:00' --until='2026-09-30 21:04:54 -07:00' --full-history --no-merges -- Sources/RepoBarCore/API/GraphQLClient.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.
Repeated repair: Sources/RepoBarCore/API/RateLimitSnapshot.swift Sources/RepoBarCore/API/RateLimitSnapshot.swift:11— Sources/RepoBarCore/API/RateLimitSnapshot.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is RateLimitSnapshot.from at line 11), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ship 0.9.3 quota accuracy improvements (#135)”; “fix: preserve observed usage over synthetic full quota reports”; “Fix GitHub quota tracking and stack menu bar counts for 0.9.2”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 21:04:54 -07:00' --until='2026-09-30 21:04:54 -07:00' --full-history --no-merges -- Sources/RepoBarCore/API/RateLimitSnapshot.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.
Change coupling: CLIOutput.swift ↔ Commands.swift Sources/repobarcli/CLIOutput.swift— `Sources/repobarcli/CLIOutput.swift` and `Sources/repobarcli/Commands.swift` change together 62% of the time (8 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 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 8 shared commits counted here, the most recent 3 are `d976bd0c` refactor: share repo query defaults and formatters; `4462fea8` feat(cli): default repo to URL; `91cbba85` perf(cli): stabilize release columns — run `git show` on any of them.
Change coupling: SettingsView.swift ↔ LocalProjectsService.swift Sources/RepoBar/Settings/SettingsView.swift— `Sources/RepoBar/Settings/SettingsView.swift` and `Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift` change together 50% of the time (8 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 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 8 shared commits counted here, the most recent 3 are `4927f031` feat: show dirty files in menu; `12dba9de` feat: add local git state block and actions; `2b7e2bcb` feat: show git sandbox info — run `git show` on any of them.
Change coupling: StatusBarMenuBuilder.swift ↔ RepoRecentItems.swift Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift— `Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift` and `Sources/RepoBarCore/Models/RepoRecentItems.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 5 shared commits counted here, the most recent 3 are `c7273234` feat: add commit feeds to menus; `3b1b76d4` feat: add release assets and extra submenus; `1712af95` feat: add CI runs submenu — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:113— Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:113-124 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:126-137 | Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:489-500 | Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:502-513 — 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/RepoBar/Views/DiscussionMenuItemView.swift:10— Sources/RepoBar/Views/DiscussionMenuItemView.swift:10-48 | Sources/RepoBar/Views/IssueMenuItemView.swift:10-51 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:10-67 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:10-55 — 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/RepoBarCore/API/GitHubRecentDecoders.swift:247— Sources/RepoBarCore/API/GitHubRecentDecoders.swift:247-262 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:464-479 | Sources/RepoBarCore/API/GitHubSearchModels.swift:143-158 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:119-141 — 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 (19 lines × 2) Sources/RepoBar/Views/IssueMenuItemView.swift:14— Sources/RepoBar/Views/IssueMenuItemView.swift:14-32 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:14-32 — before extracting anything, compare `Sources/RepoBar/Views/IssueMenuItemView.swift` and `Sources/RepoBar/Views/PullRequestMenuItemView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 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/RepoBar/Views/IssueMenuItemView.swift:14` 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/RepoBarCore/Settings/MenuCustomization.swift:110— Sources/RepoBarCore/Settings/MenuCustomization.swift:110-128 | Sources/RepoBarCore/Settings/MenuCustomization.swift:137-155 — 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/RepoBarCore/Settings/MenuCustomization.swift:110` 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/repobarcli/ReposCommand.swift:136— Sources/repobarcli/ReposCommand.swift:136-154 | Sources/repobarcli/ReposCommand.swift:157-175 — 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.
R4 · Test Coverage· No test reaches this file · ×3
No test reaches this file Scripts/docs-list.mjs— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file Scripts/generate-llms.mjs— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file Scripts/json_to_sdl.js— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
FileTooLong: API/GitHubRestAPI.swift Sources/RepoBarCore/API/GitHubRestAPI.swift— FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: GitHubRestAPI (10-655). The bar is 500 significant lines; this is 82 over it, 1.16× 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: StatusBar/LocalGitMenuCoordinator.swift Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift— FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: LocalGitMenuCoordinator (7-656). The bar is 500 significant lines; this is 37 over it, 1.07× 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.
Duplicated block (21 lines × 2) RepoBariOS/Sources/Views/ActivityView.swift:93— RepoBariOS/Sources/Views/ActivityView.swift:93-113 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:91-111 — 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 `RepoBariOS/Sources/Views/ActivityView.swift:93` 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 (21 lines × 2) Sources/RepoBar/App/AppState+Activity.swift:149— Sources/RepoBar/App/AppState+Activity.swift:149-169 | Sources/RepoBarCore/Models/Repository+Factory.swift:51-71 — 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/RepoBar/App/AppState+Activity.swift:149` 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 (20 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:384— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:384-403 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:585-604 — 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:384` 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 (20 lines × 2) Sources/repobarcli/RecentItemsOutput.swift:14— Sources/repobarcli/RecentItemsOutput.swift:14-33 | Sources/repobarcli/RecentItemsOutput.swift:41-60 — 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/repobarcli/RecentItemsOutput.swift:14` 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/RepoBar/Settings/GitHubAPIUsageSection.swift:171— Sources/RepoBar/Settings/GitHubAPIUsageSection.swift:171-184 | Sources/RepoBar/Views/MenuBannerViews.swift:232-245 — 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 (14 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:207— Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:207-220 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:364-377 — 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/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:207` 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 × 3) Sources/RepoBar/Views/DiscussionMenuItemView.swift:28— Sources/RepoBar/Views/DiscussionMenuItemView.swift:28-40 | Sources/RepoBar/Views/IssueMenuItemView.swift:27-39 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:27-39 — before extracting anything, compare `Sources/RepoBar/Views/DiscussionMenuItemView.swift` and `Sources/RepoBar/Views/IssueMenuItemView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/RepoBar/Views/PullRequestMenuItemView.swift:42` calls `DraftPillView` and `Sources/RepoBar/Views/DiscussionMenuItemView.swift:42` 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 (13 lines × 3) Sources/repobarcli/RecentListsOutput.swift:266— Sources/repobarcli/RecentListsOutput.swift:266-278 | Sources/repobarcli/RecentListsOutput.swift:333-345 | Sources/repobarcli/RecentListsOutput.swift:508-520 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–13 lines × 2) Sources/RepoBar/App/AppState+Refresh.swift:82— Sources/RepoBar/App/AppState+Refresh.swift:82-94 | Sources/RepoBar/App/AppState+Refresh.swift:267-278 — 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/RepoBar/App/AppState+Refresh.swift:267` 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 (12–13 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:442— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:442-454 | Sources/RepoBarCore/API/GitHubSearchModels.swift:107-118 — 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/RepoBarCore/API/GitHubSearchModels.swift:107` 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 (11 lines × 3) Sources/RepoBar/Views/DiscussionMenuItemView.swift:10— Sources/RepoBar/Views/DiscussionMenuItemView.swift:10-20 | Sources/RepoBar/Views/IssueMenuItemView.swift:10-20 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:10-20 — before extracting anything, compare `Sources/RepoBar/Views/DiscussionMenuItemView.swift` and `Sources/RepoBar/Views/IssueMenuItemView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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/RepoBar/Views/DiscussionMenuItemView.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 (11 lines × 3) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:283— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:283-293 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:303-313 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:464-474 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/LocalProjects/LocalGitService.swift:283` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–11 lines × 2) Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:358— Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:358-367 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:648-658 — 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 (10–11 lines × 2) Sources/RepoBar/Support/TerminalApp.swift:138— Sources/RepoBar/Support/TerminalApp.swift:138-147 | Sources/repobarcli/LocalActionsSupport.swift:242-252 — 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/RepoBar/Support/TerminalApp.swift:138` 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 after the matched lines, `Sources/RepoBar/Support/TerminalApp.swift:148` calls `error` and `Sources/repobarcli/LocalActionsSupport.swift:253` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 2) Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift:120— Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift:120-127 | Sources/RepoBar/Views/IssueNavigatorAppKitAdapters.swift:285-291 — 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–8 lines × 2) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:251— Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:251-258 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:306-312 — 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/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:121— Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:121-128 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:191-197 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:315-322 — 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/RepoBar/Views/ActionsLimitsMenuViews.swift:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) Sources/RepoBar/Views/BranchMenuItemView.swift:9— Sources/RepoBar/Views/BranchMenuItemView.swift:9-15 | Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:9-15 | Sources/RepoBar/Views/TagMenuItemView.swift:9-15 — 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/RepoBar/Views/BranchMenuItemView.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/RepoBar/Views/BranchMenuItemView.swift:16` calls `HStack` and `Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:16` 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 (6 lines × 3) Sources/RepoBarCore/API/GitHubRestAPI.swift:330— Sources/RepoBarCore/API/GitHubRestAPI.swift:330-336 | Sources/RepoBarCore/API/GitHubRestAPI.swift:476-482 | Sources/RepoBarCore/API/GitHubRestAPI.swift:511-516 — 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/RepoBarCore/API/GitHubRestAPI.swift:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/RepoBarCore/API/GitHubRestAPI.swift:484` calls `URLQueryItem` and `Sources/RepoBarCore/API/GitHubRestAPI.swift:338` 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 (6 lines × 3) Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:252— Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:252-257 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:261-266 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:299-304 — 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/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:252` 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.
Low cohesion: StatusBarMenuManager (LCOM4 5) Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6— StatusBarMenuManager'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: AppState (LCOM4 4) Sources/RepoBar/App/AppState.swift:5— AppState'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.
SettingsSupport.swift.applySetting (cyclomatic 67) Sources/repobarcli/SettingsSupport.swift:125— SettingsSupport.swift.applySetting has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CLIArgumentNormalizer.normalize (cyclomatic 52) Sources/repobarcli/CLIArgumentNormalizer.swift:5— CLIArgumentNormalizer.normalize has cyclomatic complexity 52 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:83— RepoSubmenuBuilder.repoSubmenuItems has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StatusBarMenuBuilder.mainMenuItems (cyclomatic 43) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:101— StatusBarMenuBuilder.mainMenuItems has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RepoDetailCoordinator.fullRepository (cyclomatic 31) Sources/RepoBarCore/API/RepoDetailCoordinator.swift:32— RepoDetailCoordinator.fullRepository has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AccountSettingsView.body (cyclomatic 26) Sources/RepoBar/Settings/AccountSettingsView.swift:23— AccountSettingsView.body has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IssueNavigatorModel.performSearch (cyclomatic 24) Sources/RepoBar/Views/IssueNavigatorModel.swift:228— IssueNavigatorModel.performSearch 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.
RecentListMenuCoordinator.renderRecentItems (cyclomatic 22) Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:309— RecentListMenuCoordinator.renderRecentItems has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RepoDetailModel.message (cyclomatic 22) RepoBariOS/Sources/Models/RepoDetailModel.swift:135— RepoDetailModel.message has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CLIOutput.swift.tableLines (cyclomatic 22) Sources/repobarcli/CLIOutput.swift:76— CLIOutput.swift.tableLines has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RecentListsOutput.swift.recentTableLines (cyclomatic 22) Sources/repobarcli/RecentListsOutput.swift:375— RecentListsOutput.swift.recentTableLines has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GitHubReferenceTranslator.urlReference (cyclomatic 21) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:43— GitHubReferenceTranslator.urlReference has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RepoDetailModel.load (cyclomatic 21) RepoBariOS/Sources/Models/RepoDetailModel.swift:40— RepoDetailModel.load has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ArchivesAddCommand.archiveSource (cyclomatic 21) Sources/repobarcli/ArchiveCommands.swift:269— ArchivesAddCommand.archiveSource has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GitHubPullRequestNotificationDetector.events (cyclomatic 20) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:117— GitHubPullRequestNotificationDetector.events has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GitHubReferenceTranslator.repositoryHeadingListBlockParse (cyclomatic 20) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:20— GitHubReferenceTranslator.repositoryHeadingListBlockParse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReposCommand.run (cyclomatic 20) Sources/repobarcli/ReposCommand.swift:81— ReposCommand.run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StatusBarMenuBuilder.actionsLimitsSubmenu (cyclomatic 19) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:210— StatusBarMenuBuilder.actionsLimitsSubmenu has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalProjectsService.snapshot (cyclomatic 19) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:87— LocalProjectsService.snapshot has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsSupport.swift.settingsSummaryLines (cyclomatic 19) Sources/repobarcli/SettingsSupport.swift:306— SettingsSupport.swift.settingsSummaryLines has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: SettingsKey.init (cyclomatic 36) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
TokenStore.scanFileAccountIDs (cyclomatic 18) Sources/RepoBarCore/Auth/TokenStore.swift:554— TokenStore.scanFileAccountIDs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RepositoryPipeline.apply (cyclomatic 18) Sources/RepoBarCore/Support/RepositoryPipeline.swift:64— RepositoryPipeline.apply has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalRepoManager.partitionStatusesToRefresh (cyclomatic 17) Sources/RepoBar/Support/LocalRepoManager.swift:180— LocalRepoManager.partitionStatusesToRefresh 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.
RateLimitStatusFormatter.sections (cyclomatic 17) Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:67— RateLimitStatusFormatter.sections 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.
LocalGitService.swift.dirtyCounts (cyclomatic 17) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:334— LocalGitService.swift.dirtyCounts 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.
RecentItemsOutput.swift.recentItemsTableLines (cyclomatic 17) Sources/repobarcli/RecentItemsOutput.swift:67— RecentItemsOutput.swift.recentItemsTableLines 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.
GitHubReferenceTranslator.normalQueries (cyclomatic 16) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:56— GitHubReferenceTranslator.normalQueries 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.
RepoAutocompleteScoring.score (cyclomatic 16) Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift:65— RepoAutocompleteScoring.score 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.
LocalProjectsService.swift.parseDirtyCounts (cyclomatic 16) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:385— LocalProjectsService.swift.parseDirtyCounts 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.
docs-list.extractMetadata (cyclomatic 16) Scripts/docs-list.mjs:28— docs-list.extractMetadata 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.
SettingsSupport.swift.applySetting (cognitive 59) Sources/repobarcli/SettingsSupport.swift:125— SettingsSupport.swift.applySetting has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 18 (36 pts), if/else 10 (16 pts), match/switch 4 (7 pts) (nesting depth added 27). 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.
CLIArgumentNormalizer.normalize (cognitive 53) Sources/repobarcli/CLIArgumentNormalizer.swift:5— CLIArgumentNormalizer.normalize has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (31 pts), match/switch 6 (12 pts), boolean chains 10 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AccountSettingsView.body (cognitive 52) Sources/RepoBar/Settings/AccountSettingsView.swift:23— AccountSettingsView.body has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (39 pts), ternaries 3 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatusBarMenuBuilder.mainMenuItems (cognitive 48) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:101— StatusBarMenuBuilder.mainMenuItems has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 6, match/switch 3 (5 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 21). 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.
RepoSubmenuBuilder.repoSubmenuItems (cognitive 45) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:83— RepoSubmenuBuilder.repoSubmenuItems has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (33 pts), ternaries 3 (7 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 22). 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.
GitHubPullRequestNotificationDetector.events (cognitive 40) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:117— GitHubPullRequestNotificationDetector.events has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalProjectsService.snapshot (cognitive 39) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:87— LocalProjectsService.snapshot has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReferenceTranslator.repositoryHeadingListBlockParse (cognitive 39) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:20— GitHubReferenceTranslator.repositoryHeadingListBlockParse has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CLIOutput.swift.tableLines (cognitive 39) Sources/repobarcli/CLIOutput.swift:76— CLIOutput.swift.tableLines has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 15 (30 pts), if/else 5 (8 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IssueNavigatorModel.performSearch (cognitive 38) Sources/RepoBar/Views/IssueNavigatorModel.swift:228— IssueNavigatorModel.performSearch has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 4 (6 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoDetailCoordinator.fullRepository (cognitive 34) Sources/RepoBarCore/API/RepoDetailCoordinator.swift:32— RepoDetailCoordinator.fullRepository has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 6 (8 pts), match/switch 5, boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
docs-list.extractMetadata (cognitive 32) Scripts/docs-list.mjs:28— docs-list.extractMetadata has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), error handling 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecentListsOutput.swift.recentTableLines (cognitive 31) Sources/repobarcli/RecentListsOutput.swift:375— RecentListsOutput.swift.recentTableLines has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 4 (9 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.
StatusBarMenuBuilder.actionsLimitsSubmenu (cognitive 30) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:210— StatusBarMenuBuilder.actionsLimitsSubmenu has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenStore.scanFileAccountIDs (cognitive 30) Sources/RepoBarCore/Auth/TokenStore.swift:554— TokenStore.scanFileAccountIDs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReferenceTranslator.normalQueries (cognitive 28) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:56— GitHubReferenceTranslator.normalQueries has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 9 (14 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenStore.scanKeychainAccountIDs (cognitive 27) Sources/RepoBarCore/Auth/TokenStore.swift:604— TokenStore.scanKeychainAccountIDs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecentItemsOutput.swift.recentItemsTableLines (cognitive 27) Sources/repobarcli/RecentItemsOutput.swift:67— RecentItemsOutput.swift.recentItemsTableLines has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (9 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalRepoManager.partitionStatusesToRefresh (cognitive 26) Sources/RepoBar/Support/LocalRepoManager.swift:180— LocalRepoManager.partitionStatusesToRefresh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RateLimitStatusFormatter.sections (cognitive 26) Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:67— RateLimitStatusFormatter.sections has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecentListMenuCoordinator.renderRecentItems (cognitive 25) Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:309— RecentListMenuCoordinator.renderRecentItems has cognitive complexity 25 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 12). 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.
RepoDetailModel.message (cognitive 25) RepoBariOS/Sources/Models/RepoDetailModel.swift:135— RepoDetailModel.message has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReposCommand.run (cognitive 25) Sources/repobarcli/ReposCommand.swift:81— ReposCommand.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReferenceTranslator.urlReference (cognitive 24) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:43— GitHubReferenceTranslator.urlReference has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalGitService.swift.dirtyCounts (cognitive 23) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:334— LocalGitService.swift.dirtyCounts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatusCommand.run (cognitive 23) Sources/repobarcli/StatusCommand.swift:27— StatusCommand.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AppState.referenceMatches (cognitive 22) Sources/RepoBar/App/AppState.swift:68— AppState.referenceMatches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalProjectsService.swift.parseDirtyCounts (cognitive 22) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:385— LocalProjectsService.swift.parseDirtyCounts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReleaseNotificationDetector.events (cognitive 21) Sources/RepoBarCore/Notifications/GitHubReleaseNotificationDetector.swift:82— GitHubReleaseNotificationDetector.events has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReferenceTranslator.repositoryContext (cognitive 21) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:249— GitHubReferenceTranslator.repositoryContext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchivesAddCommand.archiveSource (cognitive 21) Sources/repobarcli/ArchiveCommands.swift:269— ArchivesAddCommand.archiveSource has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LocalGitMenuCoordinator.populateCombinedBranchMenu (cognitive 20) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:351— LocalGitMenuCoordinator.populateCombinedBranchMenu has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), ternaries 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoAutocompleteScoring.score (cognitive 20) Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift:65— RepoAutocompleteScoring.score has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityCommand.run (cognitive 20) Sources/repobarcli/RecentListCommands.swift:459— ActivityCommand.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AccountSettingsView.login (cognitive 19) Sources/RepoBar/Settings/AccountSettingsView.swift:376— AccountSettingsView.login has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 4 (5 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GitHubReferenceTranslator.repeatedLineScopedIssueNumberMatches (cognitive 19) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:131— GitHubReferenceTranslator.repeatedLineScopedIssueNumberMatches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RateLimitStatusFormatter.rateLimitRow (cognitive 19) Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:451— RateLimitStatusFormatter.rateLimitRow has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryPipeline.apply (cognitive 19) Sources/RepoBarCore/Support/RepositoryPipeline.swift:64— RepositoryPipeline.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalProjectsService.swift.parseDirtyFiles (cognitive 19) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:427— LocalProjectsService.swift.parseDirtyFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoCommand.run (cognitive 19) Sources/repobarcli/VerifyCommands.swift:99— RepoCommand.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppState.refresh (cognitive 18) Sources/RepoBar/App/AppState.swift:50— AppState.refresh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatusBarMenuBuilder.rateLimitsSubmenu (cognitive 18) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:130— StatusBarMenuBuilder.rateLimitsSubmenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubReferenceTranslator.contextualBareIssueQueries (cognitive 18) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:4— GitHubReferenceTranslator.contextualBareIssueQueries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecentListsOutput.swift.globalCommitsTableLines (cognitive 18) Sources/repobarcli/RecentListsOutput.swift:250— RecentListsOutput.swift.globalCommitsTableLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (7 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RecentListsOutput.swift.globalActivityTableLines) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecentListsOutput.swift.globalActivityTableLines (cognitive 18) Sources/repobarcli/RecentListsOutput.swift:309— RecentListsOutput.swift.globalActivityTableLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (7 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RecentListsOutput.swift.globalCommitsTableLines) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SettingsSupport.swift.settingsSummaryLines (cognitive 18) Sources/repobarcli/SettingsSupport.swift:306— SettingsSupport.swift.settingsSummaryLines has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 18. 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.
AppState.searchIssueReferences (cognitive 17) Sources/RepoBar/App/AppState.swift:6— AppState.searchIssueReferences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (5 pts), loops 3 (5 pts), error handling 1 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IssueNavigatorModel.loadAISummaries (cognitive 17) Sources/RepoBar/Views/IssueNavigatorModel.swift:363— IssueNavigatorModel.loadAISummaries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AboutSettingsView.body (cognitive 17) Sources/RepoBar/Settings/About/AboutSettingsView.swift:39— AboutSettingsView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalProjectsService.findGitRepos (cognitive 17) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:227— LocalProjectsService.findGitRepos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RateLimitStatusFormatter.currentBlockerRows (cognitive 17) Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:210— RateLimitStatusFormatter.currentBlockerRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 3, if/else 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchivesStatusCommand.run (cognitive 17) Sources/repobarcli/ArchiveCommands.swift:69— ArchivesStatusCommand.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (8 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatusCommand.runLegacy (cognitive 17) Sources/repobarcli/StatusCommand.swift:81— StatusCommand.runLegacy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecentListsOutput.swift.commitsWithRepoTableLines (cognitive 17) Sources/repobarcli/RecentListsOutput.swift:489— RecentListsOutput.swift.commitsWithRepoTableLines has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppState.migrateLegacyAccountIfNeeded (cognitive 16) Sources/RepoBar/App/AppState.swift:28— AppState.migrateLegacyAccountIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RenderPayload.renderImage (cognitive 16) Sources/RepoBar/Views/HeatmapRasterView.swift:486— RenderPayload.renderImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphQLClient.repoSummary (cognitive 16) Sources/RepoBarCore/API/GraphQLClient.swift:58— GraphQLClient.repoSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (GraphQLClient.userContributionHeatmap) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
GraphQLClient.userContributionHeatmap (cognitive 16) Sources/RepoBarCore/API/GraphQLClient.swift:153— GraphQLClient.userContributionHeatmap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (GraphQLClient.repoSummary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks (cognitive 16) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:170— GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (7 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CommitsCommand.run (cognitive 16) Sources/repobarcli/RecentListCommands.swift:363— CommitsCommand.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LocalActionsSupport.swift.resolveLocalRepoTarget (cognitive 16) Sources/repobarcli/LocalActionsSupport.swift:110— LocalActionsSupport.swift.resolveLocalRepoTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency· Redundant naming with unclear distinction. 'repositoryList' and 'cachedRepositoryList' appear to perform the same logical operation (fetching a list of repositories) but differ only by a 'cached' prefix. It is unclear if 'repositoryList' is uncached, or if 'cachedRepositoryList' is the primary method and 'repositoryList' is an alias/legacy. This creates confusion about which method to use for standard operations. · ×1
Redundant naming with unclear distinction. 'repositoryList' and 'cachedRepositoryList' appear to perform the same logical operation (fetching a list of repositories) but differ only by a 'cached' prefix. It is unclear if 'repositoryList' is uncached, or if 'cachedRepositoryList' is the primary method and 'repositoryList' is an alias/legacy. This creates confusion about which method to use for standard operations. — Unify into a single method, e.g., 'repositoryList(limit:)'. If caching is an implementation detail, it should be handled internally. If there is a distinct 'force refresh' vs 'use cache' behavior, use explicit verbs like 'fetchRepositoryList(force:)' or 'getCachedRepositoryList()'. Given the presence of 'clearCache' and 'clearRepoDetailCache', the client likely manages cache state internally, making the explicit 'cached' prefix in the method name redundant and confusing. (signatures: GitHubClient.repositoryList(limit: Int?): [Repository] | GitHubClient.cachedRepositoryList(limit: Int?): [Repository])
D22 · Internal API Consistency· Inconsistent naming for content retrieval. 'repoContents' returns a list of items (metadata/directory listing), while 'repoFileContents' returns raw data. The naming convention 'repoContents' vs 'repoFileContents' is slightly inconsistent with the return types. 'Contents' usually implies a list, while 'FileContents' implies raw data. However, 'repoContents' with an optional path suggests it might also fetch a single file if a path is provided, but it returns [RepoContentItem]. This ambiguity makes it unclear if 'repoContents' is strictly for directories or if it handles files differently than 'repoFileContents'. · ×1
Inconsistent naming for content retrieval. 'repoContents' returns a list of items (metadata/directory listing), while 'repoFileContents' returns raw data. The naming convention 'repoContents' vs 'repoFileContents' is slightly inconsistent with the return types. 'Contents' usually implies a list, while 'FileContents' implies raw data. However, 'repoContents' with an optional path suggests it might also fetch a single file if a path is provided, but it returns [RepoContentItem]. This ambiguity makes it unclear if 'repoContents' is strictly for directories or if it handles files differently than 'repoFileContents'. — Rename 'repoContents' to 'repoDirectoryContents' or 'repoListing' to clearly indicate it returns a list of items. Keep 'repoFileContents' for raw data retrieval. Alternatively, if 'repoContents' is intended to be a general-purpose content fetcher, it should have a consistent return type or clear overloads, but currently, the distinction between returning metadata ([RepoContentItem]) vs raw data (Data) is obscured by the similar names. (signatures: GitHubClient.repoContents(owner: String, name: String, path: String?): [RepoContentItem] | GitHubClient.repoFileContents(owner: String, name: String, path: String): Data)
D22 · Internal API Consistency· Ambiguous cache clearing operations. 'clearCache' and 'clearRepoDetailCache' suggest different scopes of caching. It is unclear if 'clearCache' is a global clear that includes 'repoDetailCache', or if they are distinct caches. This leads to potential redundancy or confusion about which method to call to clear specific data. · ×1
Ambiguous cache clearing operations. 'clearCache' and 'clearRepoDetailCache' suggest different scopes of caching. It is unclear if 'clearCache' is a global clear that includes 'repoDetailCache', or if they are distinct caches. This leads to potential redundancy or confusion about which method to call to clear specific data. — Clarify the scope. If 'clearCache' is a global clear, remove 'clearRepoDetailCache' or make it an alias. If they are distinct, name them more specifically, e.g., 'clearGlobalCache()' and 'clearRepositoryDetailCache()'. Consider using a more structured cache management API if multiple cache types exist. (signatures: GitHubClient.clearCache() | GitHubClient.clearRepoDetailCache())
FunctionTooLong: SettingsSupport.swift.applySetting Sources/repobarcli/SettingsSupport.swift:125— FunctionTooLong — applySetting runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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 hub: StatusBarMenuManager.swift → GitHubReferenceBrowserMenuItemView.swift, StatusBarMenuBuilder+RepoSubmenus.swift, AppLimits.swift, MenuRepoFilters.swift, RepoRecentItems.swift Sources/RepoBar/StatusBar/StatusBarMenuManager.swift— `Sources/RepoBar/StatusBar/StatusBarMenuManager.swift` changes together with 5 other files — `Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift`, `Sources/RepoBar/StatusBar/StatusBarMenuBuilder+RepoSubmenus.swift`, `Sources/RepoBar/Support/AppLimits.swift`, `Sources/RepoBar/Support/MenuRepoFilters.swift`, `Sources/RepoBarCore/Models/RepoRecentItems.swift` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
Near-duplicate member pair (31 shared lines) Sources/RepoBarCore/API/GraphQLClient.swift:58— Sources/RepoBarCore/API/GraphQLClient.swift:58-126 | Sources/RepoBarCore/API/GraphQLClient.swift:153-227 — These two members are variants of one another: 31 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.
Near-duplicate member pair (29 shared lines) Sources/repobarcli/LocalListsOutput.swift:4— Sources/repobarcli/LocalListsOutput.swift:4-68 | Sources/repobarcli/LocalListsOutput.swift:70-133 — These two members are variants of one another: 29 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.
Near-duplicate member pair (21 shared lines) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:25— RepoBariOS/Sources/Auth/OAuthCoordinator.swift:25-86 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:50-114 — These two members are variants of one another: 21 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) Sources/repobarcli/RecentListCommands.swift:22— Sources/repobarcli/RecentListCommands.swift:22-29 | Sources/repobarcli/RecentListCommands.swift:76-83 | Sources/repobarcli/RecentListCommands.swift:130-137 | Sources/repobarcli/RecentListCommands.swift:184-191 | Sources/repobarcli/RecentListCommands.swift:238-245 | Sources/repobarcli/RecentListCommands.swift:292-299 | Sources/repobarcli/VerifyCommands.swift:186-194 | Sources/repobarcli/VerifyCommands.swift:258-266 — These 8 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 8 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 8 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:18— Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:18-46 | Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:113-139 | Sources/RepoBarCore/Models/RepoRecentItems.swift:81-119 | Sources/RepoBarCore/Models/RepoRecentItems.swift:172-196 | Sources/RepoBarCore/Models/Repository.swift:27-83 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:34-76 | Sources/RepoBarCore/Support/RepositoryPipeline.swift:22-46 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/RepoBar/Views/CommitMenuItemView.swift:59— Sources/RepoBar/Views/CommitMenuItemView.swift:59-71 | Sources/RepoBar/Views/DiscussionMenuItemView.swift:51-63 | Sources/RepoBar/Views/IssueMenuItemView.swift:54-66 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:70-82 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:58-70 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (34 lines × 2) Sources/RepoBar/Views/LocalBranchMenuRowView.swift:52— Sources/RepoBar/Views/LocalBranchMenuRowView.swift:52-85 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:49-82 — 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 (29 lines × 2) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:337— Sources/RepoBarCore/LocalProjects/LocalGitService.swift:337-365 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:386-414 — 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/RepoBarCore/LocalProjects/LocalGitService.swift:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) RepoBariOS/Sources/App/AppModel.swift:451— RepoBariOS/Sources/App/AppModel.swift:451-475 | Sources/RepoBar/App/AppState+Activity.swift:28-52 — 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 `RepoBariOS/Sources/App/AppModel.swift:451` 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 (24 lines × 2) Sources/repobarcli/RecentListsOutput.swift:350— Sources/repobarcli/RecentListsOutput.swift:350-373 | Sources/repobarcli/RecentListsOutput.swift:525-548 — 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/repobarcli/RecentListsOutput.swift:350` 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 (2–19 lines × 5) Sources/repobarcli/LocalListsOutput.swift:28— Sources/repobarcli/LocalListsOutput.swift:28-29 | Sources/repobarcli/LocalListsOutput.swift:96-97 | Sources/repobarcli/LocalProjectsCommands.swift:162-163 | Sources/repobarcli/RecentListsOutput.swift:331-349 | Sources/repobarcli/RecentListsOutput.swift:506-524 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/repobarcli/RecentListsOutput.swift:331` 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 (18 lines × 2) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18— Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18-35 | Sources/RepoBar/Views/MenuBannerViews.swift:103-120 — 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/RepoBar/Views/ActionsLimitsMenuViews.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.
Duplicated block (12–15 lines × 2) Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:288— Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:288-299 | Sources/RepoBar/Views/IssueNavigatorView.swift:308-322 — 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 (13–15 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI.swift:177— Sources/RepoBarCore/API/GitHubRestAPI.swift:177-191 | Sources/RepoBarCore/API/GitHubRestAPI.swift:210-222 — 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/RepoBarCore/API/GitHubRestAPI.swift:177` 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 (14–15 lines × 2) Sources/repobarcli/LocalListsOutput.swift:55— Sources/repobarcli/LocalListsOutput.swift:55-68 | Sources/repobarcli/LocalListsOutput.swift:119-133 — 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/repobarcli/LocalListsOutput.swift:55` 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–14 lines × 2) Sources/repobarcli/LocalListsOutput.swift:33— Sources/repobarcli/LocalListsOutput.swift:33-45 | Sources/repobarcli/LocalListsOutput.swift:102-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 5) Sources/RepoBar/Views/CommitMenuItemView.swift:59— Sources/RepoBar/Views/CommitMenuItemView.swift:59-71 | Sources/RepoBar/Views/DiscussionMenuItemView.swift:51-63 | Sources/RepoBar/Views/IssueMenuItemView.swift:54-66 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:70-82 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:58-70 — before extracting anything, compare `Sources/RepoBar/Views/DiscussionMenuItemView.swift` and `Sources/RepoBar/Views/IssueMenuItemView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 (12 lines × 5) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:32— Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:32-43 | Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:126-137 | Sources/RepoBarCore/Models/RepoRecentItems.swift:100-111 | Sources/RepoBarCore/Models/Repository.swift:54-65 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:55-66 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/LocalProjects/LocalRepoStatus.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 (12 lines × 4) Sources/repobarcli/CLIArgumentNormalizer.swift:35— Sources/repobarcli/CLIArgumentNormalizer.swift:35-46 | Sources/repobarcli/CLIArgumentNormalizer.swift:48-59 | Sources/repobarcli/CLIArgumentNormalizer.swift:61-72 | Sources/repobarcli/CLIArgumentNormalizer.swift:94-105 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/repobarcli/CLIArgumentNormalizer.swift:35` 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 (12 lines × 3) Sources/repobarcli/RecentListsOutput.swift:288— Sources/repobarcli/RecentListsOutput.swift:288-299 | Sources/repobarcli/RecentListsOutput.swift:354-365 | Sources/repobarcli/RecentListsOutput.swift:529-540 — 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/repobarcli/RecentListsOutput.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 (9–12 lines × 2) RepoBariOS/Sources/Views/ActivityView.swift:164— RepoBariOS/Sources/Views/ActivityView.swift:164-175 | RepoBariOS/Sources/Views/RepoDetailView.swift:464-472 — 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, `RepoBariOS/Sources/Views/RepoDetailView.swift:463` calls `HStack` and `RepoBariOS/Sources/Views/ActivityView.swift:163` 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 (11 lines × 5) Sources/repobarcli/CLIArgumentNormalizer.swift:37— Sources/repobarcli/CLIArgumentNormalizer.swift:37-47 | Sources/repobarcli/CLIArgumentNormalizer.swift:50-60 | Sources/repobarcli/CLIArgumentNormalizer.swift:63-73 | Sources/repobarcli/CLIArgumentNormalizer.swift:77-87 | Sources/repobarcli/CLIArgumentNormalizer.swift:96-106 — all 5 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/repobarcli/CLIArgumentNormalizer.swift:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–10 lines × 2) RepoBariOS/Sources/App/AppModel.swift:509— RepoBariOS/Sources/App/AppModel.swift:509-515 | Sources/RepoBarCore/Support/GlobalActivityMerger.swift:32-41 — 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 `RepoBariOS/Sources/App/AppModel.swift:509` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–10 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:75— RepoBariOS/Sources/Auth/OAuthCoordinator.swift:75-83 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:103-112 — 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–9 lines × 8) Sources/repobarcli/RecentListCommands.swift:22— Sources/repobarcli/RecentListCommands.swift:22-29 | Sources/repobarcli/RecentListCommands.swift:76-83 | Sources/repobarcli/RecentListCommands.swift:130-137 | Sources/repobarcli/RecentListCommands.swift:184-191 | Sources/repobarcli/RecentListCommands.swift:238-245 | Sources/repobarcli/RecentListCommands.swift:292-299 | Sources/repobarcli/VerifyCommands.swift:186-194 | Sources/repobarcli/VerifyCommands.swift:258-266 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 4) Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:118— Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:118-124 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:131-137 | Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:494-500 | Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:507-513 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:118` 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 (6–7 lines × 3) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:327— Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:327-333 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:342-348 | Sources/RepoBarCore/API/GitHubRestAPI.swift:538-543 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:327` 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. 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/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:325` calls `URLQueryItem` and `Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:340` 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 (6–7 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI.swift:476— Sources/RepoBarCore/API/GitHubRestAPI.swift:476-482 | Sources/RepoBarCore/API/GitHubRestAPI.swift:511-516 — 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/RepoBarCore/API/GitHubRestAPI.swift:476` 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 (5 lines × 4) Sources/RepoBarCore/API/GitHubRecentDecoders.swift:252— Sources/RepoBarCore/API/GitHubRecentDecoders.swift:252-256 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:469-473 | Sources/RepoBarCore/API/GitHubSearchModels.swift:148-152 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:122-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBarCore/API/GitHubRecentDecoders.swift:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 4) RepoBariOS/Sources/Support/RepositorySortKey+Label.swift:4— RepoBariOS/Sources/Support/RepositorySortKey+Label.swift:4-13 | Sources/RepoBar/Support/RepositorySortKey+Labels.swift:12-21 | Sources/RepoBar/Support/RepositorySortKey+Labels.swift:23-32 | Sources/RepoBar/Support/RepositorySortKey+Labels.swift:34-43 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 7) Sources/RepoBar/Views/CommitMenuItemView.swift:73— Sources/RepoBar/Views/CommitMenuItemView.swift:73-81 | Sources/RepoBar/Views/ContributorMenuItemView.swift:43-51 | Sources/RepoBar/Views/DiscussionMenuItemView.swift:65-73 | Sources/RepoBar/Views/IssueMenuItemView.swift:68-76 | Sources/RepoBar/Views/MenuItemViews.swift:312-320 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:84-92 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:72-80 — before extracting anything, compare `Sources/RepoBar/Views/DiscussionMenuItemView.swift` and `Sources/RepoBar/Views/IssueMenuItemView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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 (6 lines × 4) Sources/repobarcli/AccountsCommands.swift:93— Sources/repobarcli/AccountsCommands.swift:93-98 | Sources/repobarcli/AccountsCommands.swift:123-128 | Sources/repobarcli/LocalActionsCommands.swift:262-267 | Sources/repobarcli/LocalActionsCommands.swift:289-294 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 14) Sources/repobarcli/ArchiveCommands.swift:61— Sources/repobarcli/ArchiveCommands.swift:61-67 | Sources/repobarcli/ArchiveCommands.swift:115-121 | Sources/repobarcli/ArchiveCommands.swift:159-165 | Sources/repobarcli/ArchiveCommands.swift:382-388 | Sources/repobarcli/ArchiveCommands.swift:423-429 | Sources/repobarcli/ArchiveCommands.swift:467-473 | Sources/repobarcli/LocalActionsCommands.swift:19-25 | Sources/repobarcli/LocalActionsCommands.swift:69-75 | Sources/repobarcli/LocalActionsCommands.swift:170-176 | Sources/repobarcli/LocalActionsCommands.swift:218-224 | Sources/repobarcli/SettingsCommands.swift:19-25 | Sources/repobarcli/SettingsCommands.swift:62-68 | Sources/repobarcli/SettingsCommands.swift:102-108 | Sources/repobarcli/SettingsCommands.swift:145-151 — there are 14 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 14 sites; resolving a subset leaves the remainder to drift apart.
Off the main sequence: RepoBarCore — RepoBarCore: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Coverage not measured — Swift suite — 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. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
Duplicated block (5 lines × 3 locations) Scripts/ghrest.ts:63— Scripts/ghrest.ts:63 · Scripts/ghrest.ts:104 · Scripts/ghrest.ts:137 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function extractMetadata (cyclomatic 16, cognitive 32) Scripts/docs-list.mjs:28— extractMetadata has cyclomatic complexity 16 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 8) Scripts/ghql.ts:72— (anonymous) has cyclomatic complexity 11 and cognitive complexity 8; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Duplicated predicate Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift:152— `host == "github.com" || host.hasSuffix(".github.com")` appears character-identically in 2 files — Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift, Sources/RepoBarCore/Support/GitHubReferenceTranslator+URLs.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/RepoBarCore/Support/GitHubReferenceTranslator+Context.swift:411— `normalized.contains("sha") || normalized.contains("commit") || normalized.contains("hash")` appears character-identically in 2 files — Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.swift, Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.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/RepoBarCore/LocalProjects/LocalGitService.swift:367— `status.contains("M") || status.contains("R") || status.contains("C") || status.contains("T") || status.contains("U")` appears character-identically in 2 files — Sources/RepoBarCore/LocalProjects/LocalGitService.swift, Sources/RepoBarCore/LocalProjects/LocalProjectsService.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.
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 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (44635 LoC, 205 public types across 9 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 8 of 183 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 183 of the 291 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Sources/RepoBarCore/Models/ActionsUsageInfo.swift, Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift, Sources/RepoBar/Views/ActionsLimitsMenuViews.swift, Sources/RepoBar/App/AppState+Actions.swift, Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift, Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift, Sources/RepoBar/Auth/PATAuthenticator.swift, Sources/RepoBarCore/Settings/AccountScopedRepositoryLists.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
No SAST — 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 3138 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.
Outdated: commander — `commander` is resolved at 0.2.4, but 0.3.0 is the newest release tagged on https://github.com/steipete/Commander within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update commander` 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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 38 file(s) — `RepoBariOS/Sources/App/AppModel.swift`, `RepoBariOS/Sources/App/RepoBariOSApp.swift`, `RepoBariOS/Sources/Models/RepoDetailModel.swift`, `Sources/RepoBar/App/AppState+Accounts.swift`, `Sources/RepoBar/App/AppState+Activity.swift`, … (+33 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 01a0f6bb-c655-7106-9208-a0726c9a2209 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 5 · Warnings: 293 · Recommendations: 10 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 01-10-2026 @ 09:11 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.