Public report of steipete/RepoBar, published 15 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 15 November 2026, 01:31 UTC · Survey ID cd_b7e1e53e0a04444c99a83f20dd4c3bf2

steipete/RepoBar

Measured 15 November 2026, 01:31 UTC, at code version 449531a

CAI score 63out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 7 since the last survey

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

A medium codebase: 45,490 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 54

Findings by how serious they are

5 critical 434 serious 27 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 01:31 UTC

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

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

54of 54 dimensions measured by tools.
455of 466 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
54dimensions across 7 lenses, read from 45,490 lines of product code in 4 projects.
Chapters

Executive summary

steipete/RepoBar falls short of our standard for a preview release because we found no automated security scanning of the code, its secrets or its dependencies. It scores 63 out of 100 and is rated Adequate, and four of its five critical findings are security problems.

Production Readiness, at 54, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 8 points. Adding automated security scanning comes next, worth about 7 points. Raising Production Readiness to 62 would lift the score to about 67.

Two passwords or keys in the code's history and one in the code are open to anyone who can read the repository. One automatic update takes new releases before a bad one can be spotted. Replacing each exposed password or key and setting a waiting period for automatic updates would close both risks. Moving the business rules into the object that owns the data would take care of the business object that only holds data.

The product code is 45,490 lines, about €69,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 54 · counts for 46%Maturity 69 · counts for 25%Code Health 69 · counts for 14%Performance 70 · counts for 8%Security and Compliance 79 · counts for 4%Domain Modelling 86 · counts for 2%Architecture 90 · counts for 1%

If Production Readiness rose from 54 to 62, the lowest score rated Strong, the score would rise from 63 to about 67.

Code composition: what the lines of code are
Product code 74%Tests 26%
New since the last survey: 159 findings

These 159 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · AppState.migrateLegacyAccountIfNeeded (cyclomatic 16) Sources/RepoBar/App/AppState+Accounts.swift
  • Code Duplication · Near-duplicate member pair (32 shared lines) Sources/RepoBarCore/API/GraphQLClient.swift
  • Code Duplication · Edited copies of one member (3 members, 58+ corresponding lines) Sources/repobarcli/RecentListsOutput.swift
  • Code Duplication · Edited copy of a member (56 corresponding lines) Sources/repobarcli/RecentListCommands.swift
  • Code Duplication · Edited copy of a member (41 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/RepoBarCore/API/GitHubRequestRunner.swift
  • Code Duplication · Edited copy of a member (58 corresponding lines) RepoBariOS/Sources/App/AppModel.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift
  • Code Duplication · Edited copy of a member (32 corresponding lines) Sources/RepoBar/Views/MenuLabelChipsView.swift
  • Code Duplication · Edited copy of a member (40 corresponding lines) Sources/repobarcli/VerifyCommands.swift
  • Code Duplication · Edited copy of a member (43 corresponding lines) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift
  • Code Duplication · Edited copy of a member (31 corresponding lines) Sources/RepoBar/Views/MenuFilterViews.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift
  • Code Duplication · Edited copies of one member (6 members, 26+ corresponding lines) Sources/repobarcli/RecentListCommands.swift
  • Code Duplication · Edited copy of a member (35 corresponding lines) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift
  • Code Duplication · Edited copy of a member (35 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) RepoBariOS/Sources/App/AppModel.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) RepoBariOS/Sources/Views/ActivityView.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/RepoBar/Views/LocalRepoStateMenuView.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift
  • Code Duplication · Edited copies of one member (4 members, 26+ corresponding lines) Sources/repobarcli/RecentListsOutput.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) RepoBariOS/Sources/App/AppModel.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift
  • Code Duplication · Edited copy of a member (29 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/repobarcli/RecentItemsOutput.swift
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift
  • Code Duplication · Edited copy of a member (29 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) Sources/RepoBar/Views/BranchMenuItemView.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) RepoBariOS/Sources/App/AppModel.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/RepoBar/Views/MenuLabelChipsView.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveStore.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/RepoBar/App/AppState+Activity.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Sources/repobarcli/RecentListsOutput.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/RepoBar/Views/MenuBannerViews.swift
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) Sources/repobarcli/ArchiveCommands.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Sources/RepoBar/Settings/DisplaySettingsView.swift
  • Code Duplication · Edited copies of one member (6 members, 12+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/RepoBar/App/AppState+IssueNavigation.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift
  • Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) Sources/repobarcli/SettingsCommands.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBar/Views/MenuBannerViews.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift
  • Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) Sources/RepoBar/App/AppState+IssueNavigation.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/repobarcli/RecentListCommands.swift
  • Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) RepoBariOS/Sources/Support/RefreshScheduler.swift
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/RepoBar/Settings/DebugSettingsView.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/RepoBarCore/Models/RepoRecentItems.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/RepoBarCore/API/GitHubModels.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/RepoBar/Views/ContributorMenuItemView.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/RepoBar/Views/RecentListSubmenuRowView.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) RepoBariOS/Sources/Views/RepoCardView.swift
  • Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/RepoBar/Views/IssueNavigatorComponents.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Auth/OAuthTokenRefresher.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Settings/UserSettings.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/RepoBar/Views/LocalBranchMenuRowView.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift

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

Fixed since the last survey: 43 findings

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

  • Cyclomatic Complexity · docs-list.extractMetadata (cyclomatic 16) Scripts/docs-list.mjs
  • Cognitive Complexity · docs-list.extractMetadata (cognitive 32) Scripts/docs-list.mjs
  • God Classes · ClassTooLong: AccountSettingsView Sources/RepoBar/Settings/AccountSettingsView.swift
  • God Classes · ClassTooLong: StatusBarMenuManager Sources/RepoBar/StatusBar/StatusBarMenuManager.swift
  • Code Duplication · Near-duplicate member pair (31 shared lines) Sources/RepoBarCore/API/GraphQLClient.swift
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift
  • Code Duplication · Duplicated block (34 lines × 2) Sources/RepoBar/Views/LocalBranchMenuRowView.swift
  • Code Duplication · Duplicated block (19 lines × 2) Sources/RepoBarCore/Settings/MenuCustomization.swift
  • Code Duplication · Duplicated block (16 lines × 2) RepoBariOS/Sources/Views/RepoDetailView.swift
  • Code Duplication · Duplicated block (15 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Duplicated block (13 lines × 2) Sources/RepoBarCore/Models/RepoRecentItems.swift
  • Code Duplication · Duplicated block (12 lines × 5) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift
  • Code Duplication · Duplicated block (12 lines × 4) Sources/repobarcli/CLIArgumentNormalizer.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/RepoBar/StatusBar/RecentMenuService.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/RepoBarCore/Models/RepoRecentItems.swift
  • Code Duplication · Duplicated block (11 lines × 2) Sources/RepoBar/Settings/AccountSettingsView.swift
  • Code Duplication · Duplicated block (10–11 lines × 2) Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift
  • Code Duplication · Duplicated block (11 lines × 2) Sources/repobarcli/RecentListCommands.swift
  • Code Duplication · Duplicated block (10 lines × 2) Sources/RepoBarCore/Settings/MenuCustomization.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/RepoBar/Settings/AccountSettingsView.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/RepoBarCore/API/GraphQLClient.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/repobarcli/LocalListsOutput.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/RepoBar/App/AppState+IssueNavigation.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/RepoBar/Views/LocalBranchMenuRowView.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/repobarcli/CLIArgumentNormalizer.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/RepoBarCore/API/GitHubRestAPI.swift
  • Code Duplication · Duplicated block (7 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift
  • Code Duplication · Duplicated block (5 lines × 2) RepoBariOS/Sources/Support/RefreshScheduler.swift
  • Code Duplication · Duplicated block (5 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift
  • Code Duplication · Duplicated block (8 lines × 2) RepoBariOS/Sources/Views/RepoDetailView.swift
  • Code Duplication · Duplicated block (13 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift
  • REDACTED Scanning · Leaked secret: REDACTED .mac-release.env
  • Change Coupling · Change coupling: SettingsView.swift ↔ LocalProjectsService.swift Sources/RepoBar/Settings/SettingsView.swift
  • Test Coverage · No test reaches this file Scripts/docs-list.mjs
  • Test Coverage · No test reaches this file Scripts/generate-llms.mjs
  • Test Coverage · No test reaches this file Scripts/json_to_sdl.js
  • Cancellation propagation · Async function without AbortSignal: execute Scripts/ghql.ts
  • Cancellation propagation · Async function without AbortSignal: get Scripts/ghrest.ts
  • Exception handling · Swallowed exception (empty catch) Scripts/docs-list.mjs
Rebuild cost: about €69,000 · Estimate
Cost to rebuild€23,000 to €120,000, for 384 to 1,217 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 63. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 45,490 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 8 points · Low effort · REDACTED Scanning
2
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.
Raises the score by about 7 points · Medium effort · Security & performance tooling
3
Resolve the 4 No assertions finding(s) in Test Quality — start with DiagnosticsLoggerTests.swift, RepoBarCoreModelsTests.swift, UserSettingsCoverageTests.swift.
Raises the score by about 2 points · Low effort · Test Quality

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €69,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 54 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 14,571 lines over the last 90 days, which is about 59,094 lines a year. At that pace, the extra work comes to an estimated 4.3 to 25.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch RepoBar (SwiftPM) RepoBar (SwiftPM) RepoBarCore RepoBarCore RepoBar (SwiftPM)->RepoBarCore repobar (npm) repobar (npm) repobarcli repobarcli repobarcli->RepoBarCore

Architecture: which parts of the code depend on which

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 .github.scripts2 Scripts3 docs4 repobarcli5 RepoBarCore6 RepoBariOS~Support7 repository8 RepoBar9 RepoBariOS~App10 RepoBariOS~Auth11 RepoBariOS~Models12 RepoBariOS~Views
1 .github.scripts
2 Scripts
3 docs
4 repobarcli64
5 RepoBarCore252
6 RepoBariOS~Support2
7 repository1
8 RepoBar148207
9 RepoBariOS~App417
10 RepoBariOS~Auth33
11 RepoBariOS~Models313
12 RepoBariOS~Views1516132
Uses a module listed above itPart of a loopThe module itself
1 .github.scripts2 Scripts3 docs4 repobarcli5 RepoBarCore6 RepoBariOS~Support7 repository8 RepoBar9 RepoBariOS~App10 RepoBariOS~Auth11 RepoBariOS~Models12 RepoBariOS~Views.github.scripts1Scripts2docs3repobarcli4RepoBarCore5RepoBariOS~Support6repository7RepoBar8RepoBariOS~App9RepoBariOS~Auth10RepoBariOS~Models11RepoBariOS~Views126425221148207417333131516132

At a glance — Code Health · 69% · Strong ·

At a glance — Architecture · 90% · Adequate · gated by D26 ·

At a glance — Maturity · 69% · Adequate · gated by M2 ·

At a glance — Readiness · 54% · Adequate · gated by P3 ·

At a glance — Security · 79% · Strong ·

At a glance — Domain Modelling · 86% · Exemplary ·

At a glance — Performance · 70% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures4High / Critical
A03:2025 — Software Supply Chain Failures3Medium
A05:2025 — Injection1High / Critical

Roadmap

Top priorities: 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; Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+7.7 ptsLowREDACTED Scanning
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.+7.3 ptsMediumSecurity & performance tooling
Resolve the 4 No assertions finding(s) in Test Quality — start with DiagnosticsLoggerTests.swift, RepoBarCoreModelsTests.swift, UserSettingsCoverageTests.swift.+2.0 ptsLowTest Quality
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+2.9 ptsMediumDeployment & Rollback
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Package.swift.+1.4 ptsLowADR Quality
Add `tsc --noEmit` as package.json scripts and run them in CI.+1.4 ptsMediumTooling
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.3 ptsMediumArchitecture documentation
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.+1.2 ptsMediumAsync & latency hygiene

File quality

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

FileScoreBandWorst signal
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift5.7MixedCyclomatic Complexity: StatusBarMenuBuilder.mainMenuItems (cyclomatic 45)
Sources/repobarcli/CLIOutput.swift6.3MixedCyclomatic Complexity: CLIOutput.swift.tableLines (cyclomatic 22)
Sources/RepoBar/StatusBar/StatusBarMenuManager.swift6.3MixedGod Classes: TooManyMethods: StatusBarMenuManager
Sources/repobarcli/RecentListsOutput.swift7.0Near-cleanCyclomatic Complexity: RecentListsOutput.swift.recentTableLines (cyclomatic 22)
Sources/RepoBarCore/LocalProjects/LocalGitService.swift7.0Near-cleanCyclomatic Complexity: LocalGitService.swift.dirtyCounts (cyclomatic 17)
Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift7.0Near-cleanCognitive Complexity: LocalGitMenuCoordinator.populateCombinedBranchMenu (cognitive 20)
Sources/RepoBar/App/AppState.swift7.0Near-cleanGod Classes: TooManyMethods: AppState
Sources/RepoBarCore/API/GitHubRestAPI.swift7.0Near-cleanGod Classes: TooManyMethods: GitHubRestAPI
Sources/RepoBarCore/API/GitHubClient.swift7.0Near-cleanGod Classes: TooManyMethods: GitHubClient
RepoBariOS/Sources/App/AppModel.swift7.0Near-cleanCode Duplication: Edited copy of a member (58 corresponding lines)
Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift7.0Near-cleanCode Duplication: Edited copy of a member (35 corresponding lines)
Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift7.0Near-cleanCyclomatic Complexity: RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45)
Sources/RepoBarCore/Auth/TokenStore.swift7.0Near-cleanCyclomatic Complexity: TokenStore.scanFileAccountIDs (cyclomatic 18)
Sources/repobarcli/RecentListCommands.swift7.0Near-cleanCognitive Complexity: ActivityCommand.run (cognitive 20)
RepoBariOS/Sources/Views/HeatmapView.swift7.0Near-cleanCode Duplication: Edited copy of a member (4 corresponding lines)
Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift7.0Near-cleanCyclomatic Complexity: LocalProjectsService.snapshot (cyclomatic 19)
Sources/RepoBar/Views/ActionsLimitsMenuViews.swift7.0Near-cleanCode Duplication: Edited copy of a member (24 corresponding lines)
Sources/repobarcli/SettingsSupport.swift7.1Near-cleanCyclomatic Complexity: SettingsSupport.swift.applySetting (cyclomatic 67)
Sources/repobarcli/ArchiveCommands.swift7.1Near-cleanCyclomatic Complexity: ArchivesAddCommand.archiveSource (cyclomatic 21)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 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 — 434

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

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

Could not be resolved — 30

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

Methodology & how to trust this report

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

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

What we checked — 54 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D17D19D20D26D27D28D29D30D34D35D36D43D44AX10AX3AX4AX8AX9DM4DM5DM6M1M2M3M4P1P10P2P3P4P6PF3R1R10R2R3R6R7R8R9X26X28X3

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 455 of 466 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dcd4-62c9-76de-b93f-bf548059d58f.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 134 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) (.ts, .mjs) 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift, .ts, .mjs) and this repository declares a SwiftPM test suite (RepoBar), but it was not re-run: the analyzer environment could not run it. 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its 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 (22 contributor(s) across 1076 commit(s) sampled, automation and bot accounts excluded). One of them holds 96% of the history; the other 21 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.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `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`, … (+34 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. A program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. (rule: missing-tool). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> repobar@0.10.4 start / > ./Scripts/compile_and_run.sh / ==> Killing existing RepoBar instances / ==> swift build / ./Scripts/compile_and_run.sh: line 40: swift: command not found" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> repobar@0.10.4 start / > ./Scripts/compile_and_run.sh / ==> Killing existing RepoBar instances / ==> swift build / ./Scripts/compile_and_run.sh: line 40: swift: command not found" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby 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.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A badge or prose version claim scored 9/17 in its adjudication (docs/plans/deterministic-engine/adjudication/M4-v3.md: badges 9/9, prose 0/8, where prose versions are minimums or history), short of the 95 % precision gate, so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them. The .NET and Node.js version checks are a different kind and still publish.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin 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.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
  • X15 Unvalidated length from an untrusted reader — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart 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.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin 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.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP 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.
  • X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP 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.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python 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.
  • X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby 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.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin 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.
  • X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala 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.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript 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.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.4 / 10Adequate✓ Tool-verified

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

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

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

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

SettingsSupport.swift.applySetting (cyclomatic 67)Sources/repobarcli/SettingsSupport.swift:125
CLIArgumentNormalizer.normalize (cyclomatic 52)Sources/repobarcli/CLIArgumentNormalizer.swift:5
RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45)Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:83
StatusBarMenuBuilder.mainMenuItems (cyclomatic 45)Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102
RepoDetailCoordinator.fullRepository (cyclomatic 31)Sources/RepoBarCore/API/RepoDetailCoordinator.swift:32

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

What to do

  1. Bring the 5 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with SettingsSupport.swift.applySetting (cyclomatic 67), CLIArgumentNormalizer.normalize (cyclomatic 52), RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cyclomatic Complexity from 6.4 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity6.6 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

64 method(s) exceeded the cognitive complexity threshold of 15; the worst was SettingsSupport.swift.applySetting at 59.

SettingsSupport.swift.applySetting (cognitive 59)Sources/repobarcli/SettingsSupport.swift:125
CLIArgumentNormalizer.normalize (cognitive 53)Sources/repobarcli/CLIArgumentNormalizer.swift:5
AccountSettingsView.body (cognitive 52)Sources/RepoBar/Settings/AccountSettingsView.swift:29
StatusBarMenuBuilder.mainMenuItems (cognitive 48)Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102
RepoSubmenuBuilder.repoSubmenuItems (cognitive 45)Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:83

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

What to do

  1. Bring the 12 bodies over 30 down to 30 or less in Cognitive Complexity — start with SettingsSupport.swift.applySetting (cognitive 59), CLIArgumentNormalizer.normalize (cognitive 53), AccountSettingsView.body (cognitive 52). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cognitive Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

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

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

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

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

24 god class(es) detected.

TooManyMethods: AppState · ×9Sources/RepoBar/App/AppState.swift:5
MethodTooLong: RepoDetailView.body · ×9RepoBariOS/Sources/Views/RepoDetailView.swift:16
ClassTooLong: LocalGitMenuCoordinator · ×3Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:6
FileTooLong: API/GitHubRestAPI.swift · ×2Sources/RepoBarCore/API/GitHubRestAPI.swift
FunctionTooLong: SettingsSupport.swift.applySettingSources/repobarcli/SettingsSupport.swift:125

What to do

  1. 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).
  2. Resolve the 9 MethodTooLong finding(s) in God Classes — start with RepoDetailView.swift, AdvancedSettingsView.swift, RepoSubmenuBuilder.swift. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 3 ClassTooLong finding(s) in God Classes — start with LocalGitMenuCoordinator.swift, GitHubRestAPI.swift, AdvancedSettingsView.swift. — One of this dimension's main actionable groups (3 warning-level).

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

D4 · Code Duplication4.8 / 10Weak✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

124 duplicated block group(s) detected. 13.0 % of the production lines (5,908 of 45,490) are in a reported copy. A further 144 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (10 lines × 2) · ×11RepoBariOS/Sources/App/AppModel.swift:60
Edited copy of a member (4 corresponding lines) · ×10Sources/RepoBar/Support/RepositoryHydration.swift:5
Duplicated block (8 lines × 2) · ×10RepoBariOS/Sources/App/AppModel.swift:126
Edited copy of a member (10 corresponding lines) · ×8Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510
Edited copy of a member (6 corresponding lines) · ×8Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:108

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

What to do

  1. Resolve the 11 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with RecentListsOutput.swift (3), AppModel.swift, AppState+IssueNavigation.swift. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 10 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with HeatmapView.swift (2), RepositoryHydration.swift, GitHubReferenceTranslator+Context.swift. — One of this dimension's main actionable groups (10 warning-level).
  3. 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).

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

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.

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

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

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

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

D6 · Cohesion (LCOM4)9.5 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

2 of 53 classes have LCOM4 above 3.

Low cohesion: StatusBarMenuManager (LCOM4 6) · ×2Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6

What to do

  1. 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).

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

D10 · Test Quality9.6 / 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.

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

0 skipped, 4 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 134 tests. Measured on the .swift suite only — at least 2 test source file(s) (.ts, .mjs) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: · ×4Tests/RepoBarTests/DiagnosticsLoggerTests.swift:6

What to do

  1. 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).

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

D12 · Dependency Hygiene9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

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: kingfisher

✓ On the Gold path — maintain.

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

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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

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

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

1 secret(s) detected. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

0 of 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 7 serious findings✓ Tool-verified

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

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

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

Top hotspots: Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift (3×45=135) Repeated repair below the complexity floor: Sources/RepoBarCore/API/GitHubRequestRunner.swift (4 of 4 changes were fixes); Sources/RepoBar/StatusBar/StatusBarMenuManager.swift (3 of 4 changes were fixes); Sources/RepoBar/StatusBar/StatusBarMenuBuilder+Signatures.swift (3 of 4 changes were fixes)

Repeated repair: Sources/RepoBarCore/API/GitHubRequestRunner.swift · ×6Sources/RepoBarCore/API/GitHubRequestRunner.swift:50
Hotspot: Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swiftSources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102

What to do

  1. Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with GitHubRequestRunner.swift, StatusBarMenuManager.swift, StatusBarMenuBuilder+Signatures.swift. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with StatusBarMenuBuilder.swift. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundPackage.swift:14

What to do

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

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 2 build units (Xcode, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

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

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

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

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

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

18 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

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

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

D29 · Static Analysis (SAST)8.4 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

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

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

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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

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

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness9.7 / 10Exemplary✓ Tool-verified

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

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

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

5 of 187 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift. Counted over 187 of the 301 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×5Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:1
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.

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

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

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

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

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

Strongest change-coupling: StatusBarMenuManager.swift↔RepoRecentItems.swift 80%; GitHubReferenceBrowserMenuItemView.swift↔StatusBarMenuManager.swift 70%; CLIOutput.swift↔Commands.swift 62%

Change coupling: CLIOutput.swift ↔ Commands.swift · ×2Sources/repobarcli/CLIOutput.swift:1
Change-coupling hub: StatusBarMenuManager.swift → GitHubReferenceBrowserMenuItemView.swift, StatusBarMenuBuilder+RepoSubmenus.swift, AppLimits.swift, MenuRepoFilters.swift, RepoRecentItems.swiftSources/RepoBar/StatusBar/StatusBarMenuManager.swift

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with CLIOutput.swift, StatusBarMenuBuilder.swift. — One of this dimension's main actionable groups (2 warning-level).
  2. 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.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.9 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

DM4 · Rich vs anemic domain model6.9 / 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.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

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.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

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.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

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

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add 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 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/ci.yml:6
  • `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:28

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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene7.0 / 10Strong✓ Tool-verified

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

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

  • `installCLI` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — Sources/RepoBar/Settings/AdvancedSettingsView.swift:392
  • `run` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — Sources/repobarcli/LoginCommands.swift:196

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
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.
R10 · Code Duplication8.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 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.
R2 · Cyclomatic Complexity9.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

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

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.
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

X3 · Exception handling4.9 / 10Adequate✓ Tool-verified

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

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

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×25) — Sources/repobarcli/ChangelogCommand.swift:124, Sources/repobarcli/LocalActionsSupport.swift:252, Sources/RepoBarCore/Support/GitHubArchiveStore.swift:404, …

What to do

  • Swallowed exception (caught, then discarded)

Reference — by lens

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

LensScoreRatingImpact
Code Health69%StrongSolid.
Architecture90%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity69%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness54%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security79%StrongSolid.
Domain Modelling86%ExemplaryStrongest area.
Performance70%StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 77 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.
  • 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 function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. 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 — no exported interface declares behaviour
  • 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 (`npm run start`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> repobar@0.10.4 start / > ./Scripts/compile_and_run.sh / ==> Killing existing RepoBar instances / ==> swift build / ./Scripts/compile_and_run.sh: line 40: swift: command not found" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .swift source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • 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) — 39 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Swift suite
  • 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 — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the 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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `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.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — no production JavaScript/TypeScript files to cover (2 test file(s) present) — nothing to measure
  • 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 — 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
  • X13 Undrained process stream — 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
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not 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
  • X16 Unfloored truncation loop — 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
  • X17 Uncapped recursion over a caller-supplied document — 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
  • X18 Disposal-pattern 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
  • X19 Unrestored process-global state — 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
  • 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 asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release 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
  • X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — 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 applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. Swift's `Array`, `Dictionary` and `Set` are values: `for x in items` walks the copy taken when the loop starts, so a body that adds to or removes from `items` changes a different value, nothing is invalidated, and every original element is still visited. This repository's Swift names no Foundation mutable collection (`NSMutableArray` and kin), the one kind a Swift loop can walk by reference. Not a gap in the analyzer and not a finding about your code.
  • X29 Per-element action decided by a fixed element — 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.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 5 finding(s)
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
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.
Serious — 434 finding(s)
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×25
  • Swallowed exception (caught, then discarded) Sources/repobarcli/ChangelogCommand.swift:124 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/repobarcli/LocalActionsSupport.swift:252 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/Support/GitHubArchiveStore.swift:404 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/Support/RepoDetailCacheStore.swift:74 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/Support/RepoDetailStore.swift:65 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:250 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift:133 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:225 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:239 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:252 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:266 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:279 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:293 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Support/AsyncTimeout.swift:19 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:84 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:93 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/StatusBar/RecentListCache.swift:109 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Settings/RepoSettingsView.swift:396 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Auth/AccountManager.swift:70 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Auth/AccountManager.swift:80 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/Auth/OAuthCoordinator.swift:68 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/App/AppState+Accounts.swift:42 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/App/AppState+IssueNavigation.swift:235 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Sources/RepoBar/App/AppState.swift:172 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) RepoBariOS/Sources/Views/AddRepoSheet.swift:60 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×11
  • Duplicated block (10 lines × 2) RepoBariOS/Sources/App/AppModel.swift:60 — RepoBariOS/Sources/App/AppModel.swift:60-69 | Sources/RepoBar/App/AppState.swift:78-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/RepoBar/App/AppState.swift:78` 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/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/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 (10 lines × 2) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:404 — Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:404-413 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder+MenuItems.swift:82-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 (10 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:74 — RepoBariOS/Sources/Views/HeatmapView.swift:74-83 | Sources/RepoBar/Views/HeatmapView.swift:62-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.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×10
  • Edited copy of a member (4 corresponding lines) Sources/RepoBar/Support/RepositoryHydration.swift:5 — Sources/RepoBar/Support/RepositoryHydration.swift:5-11 | RepoBariOS/Sources/App/AppModel.swift:413-416 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.swift:409 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.swift:409-412 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:425-428 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) RepoBariOS/Sources/Views/HeatmapView.swift:53 — RepoBariOS/Sources/Views/HeatmapView.swift:53-56 | Sources/RepoBar/Views/HeatmapView.swift:41-44 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/RepoBar/Views/HeatmapRasterView.swift:310 — Sources/RepoBar/Views/HeatmapRasterView.swift:310-313 | Sources/RepoBar/Views/HeatmapView.swift:73-76 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift:458 — Sources/RepoBarCore/Auth/TokenStore.swift:458-461 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:198-201 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) RepoBariOS/Sources/Views/HeatmapView.swift:85 — RepoBariOS/Sources/Views/HeatmapView.swift:85-88 | Sources/RepoBar/Views/HeatmapView.swift:78-82 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) RepoBariOS/Sources/Views/RepoCardView.swift:125 — RepoBariOS/Sources/Views/RepoCardView.swift:125-128 | RepoBariOS/Sources/Views/RepoDetailView.swift:377-380 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/RepoBar/Auth/AccountManager.swift:19 — Sources/RepoBar/Auth/AccountManager.swift:19-25 | Sources/RepoBar/Auth/OAuthCoordinator.swift:12-15 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/repobarcli/CacheCommands.swift:19 — Sources/repobarcli/CacheCommands.swift:19-22 | Sources/repobarcli/StatusCommand.swift:22-25 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:9 — Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:9-12 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationSnapshotStore.swift:9-12 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×10
  • Duplicated block (8 lines × 2) RepoBariOS/Sources/App/AppModel.swift:126 — RepoBariOS/Sources/App/AppModel.swift:126-133 | RepoBariOS/Sources/App/AppModel.swift:151-158 — 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:44 — Sources/RepoBar/Views/LocalBranchMenuRowView.swift:44-51 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:34-41 — 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/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) Sources/RepoBarCore/API/GraphQLClient.swift:75 — Sources/RepoBarCore/API/GraphQLClient.swift:75-82 | Sources/RepoBarCore/API/GraphQLClient.swift:176-183 — 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 (8 lines × 2) RepoBariOS/Sources/Views/HeatmapView.swift:65 — RepoBariOS/Sources/Views/HeatmapView.swift:65-72 | Sources/RepoBar/Views/HeatmapView.swift:53-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (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) 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.
D3 · God Classes · TooManyMethods · ×9
  • TooManyMethods: AppState Sources/RepoBar/App/AppState.swift:5 — TooManyMethods — 112 methods, declared across 12 files: App/AppState+Refresh.swift (19), App/AppState.swift (17), App/AppState+Accounts.swift (12), App/AppState+GitHubReferences.swift (12), +8 more file(s). The bar is 30 methods; this is 82 over it, 3.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StatusBarMenuManager Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6 — TooManyMethods — 107 methods, declared across 3 files: StatusBar/StatusBarMenuManager.swift (51), StatusBar/StatusBarMenuManager+Actions.swift (40), StatusBar/StatusBarMenuManager+MenuLifecycle.swift (16). The bar is 30 methods; this is 77 over it, 3.57× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GitHubRestAPI Sources/RepoBarCore/API/GitHubRestAPI.swift:10 — TooManyMethods — 76 methods, declared across 4 files: API/GitHubRestAPI.swift (41), API/GitHubRestAPI+ReferenceLookup.swift (19), API/GitHubRestAPI+Actions.swift (11), API/GitHubRestAPI+PullRequests.swift (5). The bar is 30 methods; this is 46 over it, 2.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GitHubClient Sources/RepoBarCore/API/GitHubClient.swift:4 — TooManyMethods — 70 methods, declared across 2 files: API/GitHubClient.swift (59), API/GitHubClient+Helpers.swift (11). The bar is 30 methods; this is 40 over it, 2.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RecentListMenuCoordinator Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:5 — TooManyMethods — 50 methods, declared across 2 files: StatusBar/RecentListMenuCoordinator+MenuItems.swift (26), StatusBar/RecentListMenuCoordinator.swift (24). The bar is 30 methods; this is 20 over it, 1.67× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: 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, declared across 4 files: StatusBar/StatusBarMenuBuilder+MenuItems.swift (19), StatusBar/StatusBarMenuBuilder.swift (17), StatusBar/StatusBarMenuBuilder+Activity.swift (3), StatusBar/StatusBarMenuBuilder+RepoSubmenus.swift (1). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LocalGitMenuCoordinator Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:6 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • 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.
D3 · God Classes · MethodTooLong · ×9
  • 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:29 — MethodTooLong — body runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× 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:102 — MethodTooLong — mainMenuItems runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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.repositoryHeadingListBlockParse Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.swift:20 — MethodTooLong — repositoryHeadingListBlockParse 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: 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.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×8
  • Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510-519 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:342-351 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:331 — Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:331-340 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:353-362 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:31 — Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:31-42 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:66-75 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:184 — Sources/RepoBarCore/API/GitHubClient.swift:184-193 | Sources/RepoBarCore/API/GitHubClient.swift:195-204 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) RepoBariOS/Sources/Support/RefreshScheduler.swift:18 — RepoBariOS/Sources/Support/RefreshScheduler.swift:18-27 | Sources/RepoBar/Support/RefreshScheduler.swift:18-30 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBar/Views/IssueNavigatorComponents.swift:67 — Sources/RepoBar/Views/IssueNavigatorComponents.swift:67-76 | Sources/RepoBar/Views/IssueNavigatorView.swift:324-333 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBarCore/API/GitHubRecentDecoders.swift:205 — Sources/RepoBarCore/API/GitHubRecentDecoders.swift:205-214 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:571-580 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:87 — Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:87-96 | Sources/repobarcli/ReferenceTranslateCommand.swift:146-155 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×8
  • Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:108 — Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:108-113 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationDetector.swift:49-57 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift:427 — Sources/RepoBarCore/Auth/TokenStore.swift:427-432 | Sources/RepoBarCore/Auth/TokenStore.swift:520-526 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Auth/OAuthTokenRefresher.swift:181 — Sources/RepoBarCore/Auth/OAuthTokenRefresher.swift:181-188 | Sources/repobarcli/CLIHelpers.swift:167-172 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:74 — Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:74-79 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:81-86 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBar/App/AppState+Accounts.swift:238 — Sources/RepoBar/App/AppState+Accounts.swift:238-243 | Sources/repobarcli/CLIContext.swift:77-82 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/API/GitHubRequestRunner.swift:331 — Sources/RepoBarCore/API/GitHubRequestRunner.swift:331-336 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:480-485 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBar/StatusBar/StatusBarMenuManager+Actions.swift:30 — Sources/RepoBar/StatusBar/StatusBarMenuManager+Actions.swift:30-35 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:374-379 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:313 — Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:313-318 | Sources/RepoBarCore/Support/OwnerFilter.swift:4-10 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×8
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:489 — Sources/RepoBarCore/API/GitHubClient.swift:489-491 | Sources/RepoBarCore/API/GitHubRestAPI.swift:560-568 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:493 — Sources/RepoBarCore/API/GitHubClient.swift:493-495 | Sources/RepoBarCore/API/GitHubRestAPI.swift:570-578 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:539 — Sources/RepoBarCore/API/GitHubClient.swift:539-541 | Sources/RepoBarCore/API/GitHubRestAPI.swift:609-617 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:543 — Sources/RepoBarCore/API/GitHubClient.swift:543-545 | Sources/RepoBarCore/API/GitHubRestAPI.swift:619-627 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:555 — Sources/RepoBarCore/API/GitHubClient.swift:555-557 | Sources/RepoBarCore/API/GitHubRestAPI.swift:629-637 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:33 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:33-41 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:285-287 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:43 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:43-51 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:289-291 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveImporter.swift:397 — Sources/RepoBarCore/Support/GitHubArchiveImporter.swift:397-399 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:193-195 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:511 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:511-516 | 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) RepoBariOS/Sources/Views/HeatmapView.swift:58 — RepoBariOS/Sources/Views/HeatmapView.swift:58-63 | Sources/RepoBar/Views/HeatmapView.swift:46-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.
  • 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.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×7
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveStore.swift:220 — Sources/RepoBarCore/Support/GitHubArchiveStore.swift:220-231 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:233-244 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:222 — Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:222-233 | Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:235-250 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift:528 — Sources/RepoBarCore/Auth/TokenStore.swift:528-539 | Sources/RepoBarCore/Auth/TokenStore.swift:541-552 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:36 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:36-47 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:156-167 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) RepoBariOS/Sources/Views/RepoCardView.swift:184 — RepoBariOS/Sources/Views/RepoCardView.swift:184-199 | RepoBariOS/Sources/Views/RepoDetailView.swift:397-408 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:84 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:84-96 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:410-421 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift:164 — Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift:164-178 | Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift:180-191 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) RepoBariOS/Sources/App/AppModel.swift:511 — RepoBariOS/Sources/App/AppModel.swift:511-519 | 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:511` 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+TokenValidation.swift:7 — Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift:7-15 | Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift:36-44 — 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+TokenValidation.swift:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/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/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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×7
  • Duplicated block (7 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:62 — RepoBariOS/Sources/Auth/OAuthCoordinator.swift:62-68 | 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:62` 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/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/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:82 — RepoBariOS/Sources/App/AppModel.swift:82-88 | Sources/RepoBar/App/AppState+Refresh.swift:241-247 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×7
  • 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:35 — RepoBariOS/Sources/Auth/OAuthCoordinator.swift:35-39 | 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×6
  • Repeated repair: Sources/RepoBarCore/API/GitHubRequestRunner.swift Sources/RepoBarCore/API/GitHubRequestRunner.swift:50 — Sources/RepoBarCore/API/GitHubRequestRunner.swift changed 4 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), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08: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/RepoBar/StatusBar/StatusBarMenuManager.swift Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:459 — Sources/RepoBar/StatusBar/StatusBarMenuManager.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 6 (its worst body is StatusBarMenuManager.setButtonTitle at line 459), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: restore local Git actions and OAuth refresh (#167)”; “fix(auth): offer relaunch instead of sign-in when Keychain access fails (#155)”; “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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08:00' --full-history --no-merges -- Sources/RepoBar/StatusBar/StatusBarMenuManager.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/RepoBar/StatusBar/StatusBarMenuBuilder+Signatures.swift Sources/RepoBar/StatusBar/StatusBarMenuBuilder+Signatures.swift:202 — Sources/RepoBar/StatusBar/StatusBarMenuBuilder+Signatures.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 5 (its worst body is AccountSignature.init at line 202), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(auth): offer relaunch instead of sign-in when Keychain access fails (#155)”; “fix: refresh repository submenu heatmap colors”; “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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08:00' --full-history --no-merges -- Sources/RepoBar/StatusBar/StatusBarMenuBuilder+Signatures.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/GitHubClient.swift Sources/RepoBarCore/API/GitHubClient.swift:604 — Sources/RepoBarCore/API/GitHubClient.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 10 (its worst body is GitHubClient.shouldUseArchiveFallback at line 604), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: coalesce repository detail cache writes (#150)”; “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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08:00' --full-history --no-merges -- Sources/RepoBarCore/API/GitHubClient.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 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 14 (its worst body is GraphQLClient.repoSummary at line 58), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08: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), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 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-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08: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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×6
  • Edited copy of a member (9 corresponding lines) Sources/RepoBar/Views/MenuLabelChipsView.swift:58 — Sources/RepoBar/Views/MenuLabelChipsView.swift:58-66 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:123-133 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:45 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:45-53 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:55-63 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:34 — Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:34-44 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:46-54 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:521 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:521-529 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:531-539 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:101 — Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:101-113 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:110-118 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) RepoBariOS/Sources/Views/HeatmapView.swift:92 — RepoBariOS/Sources/Views/HeatmapView.swift:92-100 | Sources/RepoBar/Views/HeatmapRasterView.swift:361-369 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×6
  • Edited copy of a member (7 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:88 — Sources/RepoBarCore/LocalProjects/LocalGitService.swift:88-95 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:97-103 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:410 — Sources/RepoBarCore/API/GitHubClient.swift:410-416 | Sources/RepoBarCore/API/GitHubRestAPI.swift:388-394 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift:269 — Sources/repobarcli/LocalActionsCommands.swift:269-275 | Sources/repobarcli/LocalActionsCommands.swift:296-302 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/RepoBar/Auth/PATAuthenticator.swift:116 — Sources/RepoBar/Auth/PATAuthenticator.swift:116-123 | Sources/RepoBarCore/Auth/Account.swift:86-92 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:710 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:710-716 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:397-403 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:722 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:722-728 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:409-415 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift:329 — Sources/RepoBarCore/API/GitHubRestAPI.swift:329-346 | Sources/RepoBarCore/API/GitHubRestAPI.swift:580-593 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:474 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:474-487 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:489-508 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/RepoBar/App/AppState+IssueNavigation.swift:88 — Sources/RepoBar/App/AppState+IssueNavigation.swift:88-101 | Sources/RepoBar/App/AppState+IssueNavigation.swift:187-208 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:68 — Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:68-81 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:264-278 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:441 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:441-454 | Sources/RepoBarCore/API/GitHubSearchModels.swift:99-118 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×5
  • Edited copy of a member (8 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift:43 — Sources/RepoBarCore/API/GitHubRestAPI.swift:43-50 | Sources/RepoBarCore/API/GitHubRestAPI.swift:157-172 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:586 — Sources/RepoBarCore/API/GitHubClient.swift:586-593 | Sources/RepoBarCore/API/GitHubClient.swift:595-602 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/RepoBar/Settings/DebugSettingsView.swift:174 — Sources/RepoBar/Settings/DebugSettingsView.swift:174-181 | Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:200-208 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:652 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:652-659 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:345-352 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) RepoBariOS/Sources/App/AppSession.swift:50 — RepoBariOS/Sources/App/AppSession.swift:50-57 | Sources/RepoBar/Support/MenuRepoFilters.swift:9-16 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×5
  • Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift:56 — Sources/RepoBarCore/Support/GitHubArchiveReader.swift:56-60 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:62-66 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift:281 — Sources/RepoBarCore/Support/GitHubArchiveReader.swift:281-285 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:287-291 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Settings/UserSettings.swift:335 — Sources/RepoBarCore/Settings/UserSettings.swift:335-340 | Sources/RepoBarCore/Settings/UserSettings.swift:409-413 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/RepoBar/Support/TerminalApp.swift:131 — Sources/RepoBar/Support/TerminalApp.swift:131-135 | Sources/repobarcli/LocalActionsSupport.swift:236-240 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+LineScoped.swift:2 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+LineScoped.swift:2-6 | Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:249-253 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×5
  • 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/LocalGitMenuCoordinator.swift:514 — Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:514-519 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:335-340 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:346-351 — 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:514` 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 (6 lines × 3) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:231 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:231-236 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:258-263 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:285-290 — 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 (6 lines × 3) Sources/repobarcli/ArchiveCommands.swift:168 — Sources/repobarcli/ArchiveCommands.swift:168-173 | Sources/repobarcli/ArchiveCommands.swift:436-441 | Sources/repobarcli/ArchiveCommands.swift:476-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/repobarcli/ArchiveCommands.swift:432` calls `update` and `Sources/repobarcli/ArchiveCommands.swift:167` 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.
D10 · Test Quality · No assertions · ×4
  • 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) Sources/RepoBar/Views/LocalRepoStateMenuView.swift:94 — Sources/RepoBar/Views/LocalRepoStateMenuView.swift:94-115 | Sources/RepoBar/Views/MenuItemViews.swift:178-198 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) RepoBariOS/Sources/App/AppModel.swift:391 — RepoBariOS/Sources/App/AppModel.swift:391-411 | Sources/RepoBar/App/AppState+Refresh.swift:259-286 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:65 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:65-87 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+Tokens.swift:110-130 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:132 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:132-152 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:203-226 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×4
  • Edited copy of a member (22 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:341 — Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:341-368 | Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:370-391 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:382 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:382-403 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:582-604 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift:77 — Sources/repobarcli/LocalActionsCommands.swift:77-98 | Sources/repobarcli/LocalActionsCommands.swift:127-153 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) RepoBariOS/Sources/App/AppModel.swift:321 — RepoBariOS/Sources/App/AppModel.swift:321-342 | Sources/RepoBar/App/AppState+Visibility.swift:34-55 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift:152 — Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift:152-166 | Sources/RepoBarCore/API/GitHubRestAPI.swift:510-524 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift:21 — Sources/RepoBarCore/Support/GitHubArchiveReader.swift:21-35 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:37-54 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14-28 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:135-150 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/RepoBar/Views/RecentListSubmenuRowView.swift:15 — Sources/RepoBar/Views/RecentListSubmenuRowView.swift:15-31 | Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:11-25 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) RepoBariOS/Sources/App/AppModel.swift:331 — RepoBariOS/Sources/App/AppModel.swift:331-342 | 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:331` 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/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/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 (12 lines × 2) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14-25 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.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. 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×4
  • 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:266-274 — 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.
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: LocalGitMenuCoordinator Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:6 — ClassTooLong — 492 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 92 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • 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: 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.
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.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) RepoBariOS/Sources/App/AppModel.swift:506 — RepoBariOS/Sources/App/AppModel.swift:506-528 | Sources/RepoBarCore/Support/GlobalActivityMerger.swift:16-41 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) RepoBariOS/Sources/Views/ActivityView.swift:91 — RepoBariOS/Sources/Views/ActivityView.swift:91-113 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:88-111 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) Sources/repobarcli/LocalActionsCommands.swift:178 — Sources/repobarcli/LocalActionsCommands.swift:178-201 | Sources/repobarcli/LocalActionsCommands.swift:226-248 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×3
  • Edited copy of a member (26 corresponding lines) Sources/repobarcli/RecentItemsOutput.swift:12 — Sources/repobarcli/RecentItemsOutput.swift:12-37 | Sources/repobarcli/RecentItemsOutput.swift:39-65 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) Sources/RepoBar/App/AppState+Activity.swift:148 — Sources/RepoBar/App/AppState+Activity.swift:148-174 | Sources/RepoBarCore/Models/Repository+Factory.swift:50-75 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:98 — Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:98-130 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:280-305 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:281 — Sources/RepoBarCore/LocalProjects/LocalGitService.swift:281-293 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:295-313 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:462-474 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBar/Views/MenuBannerViews.swift:6 — Sources/RepoBar/Views/MenuBannerViews.swift:6-18 | Sources/RepoBar/Views/MenuBannerViews.swift:24-37 | Sources/RepoBar/Views/MenuBannerViews.swift:52-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) Sources/RepoBarCore/Support/GitHubArchiveReader.swift:205 — Sources/RepoBarCore/Support/GitHubArchiveReader.swift:205-217 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:225-240 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:254-269 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×3
  • Edited copy of a member (18 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift:6 — Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift:6-28 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.swift:390-407 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) Sources/RepoBar/Settings/DisplaySettingsView.swift:39 — Sources/RepoBar/Settings/DisplaySettingsView.swift:39-56 | Sources/RepoBar/Settings/DisplaySettingsView.swift:58-75 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:49 — Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:49-66 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:82-100 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) Sources/RepoBar/Settings/GitHubAPIUsageSection.swift:171 — Sources/RepoBar/Settings/GitHubAPIUsageSection.swift:171-184 | Sources/RepoBar/Views/MenuBannerViews.swift:251-264 — 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 (14 lines × 2) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:284 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:284-297 | Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:260-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • 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/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.
D3 · God Classes · FileTooLong · ×2
  • 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 — 549 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: LocalGitMenuCoordinator (7-660). The bar is 500 significant lines; this is 49 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: CLIOutput.swift ↔ Commands.swift Sources/repobarcli/CLIOutput.swift:1 — `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: StatusBarMenuBuilder.swift ↔ RepoRecentItems.swift Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:1 — `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 · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) Sources/RepoBarCore/API/GitHubRequestRunner.swift:306 — Sources/RepoBarCore/API/GitHubRequestRunner.swift:306-329 | Sources/RepoBarCore/API/GraphQLClient.swift:253-271 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) Sources/RepoBarCore/Models/RepoRecentItems.swift:134 — Sources/RepoBarCore/Models/RepoRecentItems.swift:134-156 | Sources/RepoBarCore/Models/RepoRecentItems.swift:273-291 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift:82 — Sources/RepoBarCore/API/GitHubRestAPI+PullRequests.swift:82-116 | Sources/RepoBarCore/API/GitHubRestAPI.swift:526-558 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI.swift:174 — Sources/RepoBarCore/API/GitHubRestAPI.swift:174-206 | Sources/RepoBarCore/API/GitHubRestAPI.swift:208-243 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:12 — Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:12-35 | Sources/RepoBar/Views/MenuBannerViews.swift:116-139 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) Sources/RepoBar/Support/TerminalApp.swift:106 — Sources/RepoBar/Support/TerminalApp.swift:106-129 | Sources/repobarcli/LocalActionsSupport.swift:211-234 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×2
  • Edited copy of a member (35 corresponding lines) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:62 — Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:62-99 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:74-108 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:144 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:144-179 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:181-215 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) Sources/RepoBarCore/Auth/TokenStore.swift:312 — Sources/RepoBarCore/Auth/TokenStore.swift:312-340 | Sources/RepoBarCore/Auth/TokenStore.swift:342-371 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:305 — Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:305-333 | Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:341-375 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:453 — Sources/RepoBarCore/API/GitHubClient.swift:453-475 | Sources/RepoBarCore/API/GitHubClient.swift:477-487 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/RepoBar/Views/LocalBranchMenuRowView.swift:9 — Sources/RepoBar/Views/LocalBranchMenuRowView.swift:9-19 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:9-19 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) Sources/RepoBar/Views/MenuBannerViews.swift:71 — Sources/RepoBar/Views/MenuBannerViews.swift:71-86 | Sources/RepoBar/Views/MenuBannerViews.swift:93-108 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:259 — Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:259-274 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:290-305 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:239 — Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:239-251 | Sources/RepoBar/Views/MenuBannerViews.swift:171-189 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Sources/RepoBar/Views/ContributorMenuItemView.swift:29 — Sources/RepoBar/Views/ContributorMenuItemView.swift:29-41 | Sources/RepoBar/Views/MenuItemViews.swift:298-310 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/RepoBarCore/API/GitHubModels.swift:159 — Sources/RepoBarCore/API/GitHubModels.swift:159-170 | Sources/RepoBarCore/API/GitHubRequestRunner.swift:379-386 | Sources/RepoBarCore/API/GitHubSearchModels.swift:128-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/RepoBarCore/API/GitHubClient.swift:91 — Sources/RepoBarCore/API/GitHubClient.swift:91-98 | Sources/RepoBarCore/API/GitHubClient.swift:341-348 | Sources/RepoBarCore/API/GitHubClient.swift:419-426 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • 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/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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • 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 (14–15 lines × 2) Sources/repobarcli/LocalListsOutput.swift:32 — Sources/repobarcli/LocalListsOutput.swift:32-45 | Sources/repobarcli/LocalListsOutput.swift:101-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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) Sources/RepoBar/App/AppState+Refresh.swift:96 — Sources/RepoBar/App/AppState+Refresh.swift:96-108 | Sources/RepoBar/App/AppState+Refresh.swift:293-304 — 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:293` 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:358 — Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:358-367 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:459-469 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:268 — Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:268-272 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:548-552 | 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/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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: StatusBarMenuManager (LCOM4 6) Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:6 — StatusBarMenuManager's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking Sources/RepoBar/Settings/AdvancedSettingsView.swift:392 — `installCLI` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking Sources/repobarcli/LoginCommands.swift:196 — `run` is async and calls .waitUntilExit() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
D1 · Cyclomatic Complexity · SettingsSupport.swift.applySetting (cyclomatic 67) · ×1
  • 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.
D1 · Cyclomatic Complexity · CLIArgumentNormalizer.normalize (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · StatusBarMenuBuilder.mainMenuItems (cyclomatic 45) · ×1
  • StatusBarMenuBuilder.mainMenuItems (cyclomatic 45) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102 — StatusBarMenuBuilder.mainMenuItems 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.
D1 · Cyclomatic Complexity · RepoDetailCoordinator.fullRepository (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · AccountSettingsView.body (cyclomatic 27) · ×1
  • AccountSettingsView.body (cyclomatic 27) Sources/RepoBar/Settings/AccountSettingsView.swift:29 — AccountSettingsView.body has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IssueNavigatorModel.performSearch (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · RecentListMenuCoordinator.renderRecentItems (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · RepoDetailModel.message (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · CLIOutput.swift.tableLines (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · RecentListsOutput.swift.recentTableLines (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · GitHubReferenceTranslator.urlReference (cyclomatic 21) · ×1
  • GitHubReferenceTranslator.urlReference (cyclomatic 21) Sources/RepoBarCore/Support/GitHubReferenceTranslator+URLs.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.
D1 · Cyclomatic Complexity · RepoDetailModel.load (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · ArchivesAddCommand.archiveSource (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · GitHubPullRequestNotificationDetector.events (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · GitHubReferenceTranslator.repositoryHeadingListBlockParse (cyclomatic 20) · ×1
  • GitHubReferenceTranslator.repositoryHeadingListBlockParse (cyclomatic 20) Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.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.
D1 · Cyclomatic Complexity · ReposCommand.run (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · publish-release.main (cyclomatic 20) · ×1
  • publish-release.main (cyclomatic 20) .github/scripts/publish-release.py:17 — publish-release.main has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StatusBarMenuBuilder.actionsLimitsSubmenu (cyclomatic 19) · ×1
  • StatusBarMenuBuilder.actionsLimitsSubmenu (cyclomatic 19) Sources/RepoBar/StatusBar/StatusBarMenuBuilder+MenuItems.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.
D1 · Cyclomatic Complexity · LocalProjectsService.snapshot (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · SettingsSupport.swift.settingsSummaryLines (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · TokenStore.scanFileAccountIDs (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · RepositoryPipeline.apply (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · LocalRepoManager.partitionStatusesToRefresh (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · RateLimitStatusFormatter.sections (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · LocalGitService.swift.dirtyCounts (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · RecentItemsOutput.swift.recentItemsTableLines (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · AppState.migrateLegacyAccountIfNeeded (cyclomatic 16) · ×1
  • AppState.migrateLegacyAccountIfNeeded (cyclomatic 16) Sources/RepoBar/App/AppState+Accounts.swift:35 — AppState.migrateLegacyAccountIfNeeded has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GitHubReferenceTranslator.normalQueries (cyclomatic 16) · ×1
  • GitHubReferenceTranslator.normalQueries (cyclomatic 16) Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:56 — GitHubReferenceTranslator.normalQueries has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RepoAutocompleteScoring.score (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · LocalProjectsService.swift.parseDirtyCounts (cyclomatic 16) · ×1
  • 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102 — Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in StatusBarMenuBuilder.mainMenuItems at line 102. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:24:38 -08:00' --until='2026-11-14 00:24:38 -08:00' --full-history --no-merges -- Sources/RepoBar/StatusBar/StatusBarMenuBuilder.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.
D2 · Cognitive Complexity · SettingsSupport.swift.applySetting (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · CLIArgumentNormalizer.normalize (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · AccountSettingsView.body (cognitive 52) · ×1
  • AccountSettingsView.body (cognitive 52) Sources/RepoBar/Settings/AccountSettingsView.swift:29 — 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.
D2 · Cognitive Complexity · StatusBarMenuBuilder.mainMenuItems (cognitive 48) · ×1
  • StatusBarMenuBuilder.mainMenuItems (cognitive 48) Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift:102 — 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.
D2 · Cognitive Complexity · RepoSubmenuBuilder.repoSubmenuItems (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubPullRequestNotificationDetector.events (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · LocalProjectsService.snapshot (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.repositoryHeadingListBlockParse (cognitive 39) · ×1
  • GitHubReferenceTranslator.repositoryHeadingListBlockParse (cognitive 39) Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.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.
D2 · Cognitive Complexity · CLIOutput.swift.tableLines (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · IssueNavigatorModel.performSearch (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · RepoDetailCoordinator.fullRepository (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · RecentListsOutput.swift.recentTableLines (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · StatusBarMenuBuilder.actionsLimitsSubmenu (cognitive 30) · ×1
  • StatusBarMenuBuilder.actionsLimitsSubmenu (cognitive 30) Sources/RepoBar/StatusBar/StatusBarMenuBuilder+MenuItems.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.
D2 · Cognitive Complexity · TokenStore.scanFileAccountIDs (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.normalQueries (cognitive 28) · ×1
  • 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). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenStore.scanKeychainAccountIDs (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · RecentItemsOutput.swift.recentItemsTableLines (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · LocalRepoManager.partitionStatusesToRefresh (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · RateLimitStatusFormatter.sections (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · RecentListMenuCoordinator.renderRecentItems (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · RepoDetailModel.message (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · ReposCommand.run (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.urlReference (cognitive 24) · ×1
  • GitHubReferenceTranslator.urlReference (cognitive 24) Sources/RepoBarCore/Support/GitHubReferenceTranslator+URLs.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.
D2 · Cognitive Complexity · LocalGitService.swift.dirtyCounts (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · StatusCommand.run (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · publish-release.main (cognitive 23) · ×1
  • publish-release.main (cognitive 23) .github/scripts/publish-release.py:17 — publish-release.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, loops 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.referenceMatches (cognitive 22) · ×1
  • AppState.referenceMatches (cognitive 22) Sources/RepoBar/App/AppState+GitHubReferences.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.
D2 · Cognitive Complexity · AppState.refresh (cognitive 22) · ×1
  • AppState.refresh (cognitive 22) Sources/RepoBar/App/AppState+Refresh.swift:50 — AppState.refresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalProjectsService.swift.parseDirtyCounts (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReleaseNotificationDetector.events (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.repositoryContext (cognitive 21) · ×1
  • GitHubReferenceTranslator.repositoryContext (cognitive 21) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.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). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchivesAddCommand.archiveSource (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · LocalGitMenuCoordinator.populateCombinedBranchMenu (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · RepoAutocompleteScoring.score (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · ActivityCommand.run (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · AccountSettingsView.login (cognitive 19) · ×1
  • AccountSettingsView.login (cognitive 19) Sources/RepoBar/Settings/AccountSettingsView.swift:384 — 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.repeatedLineScopedIssueNumberMatches (cognitive 19) · ×1
  • GitHubReferenceTranslator.repeatedLineScopedIssueNumberMatches (cognitive 19) Sources/RepoBarCore/Support/GitHubReferenceTranslator+LineScoped.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.
D2 · Cognitive Complexity · RateLimitStatusFormatter.rateLimitRow (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · RepositoryPipeline.apply (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · LocalProjectsService.swift.parseDirtyFiles (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · RepoCommand.run (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · release-handoff.main (cognitive 19) · ×1
  • release-handoff.main (cognitive 19) .github/scripts/release-handoff.py:24 — release-handoff.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StatusBarMenuBuilder.rateLimitsSubmenu (cognitive 18) · ×1
  • StatusBarMenuBuilder.rateLimitsSubmenu (cognitive 18) Sources/RepoBar/StatusBar/StatusBarMenuBuilder+MenuItems.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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.contextualBareIssueQueries (cognitive 18) · ×1
  • GitHubReferenceTranslator.contextualBareIssueQueries (cognitive 18) Sources/RepoBarCore/Support/GitHubReferenceTranslator+Context.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.
D2 · Cognitive Complexity · RecentListsOutput.swift.globalCommitsTableLines (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · RecentListsOutput.swift.globalActivityTableLines (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · SettingsSupport.swift.settingsSummaryLines (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AppState.migrateLegacyAccountIfNeeded (cognitive 17) · ×1
  • AppState.migrateLegacyAccountIfNeeded (cognitive 17) Sources/RepoBar/App/AppState+Accounts.swift:35 — AppState.migrateLegacyAccountIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppState.searchIssueReferences (cognitive 17) · ×1
  • AppState.searchIssueReferences (cognitive 17) Sources/RepoBar/App/AppState+IssueNavigation.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.
D2 · Cognitive Complexity · IssueNavigatorModel.loadAISummaries (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · AboutSettingsView.body (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · LocalProjectsService.findGitRepos · ×1
  • LocalProjectsService.findGitRepos::scan (cognitive 17) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:231 — LocalProjectsService.findGitRepos::scan 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.isRepositoryHeadingSummary (cognitive 17) · ×1
  • GitHubReferenceTranslator.isRepositoryHeadingSummary (cognitive 17) Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.swift:425 — GitHubReferenceTranslator.isRepositoryHeadingSummary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RateLimitStatusFormatter.currentBlockerRows (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ArchivesStatusCommand.run (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · StatusCommand.runLegacy (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · RecentListsOutput.swift.commitsWithRepoTableLines (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · RenderPayload.renderImage (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · GraphQLClient.repoSummary (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · GraphQLClient.userContributionHeatmap (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · GitHubReferenceTranslator.spacedRepositoryHeadingSentenceQueries (cognitive 16) · ×1
  • GitHubReferenceTranslator.spacedRepositoryHeadingSentenceQueries (cognitive 16) Sources/RepoBarCore/Support/GitHubReferenceTranslator+HeadingReferences.swift:305 — GitHubReferenceTranslator.spacedRepositoryHeadingSentenceQueries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks (cognitive 16) · ×1
  • GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks (cognitive 16) Sources/RepoBarCore/Support/GitHubReferenceTranslator+RepositoryHeadingBlocks.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). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · CommitsCommand.run (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · LocalActionsSupport.swift.resolveLocalRepoTarget (cognitive 16) · ×1
  • 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.
D3 · God Classes · FunctionTooLong · ×1
  • 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.
D35 · Change Coupling · Change-coupling hub · ×1
  • 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.
D4 · Code Duplication · Near-duplicate member pair (32 shared lines) · ×1
  • Near-duplicate member pair (32 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: 32 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 · Near-duplicate member pair (30 shared lines) · ×1
  • Near-duplicate member pair (30 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: 30 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 · Near-duplicate member pair (21 shared lines) · ×1
  • Near-duplicate member pair (21 shared lines) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:26 — RepoBariOS/Sources/Auth/OAuthCoordinator.swift:26-87 | 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 (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.
D4 · Code Duplication · Edited copies of one member (3 members, 58+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 58+ corresponding lines) Sources/repobarcli/RecentListsOutput.swift:250 — Sources/repobarcli/RecentListsOutput.swift:250-307 | Sources/repobarcli/RecentListsOutput.swift:309-373 | Sources/repobarcli/RecentListsOutput.swift:489-548 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 58 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) Sources/repobarcli/RecentListCommands.swift:363 — Sources/repobarcli/RecentListCommands.swift:363-418 | Sources/repobarcli/RecentListCommands.swift:459-537 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:334 — Sources/RepoBarCore/LocalProjects/LocalGitService.swift:334-381 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:385-425 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) RepoBariOS/Sources/App/AppModel.swift:446 — RepoBariOS/Sources/App/AppModel.swift:446-504 | Sources/RepoBar/App/AppState+Activity.swift:11-68 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) Sources/RepoBar/Views/MenuLabelChipsView.swift:23 — Sources/RepoBar/Views/MenuLabelChipsView.swift:23-54 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:83-119 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) Sources/repobarcli/VerifyCommands.swift:196 — Sources/repobarcli/VerifyCommands.swift:196-235 | Sources/repobarcli/VerifyCommands.swift:268-308 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:14 — Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:14-56 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:16-68 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) Sources/RepoBar/Views/MenuFilterViews.swift:162 — Sources/RepoBar/Views/MenuFilterViews.swift:162-200 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:8-38 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift:6 — Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift:6-33 | Sources/RepoBar/Settings/AccountSettingsView+TokenValidation.swift:35-64 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 26+ corresponding lines) Sources/repobarcli/RecentListCommands.swift:31 — Sources/repobarcli/RecentListCommands.swift:31-56 | Sources/repobarcli/RecentListCommands.swift:85-110 | Sources/repobarcli/RecentListCommands.swift:139-164 | Sources/repobarcli/RecentListCommands.swift:193-218 | Sources/repobarcli/RecentListCommands.swift:247-272 | Sources/repobarcli/RecentListCommands.swift:301-326 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 26+ corresponding lines) Sources/repobarcli/RecentListsOutput.swift:19 — Sources/repobarcli/RecentListsOutput.swift:19-44 | Sources/repobarcli/RecentListsOutput.swift:78-103 | Sources/repobarcli/RecentListsOutput.swift:186-221 | Sources/repobarcli/RecentListsOutput.swift:223-248 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:335 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:335-348 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:350-358 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:360-368 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) Sources/RepoBar/Views/BranchMenuItemView.swift:9 — Sources/RepoBar/Views/BranchMenuItemView.swift:9-36 | Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:9-36 | Sources/RepoBar/Views/TagMenuItemView.swift:9-28 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) Sources/repobarcli/RecentListsOutput.swift:105 — Sources/repobarcli/RecentListsOutput.swift:105-129 | Sources/repobarcli/RecentListsOutput.swift:131-158 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) Sources/repobarcli/ArchiveCommands.swift:390 — Sources/repobarcli/ArchiveCommands.swift:390-406 | Sources/repobarcli/ArchiveCommands.swift:435-450 | Sources/repobarcli/ArchiveCommands.swift:475-490 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 12+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:217 — Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:217-228 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:230-242 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:244-255 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:257-269 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:271-282 | Sources/RepoBarCore/API/GitHubRestAPI+ReferenceLookup.swift:284-296 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift:115 — Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift:115-131 | Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift:133-147 | Sources/RepoBarCore/API/GitHubRestAPI+Actions.swift:149-160 | Sources/RepoBarCore/API/GitHubRestAPI.swift:119-130 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) Sources/repobarcli/SettingsCommands.swift:27 — Sources/repobarcli/SettingsCommands.swift:27-45 | Sources/repobarcli/SettingsCommands.swift:70-85 | Sources/repobarcli/SettingsCommands.swift:110-128 | Sources/repobarcli/SettingsCommands.swift:153-168 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) Sources/RepoBar/App/AppState+IssueNavigation.swift:314 — Sources/RepoBar/App/AppState+IssueNavigation.swift:314-319 | Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:166-171 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:148-153 | Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:76-85 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/repobarcli/RecentListCommands.swift:352 — Sources/repobarcli/RecentListCommands.swift:352-361 | Sources/repobarcli/RecentListCommands.swift:447-457 | Sources/repobarcli/VerifyCommands.swift:87-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 8+ corresponding lines) Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:250 — Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:250-257 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:259-266 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:288-295 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:297-304 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:306-317 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:392-399 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:267 — Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:267-272 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:547-552 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator+MenuItems.swift:413-418 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) Sources/RepoBarCore/LocalProjects/LocalGitService.swift:254 — Sources/RepoBarCore/LocalProjects/LocalGitService.swift:254-261 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:263-270 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:372-379 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:476-482 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:484-491 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 3+ corresponding lines) RepoBariOS/Sources/App/AppModel.swift:530 — RepoBariOS/Sources/App/AppModel.swift:530-532 | RepoBariOS/Sources/Models/RepoDetailModel.swift:119-121 | Sources/RepoBar/App/AppState+Activity.swift:70-72 | Sources/RepoBar/App/AppState+IssueNavigation.swift:167-173 | Sources/RepoBarCore/API/GitHubClient.swift:573-575 | Sources/RepoBarCore/API/RepoDetailCoordinator.swift:325-327 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:367 — Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:367-369 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:374-376 | Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift:173-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) Sources/RepoBar/Views/LocalBranchMenuRowView.swift:55 — Sources/RepoBar/Views/LocalBranchMenuRowView.swift:55-88 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:52-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) RepoBariOS/Sources/App/AppModel.swift:464 — RepoBariOS/Sources/App/AppModel.swift:464-488 | 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:464` 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) Sources/repobarcli/RecentListsOutput.swift:352 — Sources/repobarcli/RecentListsOutput.swift:352-373 | Sources/repobarcli/RecentListsOutput.swift:527-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:352` 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.
D4 · Code Duplication · Duplicated block (2–19 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18 — Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18-35 | Sources/RepoBar/Views/MenuBannerViews.swift:122-139 — 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.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) RepoBariOS/Sources/App/AppModel.swift:522 — RepoBariOS/Sources/App/AppModel.swift:522-528 | 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:522` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) RepoBariOS/Sources/Auth/OAuthCoordinator.swift:76 — RepoBariOS/Sources/Auth/OAuthCoordinator.swift:76-84 | 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 8) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 14) · ×1
  • 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.
D5 · Coupling · Off the main sequence · ×1
  • 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.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 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.
R10 · Code Duplication · Duplicated block (5 lines × 3 locations) · ×1
  • 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.
R2 · Cyclomatic Complexity · Complex function extractMetadata (cyclomatic 16, cognitive 32) · ×1
  • 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.
R6 · Tooling · No typecheck script · ×1
  • 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.
Minor — 26 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×8
  • Duplicated predicate Sources/RepoBar/App/AppState+Visibility.swift:160 — `!hiddenSet.contains(key) || pinnedSet.contains(key)` appears character-identically in 2 files — Sources/RepoBar/App/AppState+Visibility.swift, Sources/RepoBarCore/Support/RepositoryPipeline.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 RepoBariOS/Sources/App/AppModel.swift:141 — `cancelInFlight || self.refreshTask == nil` appears character-identically in 2 files — RepoBariOS/Sources/App/AppModel.swift, Sources/RepoBar/App/AppState+Refresh.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/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/API/GitHubRateLimitPolicy.swift:11 — `response.statusCode == 403 || response.statusCode == 429` appears character-identically in 2 files — Sources/RepoBarCore/API/GitHubRateLimitPolicy.swift, Sources/RepoBarCore/API/GraphQLClient.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/RepoBar/Settings/GitHubAPIUsageSection.swift:129 — `self.row.resource != nil || self.row.quotaText != nil` appears character-identically in 2 files — Sources/RepoBar/Settings/GitHubAPIUsageSection.swift, Sources/RepoBar/Views/MenuBannerViews.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/RepoBar/Settings/AccountSettingsView.swift:333 — `separator == "," || separator == " " || separator == "\n" || separator == "\t"` appears character-identically in 2 files — Sources/RepoBar/Settings/AccountSettingsView.swift, Sources/repobarcli/SettingsSupport.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.
D34 · Knowledge Freshness · Orphaned file · ×5
  • Orphaned file Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Sources/RepoBar/Support/RepoBarNotifier.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Sources/RepoBar/Auth/PATAuthenticator.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Sources/RepoBarCore/Settings/AccountScopedRepositoryLists.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch Sources/RepoBarCore/Auth/TokenStore.swift:555 — `scanFileAccountIDs` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Sources/RepoBarCore/LocalProjects/LocalGitService.swift:255 — `currentBranch` turns every thrown error into `"unknown"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:373 — `currentBranch` turns every thrown error into `"unknown"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found Package.swift:14 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `Package.swift` makes this repository a deployable product (line 14).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (42476 LoC, 700 module-visible types across 19 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 — 5 of 187 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, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 187 of the 301 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/Notifications/GitHubPullRequestNotificationDetector.swift, Sources/RepoBar/Support/RepoBarNotifier.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/ci.yml:6 — 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 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:28 — `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: kingfisher — `kingfisher` is resolved at 8.15.0, but 8.16.0 is the newest release tagged on https://github.com/onevcat/Kingfisher within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update kingfisher` 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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-075e24dbc8eb4d0abf01ad81123dc023/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-075e24dbc8eb4d0abf01ad81123dc023/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .1artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 39 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`, … (+34 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dcd4-62c9-76de-b93f-bf548059d58f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md