{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D22","name":"Internal API Consistency","shortDescription":{"text":"Internal API Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D22"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"]}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"DM6","name":"Domain \u2194 infrastructure boundary","shortDescription":{"text":"Domain \u2194 infrastructure boundary"},"helpUri":"https://codehealth.canine.dev/dimensions/DM6"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF2","name":"Allocation hygiene","shortDescription":{"text":"Allocation hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF2"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"SettingsSupport.swift.applySetting (cyclomatic 67): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"17730714b389ff0f231997e282015e90e50691dba3bc4b1df59a8ef314ddeba0"}},{"ruleId":"D1","level":"warning","message":{"text":"CLIArgumentNormalizer.normalize (cyclomatic 52): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIArgumentNormalizer.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"99c1017d5d341de4e8194b5a9eff63ec8c833d91577220c00aed7ce584df2c29"}},{"ruleId":"D1","level":"warning","message":{"text":"RepoSubmenuBuilder.repoSubmenuItems (cyclomatic 45): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"0edbdf75eb3e5b6f2a7c35f16601ee950889a1e9eda8be7bf197eed8109afd83"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusBarMenuBuilder.mainMenuItems (cyclomatic 43): StatusBarMenuBuilder.mainMenuItems has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c214bfef42b8582b7da68fb565c696411090bd85c31b497b0065f3a123bade4"}},{"ruleId":"D1","level":"warning","message":{"text":"RepoDetailCoordinator.fullRepository (cyclomatic 31): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/RepoDetailCoordinator.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e1cc8df029f24df27c225442a39c4c72a000fbf42c0a0c1fb94bfae2cb8ffc0"}},{"ruleId":"D1","level":"warning","message":{"text":"AccountSettingsView.body (cyclomatic 26): AccountSettingsView.body has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b5ced7629300ac9bf8831eb89d36443dfc5c19dab21aa48031a35b41ea521f2"}},{"ruleId":"D1","level":"warning","message":{"text":"IssueNavigatorModel.performSearch (cyclomatic 24): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/IssueNavigatorModel.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68e35e476f0b52234b7cc7a614a796aef9216d580c224cf0d5d79eacc175f6f"}},{"ruleId":"D1","level":"warning","message":{"text":"RecentListMenuCoordinator.renderRecentItems (cyclomatic 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"22216490f51ab0f27b921292ddd7eb373eaf7c2dafd15cbc37b3fd83094d5d4a"}},{"ruleId":"D1","level":"warning","message":{"text":"RepoDetailModel.message (cyclomatic 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Models/RepoDetailModel.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd6cfdbb96aff06616b458ac75c1d1cd102ccc104212384b1f43249c2acd02c"}},{"ruleId":"D1","level":"warning","message":{"text":"CLIOutput.swift.tableLines (cyclomatic 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIOutput.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc91b731d4fcf29583dff400097be7f70011a290a3e7acfb4cece76c480e156"}},{"ruleId":"D1","level":"warning","message":{"text":"RecentListsOutput.swift.recentTableLines (cyclomatic 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e3b58f380325ac7bbef485fea77dc1dde35193ed7d5e7434982982ab29f067"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubReferenceTranslator.urlReference (cyclomatic 21): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6de5f807798a7e8f4b706d658ed699927f24a6361e82ba2d7878281d2be57b"}},{"ruleId":"D1","level":"warning","message":{"text":"RepoDetailModel.load (cyclomatic 21): 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Models/RepoDetailModel.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"efac394f7242d1cc963f60b8538cb0e125b728551155abfe8a06ba059675496e"}},{"ruleId":"D1","level":"warning","message":{"text":"ArchivesAddCommand.archiveSource (cyclomatic 21): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ArchiveCommands.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2314e4897dc5ca8d7d26d88a94f22771a11409af5b0006233abd42afda3dc87"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubPullRequestNotificationDetector.events (cyclomatic 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc3f7dbb93c653e3eb96433adfc32380f50fac37f149c97167f59fe586a6f46"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubReferenceTranslator.repositoryHeadingListBlockParse (cyclomatic 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cbdd89ae93566183a35f519f1d68d7b47c29aed1c2a9a3802c67e217019a52d"}},{"ruleId":"D1","level":"warning","message":{"text":"ReposCommand.run (cyclomatic 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ReposCommand.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a85ca02c93fc7e30d080fa9749f6a62b93cf3edc4b27c9c51e4708b0bcbfa0"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusBarMenuBuilder.actionsLimitsSubmenu (cyclomatic 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"effab483f52ef3fcca801f6e96abea3b36e5aedf43fade55b761c3826873d27e"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalProjectsService.snapshot (cyclomatic 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2540ecc1343526553f6c69dddf51bd72c7e641acaf3b114039b3400dc1b7e6"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsSupport.swift.settingsSummaryLines (cyclomatic 19): 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\u0027s highest cyclomatic complexity: SettingsKey.init (cyclomatic 36) is higher and carries no row of its own \u2014 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\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a75b0f83db9f82222f4bed6a9ed00894d62438aa2fb333e80c43e367fb6abb5"}},{"ruleId":"D1","level":"warning","message":{"text":"TokenStore.scanFileAccountIDs (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Auth/TokenStore.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c18d1f386fe7d6751857b8a9ccc55b7f3296840d8d36363195cc488e223420"}},{"ruleId":"D1","level":"warning","message":{"text":"RepositoryPipeline.apply (cyclomatic 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RepositoryPipeline.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"332eb14eed969d4369a9792a15f9798eea0c5b9ba2e22a2a85bc16854e7086fd"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalRepoManager.partitionStatusesToRefresh (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Support/LocalRepoManager.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5654cebf4328da9a54bb7da61d9b2abd0ee0f27e0ee70c94144159132c0ed950"}},{"ruleId":"D1","level":"warning","message":{"text":"RateLimitStatusFormatter.sections (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7211af79bccff450734b2ca1e3633738192036249ef14f9bfafa7718492eb6"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalGitService.swift.dirtyCounts (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d471778366fcdc75d2364e68760a30aa3f43510090b6436a239f24e6cfcb20"}},{"ruleId":"D1","level":"warning","message":{"text":"RecentItemsOutput.swift.recentItemsTableLines (cyclomatic 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentItemsOutput.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"b56a72037518a7454714140048c0644d98e994b04c79e8d29fe05835b43b15b3"}},{"ruleId":"D1","level":"warning","message":{"text":"GitHubReferenceTranslator.normalQueries (cyclomatic 16): GitHubReferenceTranslator.normalQueries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde32065d47ff81482562cc5edd15f26014c2c428702b7f823a32a3d5f7d62d3"}},{"ruleId":"D1","level":"warning","message":{"text":"RepoAutocompleteScoring.score (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b84074a493162abf6da1d3fc5361dc725d9611d86c46a2d089291e11a82d1a"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalProjectsService.swift.parseDirtyCounts (cyclomatic 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbbe292d6ad88d0abcb26d2298b4b6a852376d0c5070231deac36415b5736dd"}},{"ruleId":"D1","level":"warning","message":{"text":"docs-list.extractMetadata (cyclomatic 16): docs-list.extractMetadata has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/docs-list.mjs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf42112093b66e87b817a469802269274ea343656c7247316a4e9976888f12b"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsSupport.swift.applySetting (cognitive 59): 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 \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40be8d667b2d528d5db9314dac04636745a7cb7a51a1ac5148843b762dc172f"}},{"ruleId":"D2","level":"warning","message":{"text":"CLIArgumentNormalizer.normalize (cognitive 53): 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 \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIArgumentNormalizer.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0ce6c17a3ef9870e056851b53a8cfb1a668d83703f3779f03dc416245cc9d1"}},{"ruleId":"D2","level":"warning","message":{"text":"AccountSettingsView.body (cognitive 52): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8c9086ca7d58a1da9edd44615a37fd5851e1fc01786852afa20462a81d3f9c"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarMenuBuilder.mainMenuItems (cognitive 48): 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 \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"edba4594df320a62a2c241f9ec6495f8676a635f43bd753ce74a6b02d5d12c59"}},{"ruleId":"D2","level":"warning","message":{"text":"RepoSubmenuBuilder.repoSubmenuItems (cognitive 45): 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 \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"824eb6180eacc73516c8107088505fb5fedc0352260c00400b9b9b468d634f90"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubPullRequestNotificationDetector.events (cognitive 40): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f99fb71920df0aad77600cfe3d8d6ccfbed1cdd3a88e4fb283fd87cc530f39f2"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalProjectsService.snapshot (cognitive 39): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b721da7ec9c63cb6aded8609bd4cee37cedff00411936f2703440f5305954e9"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.repositoryHeadingListBlockParse (cognitive 39): 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 \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f249201b81db57ae56d76e984e5b3061cb7c8a3a2d8b6a587d60bebac7aa399"}},{"ruleId":"D2","level":"warning","message":{"text":"CLIOutput.swift.tableLines (cognitive 39): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIOutput.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c91e2692f042fadaee42b8f673e39c17241c79e310ede88c24867d83f52800c"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueNavigatorModel.performSearch (cognitive 38): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/IssueNavigatorModel.swift"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4165ccb8f482e3e778f831af9ae47aa63ad2663792a54db75c07abfd0610de5"}},{"ruleId":"D2","level":"warning","message":{"text":"RepoDetailCoordinator.fullRepository (cognitive 34): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/RepoDetailCoordinator.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"739c1a7749a9fbdc2c5738f24bad30ba82696f875bf9b865ba6bf5836420c2d6"}},{"ruleId":"D2","level":"warning","message":{"text":"docs-list.extractMetadata (cognitive 32): docs-list.extractMetadata has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), error handling 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/docs-list.mjs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"308943fd9a81b5567caa44a37f9c1fc42d3bda4ab3dab9bacc962eb1552af745"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentListsOutput.swift.recentTableLines (cognitive 31): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"fefe7b78d605dd2128a130de70108c1653e1597ead8dc7147fab8d9522cdecbb"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarMenuBuilder.actionsLimitsSubmenu (cognitive 30): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f3f695f93381a293d57114b921b1e64ed7e124d24830b1ab25cd76ee8805d7"}},{"ruleId":"D2","level":"warning","message":{"text":"TokenStore.scanFileAccountIDs (cognitive 30): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Auth/TokenStore.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e71f68e71c92574a13b5d695cc126337c6fd76bb0f02a81fbbbe40a3f6e127"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.normalQueries (cognitive 28): GitHubReferenceTranslator.normalQueries has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 9 (14 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"c864db136b9a11f39c2a99c44feb67a9fc3e5b224ae0f23157b07570b4507026"}},{"ruleId":"D2","level":"warning","message":{"text":"TokenStore.scanKeychainAccountIDs (cognitive 27): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Auth/TokenStore.swift"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"c071e5447bdb3b2ee0ff9bfd0969951a28acc2cf3a0e8c287f7b87e55290dc8d"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentItemsOutput.swift.recentItemsTableLines (cognitive 27): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentItemsOutput.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a4fa0a4d185342930f3d907149905f813d19c5993eaee105103429385e381f"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalRepoManager.partitionStatusesToRefresh (cognitive 26): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Support/LocalRepoManager.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9974b13b61d1076c89db63fd91a05930033cbdb4a59108742fede27153c21d4"}},{"ruleId":"D2","level":"warning","message":{"text":"RateLimitStatusFormatter.sections (cognitive 26): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"c817c1652f5a8ec03f214cc5d42c3b34befbeffd64cc2d8d43f8d828999f2477"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentListMenuCoordinator.renderRecentItems (cognitive 25): 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 \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f4dfc200bea21a915d6fc8ee219fb48415b0cbf94e7199cc6807def3bd63ba"}},{"ruleId":"D2","level":"warning","message":{"text":"RepoDetailModel.message (cognitive 25): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Models/RepoDetailModel.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d9701ec859c966c494be2c84ca31c474a235c9688f4f48ca03d3ee63966cad"}},{"ruleId":"D2","level":"warning","message":{"text":"ReposCommand.run (cognitive 25): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ReposCommand.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3301bb515c9a966528c57a21a61ff1cfca667f4fa374755123aa3007b4f5e61"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.urlReference (cognitive 24): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8bc9354ddb9eae5f935ccef6cbfd5d329a474ea68113d88c6ae14294a2be27e"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalGitService.swift.dirtyCounts (cognitive 23): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2a07de68f5ecb18109ef6e95cff9c6d904b6f24a33914f2810c63567a19592"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusCommand.run (cognitive 23): 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 \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/StatusCommand.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0ebb04a858f51c856e757343280cdb5d05a36e660ea7b0046ba6ea9d60b1be"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.referenceMatches (cognitive 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c82cc350404ab4ae4dc58fdca8a0ffdeb815dcd4c8ce6e7145974d85c08f3c6"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalProjectsService.swift.parseDirtyCounts (cognitive 22): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2e1ad501fd5aec42af7d7e7426a03caead8f01c0e9d317f334f5d15d7be248"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReleaseNotificationDetector.events (cognitive 21): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubReleaseNotificationDetector.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"3855116c376fad405b5fcea7767427e74348e4b16ad808d13f13b46a7ac58502"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.repositoryContext (cognitive 21): GitHubReferenceTranslator.repositoryContext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"91457021fc8f4989a18a02cbd23bfa1df064128d563e5f8174731e8777c205f3"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchivesAddCommand.archiveSource (cognitive 21): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ArchiveCommands.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0452ae8552626721c80e33e4998b7b1294f24716c94d29de09405d7774fa26"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalGitMenuCoordinator.populateCombinedBranchMenu (cognitive 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d05e164df8c406a48e92f76cfa84e6874f48811637fe4c0056ff704ef18622"}},{"ruleId":"D2","level":"warning","message":{"text":"RepoAutocompleteScoring.score (cognitive 20): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RepoAutocompleteScoring.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde8f90ef298dedf944b221e9669f67eb28bfb1e9ee94206641fb72f69b47060"}},{"ruleId":"D2","level":"warning","message":{"text":"ActivityCommand.run (cognitive 20): 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 \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListCommands.swift"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e39920b779d4eee3e6b68261c9e4704e858ce7c02b772803a597de5e3746ee"}},{"ruleId":"D2","level":"warning","message":{"text":"AccountSettingsView.login (cognitive 19): 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 \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e87e29aa3bf07795880eb0bcf2eaf8c9dea3ec439c19dffd35f1e778db643ac"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.repeatedLineScopedIssueNumberMatches (cognitive 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a99a7b449e917f7280aef2e2bd07bd24cea11ac44e6eb325601c80b014970a"}},{"ruleId":"D2","level":"warning","message":{"text":"RateLimitStatusFormatter.rateLimitRow (cognitive 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0a761445caec90fa4641818ade5cd1eb9e92649fdb62db1b2198d4f92c8dce"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryPipeline.apply (cognitive 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RepositoryPipeline.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e0b22726887f2b3a20287e764975c463cdadb1386df330a7a071d289d9f1dd"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalProjectsService.swift.parseDirtyFiles (cognitive 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98280cb4ed538cb8e220005219e41774efd484ef4700e81daec27fafb263285"}},{"ruleId":"D2","level":"warning","message":{"text":"RepoCommand.run (cognitive 19): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/VerifyCommands.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a4d0229ceb1095c236df1682f8f617dcd458d5f403e387d0f0bb3ac877f1ad"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.refresh (cognitive 18): AppState.refresh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf96b482aba81ff680030fb5b69dcf24ffb43f97af280167b8a990d3316eb7b"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarMenuBuilder.rateLimitsSubmenu (cognitive 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f843348f4b1c35b59b6e036920808ecf8bc69ea6a6188e4ed48d583e34caa01"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.contextualBareIssueQueries (cognitive 18): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1b3a9bd8174d65564e4d8d5b3f5d2765ad37964fb121ab87d24d8ad765fa37"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentListsOutput.swift.globalCommitsTableLines (cognitive 18): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee54071dfe831e3529c8e0f4236f2f0569a56d6cf070dc419a2ff3409849cf2"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentListsOutput.swift.globalActivityTableLines (cognitive 18): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f89091ec32b47226d36693e879ddf0b825f2ec614aa04b13ea1174d43f8f158"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsSupport.swift.settingsSummaryLines (cognitive 18): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d156d1a53be36f0f21f99edb990c8f90bfb99e7d4333c0e02a8d3a6c1414bd8"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.searchIssueReferences (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"98dfe89e9c9beec8252361b79fba0009ce77217aa1bd042d987a3bc2bbbdd363"}},{"ruleId":"D2","level":"warning","message":{"text":"IssueNavigatorModel.loadAISummaries (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/IssueNavigatorModel.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0494e1807d237686ad5ae17ad73b93a85db75e5de65bd6481e23e28e4f8e0ff"}},{"ruleId":"D2","level":"warning","message":{"text":"AboutSettingsView.body (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/About/AboutSettingsView.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"209546d0a9d0ca08c5f4a34391fc2b01fa4d9b7a4cbd406c9d45bccdf1c39168"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalProjectsService.findGitRepos (cognitive 17): LocalProjectsService.findGitRepos has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a484762694b11eab4dcc46479e309c63724f0bef03c2c4664cf89ce426d95a0"}},{"ruleId":"D2","level":"warning","message":{"text":"RateLimitStatusFormatter.currentBlockerRows (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"2261d8c426d18219597386a2dbe8d680ebf0f3b498c40ac49aec355a203250c2"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchivesStatusCommand.run (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ArchiveCommands.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e9384db749bc04ca3f805d23ac82b003c29f5bd497825cce247b8783493597"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusCommand.runLegacy (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/StatusCommand.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d7a62cdacb540407c1ee5697b4487aacce13d0b3879238004932690fc80e25"}},{"ruleId":"D2","level":"warning","message":{"text":"RecentListsOutput.swift.commitsWithRepoTableLines (cognitive 17): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"74923c1941d5d5491a9ee313fbc512dd346056e0213ddfdc00e195224d269f27"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.migrateLegacyAccountIfNeeded (cognitive 16): AppState.migrateLegacyAccountIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac1f09270b8862b920c3ed6489d921097ea2d15e3fd436d42fa6674cb6f11cd"}},{"ruleId":"D2","level":"warning","message":{"text":"RenderPayload.renderImage (cognitive 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/HeatmapRasterView.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"728cbf95e7c13915f57ce93e22d3ea511e9874358fd8a2f090b51203016f9d74"}},{"ruleId":"D2","level":"warning","message":{"text":"GraphQLClient.repoSummary (cognitive 16): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea722dad56526262dfcd50f60789b90a58fff5711a5f5278ba49dee3c32a98d"}},{"ruleId":"D2","level":"warning","message":{"text":"GraphQLClient.userContributionHeatmap (cognitive 16): 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e66b0a1eadee263159f3f33eec63a70013850db167b69fccac1d3fe4df44361"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks (cognitive 16): GitHubReferenceTranslator.queriesMergingRepositoryHeadingListBlocks has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (7 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4062c64f6d3fbe68081c507338dcd1ecf348062959e0173ab6f8ec717bce69"}},{"ruleId":"D2","level":"warning","message":{"text":"CommitsCommand.run (cognitive 16): 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 \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListCommands.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"59cb89497d74df6280b55f1b24e9e2389765fe6f9c61324ea05b697d8e8eca5c"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalActionsSupport.swift.resolveLocalRepoTarget (cognitive 16): 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalActionsSupport.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"af45824a4960c90ac2760443272c622e99dc4c94c90f0bee365382d5cfa064d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StatusBarMenuManager.openAPIUsage: MethodTooLong \u2014 openAPIUsage runs 420 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 320 over it, 4.20\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuManager.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77ed3bf9ccd1111110d84e766437a8680a6543822ed1b3bdb68efda4a7e5d25"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AppState: TooManyMethods \u2014 108 methods. The bar is 30 methods; this is 78 over it, 3.60\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ee96cc20c839011eb04c18f8b6de04215ae51a6ed84d8bedecc587d69d37e97"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: StatusBarMenuManager: TooManyMethods \u2014 104 methods. The bar is 30 methods; this is 74 over it, 3.47\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfb42bdc6ff0f85d4e19d2ad876cfbd73254220dd8540f528c08f92a61839ee"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GitHubRestAPI: TooManyMethods \u2014 76 methods. The bar is 30 methods; this is 46 over it, 2.53\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1501001ba62275aad166715fc034a6cac09999ceb57bac277323a05cd71e66"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepoDetailView.body: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/RepoDetailView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"2634b054bd4d4906a8b1fff5fa5da7644c13c9dbb0b009be6c08770e654d5fb9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GitHubClient: TooManyMethods \u2014 69 methods. The bar is 30 methods; this is 39 over it, 2.30\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubClient.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3401f07187c141c30ea0422efb0189ac7a22e29743b3fb3f5818ed3747decce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AdvancedSettingsView.body: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AdvancedSettingsView.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f849a79372cac5bef818c19b0ad982ac1739021f8eaed12e2ec4eaa3aca0035"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepoSubmenuBuilder.repoSubmenuItems: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"403841b8689c5934fcd11c90a213162dc916b5ea1c456022e90040ffce7e8e38"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AccountSettingsView.body: MethodTooLong \u2014 body runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"99816ab855d5e9df6367882890730e79f9e76ed1ae9e731c246c847079d2cd16"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GitHubReferenceTranslator.lineScopedRepositoryIssueQueries: MethodTooLong \u2014 lineScopedRepositoryIssueQueries runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"cebb22bde8e4941ed5a1f4771803797eb835d489a379b641c282e85baf34aafe"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RecentListMenuCoordinator: TooManyMethods \u2014 50 methods. The bar is 30 methods; this is 20 over it, 1.67\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"496be944b560c3415ec695b3f1c85cde55f089e2de9ece7241a9755694ce871f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: SettingsSupport.swift.applySetting: FunctionTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b17f6b4a365e96e15e5105a0eebfd724d7259d931d250f4683aebacfe54186"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TokenStore: TooManyMethods \u2014 48 methods. The bar is 30 methods; this is 18 over it, 1.60\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Auth/TokenStore.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc8f5bcc6f42e85f91f899edfb5e8ec2706cb4ab2468f4a2bc10979dfab0a77"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AppState.processGitHubPullRequestNotifications: MethodTooLong \u2014 processGitHubPullRequestNotifications runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"267524e39033432ab094d344e4da16f9f976c6b2e7732f606b1889f806539e19"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepoDetailCoordinator.fullRepository: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/RepoDetailCoordinator.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc20b4f86368085c24dcb1db3e4098668e51d94c07511b1d09ba5828082b965d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: StatusBarMenuBuilder: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"e666ccd8341bf411d327c99ace212bac917fb67cd31d4ebfb926fa7aa3064b7d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LocalGitMenuCoordinator: ClassTooLong \u2014 488 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 88 over it, 1.22\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3fa7a2a057dab533e192945ced46675f79f13ef201c3610c36a0336d922bd49"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StatusBarMenuBuilder.mainMenuItems: MethodTooLong \u2014 mainMenuItems runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"28937e3a8ddec138d658cd9af45705f5927dd7d2f2e17c063eddf710e15af7a5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GitHubRestAPI: ClassTooLong \u2014 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\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"de903f42468a5ae51c977dcbb3a3d93c708a7ed8231afd8a46a02d23b4afb0ae"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StatusBarMenuBuilder.infoMessageItem: MethodTooLong \u2014 infoMessageItem runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce37cf507b2dda563e4cd8ef99db29821350934816a774eaecb898b85dd909ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: API/GitHubRestAPI.swift: FileTooLong \u2014 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\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8ff298bc7ff1f632811a5a1a7a090c0042413e8efd83c6122b5dbde2958d55"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LocalGitMenuCoordinator: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"44e5652d31948e6e1ff9f2eff49bf480f1cd3195042babab76ae3dc6754582e6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepoSettingsView.body: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/RepoSettingsView.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc6bf546bf59e7b917c4ca6f69958c3a78325b00ab9bd6c059606b2298f2be7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AccountSettingsView: ClassTooLong \u2014 439 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 39 over it, 1.10\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"18100f2a3da6524e51a2df88e0b66d72c70e1f957d57bfa0068f2fe6c248552c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RecentMenuService.descriptors: MethodTooLong \u2014 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentMenuService.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f6b50e75e6f4176fe8c0fc9f366db56b4b1287fdbec58b8d391fff8067d483"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: StatusBar/LocalGitMenuCoordinator.swift: FileTooLong \u2014 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: LocalGitMenuCoordinator (7-656). The bar is 500 significant lines; this is 37 over it, 1.07\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52a17bc9708578abbd86e3fe2888f90af1bf7005a521d41dedeed2b8340b14c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GitHubReferenceStatusCoordinator: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 over it, 1.07\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"62657c88436b71ed54eb24f7613f5272ce4b1e318d296ee879383d25b8587000"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: StatusBarMenuManager: ClassTooLong \u2014 419 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods. The bar is 400 significant lines; this is 19 over it, 1.05\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"8372ef011cc04325f53dd41efd1978f67e53a264affc10c4a284888f5f06dfc4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AdvancedSettingsView: ClassTooLong \u2014 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\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AdvancedSettingsView.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1828115c394f1999566cdbf49b212287482597b3d73cad0a7e4c301748900601"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (31 shared lines): Sources/RepoBarCore/API/GraphQLClient.swift:58-126 | Sources/RepoBarCore/API/GraphQLClient.swift:153-227 \u2014 These two members are variants of one another: 31 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a762f5e754bdd03d2756f7fa0244b025e39ee20478ff2196e624cba804cd5f70"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (29 shared lines): Sources/repobarcli/LocalListsOutput.swift:4-68 | Sources/repobarcli/LocalListsOutput.swift:70-133 \u2014 These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalListsOutput.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"5603ad40e83e3d92225902f807f1c24e2ff74af880b39f6569bf076f9ac6d223"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (21 shared lines): RepoBariOS/Sources/Auth/OAuthCoordinator.swift:25-86 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:50-114 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Auth/OAuthCoordinator.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f13a3c48d5b057c6f9248e54e3dd9d5953ab845392fd5de738f51a49080b79"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): 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 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListCommands.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"16765a6409a6336b6dcfdc101d9b70ec5db5d2b1f08b1539cebbc647175858c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:18-46 | Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:113-139 | Sources/RepoBarCore/Models/RepoRecentItems.swift:81-119 | Sources/RepoBarCore/Models/RepoRecentItems.swift:172-196 | Sources/RepoBarCore/Models/Repository.swift:27-83 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:34-76 | Sources/RepoBarCore/Support/RepositoryPipeline.swift:22-46 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"5abd7fc15278332d6c0aeb9f95fda2e037ab5d2f25f9a4693decbf753bbd243a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): 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 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/CommitMenuItemView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc568825dfd99c24ef8e73cfff6d6d9a7bd3da285628996a366c9a5e3a4a3d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): 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 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4e9d9dffe26925f6d9fef7160425c51c2a17a66b6b5681a5e912ed06d75c98"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): 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 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/DiscussionMenuItemView.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4795a7587a0820a2e7537ccf957251ca9648e7da4b9587737d6b94502077400"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Sources/RepoBarCore/API/GitHubRecentDecoders.swift:247-262 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:464-479 | Sources/RepoBarCore/API/GitHubSearchModels.swift:143-158 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:119-141 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRecentDecoders.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3dd7e79c8b9402c4f327a043ae40a391bdc3e4d38519b99dc299cff3e8ac49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): Sources/RepoBar/Views/LocalBranchMenuRowView.swift:52-85 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:49-82 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/LocalBranchMenuRowView.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6d91d345ae7c1811c7ee14194caf55ae7c310232dc4cd07d85d26404e8929c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:337-365 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:386-414 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBarCore/LocalProjects/LocalGitService.swift:337\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"d41bd627e737785e0a093ac667be777ae1707b065701c18281b883b61f3f5079"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:451-475 | Sources/RepoBar/App/AppState\u002BActivity.swift:28-52 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/App/AppModel.swift:451\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"233fcc925338b6a71c990c264b622865cbcf2daf3d95e34a156c48be3081cd2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): Sources/repobarcli/RecentListsOutput.swift:350-373 | Sources/repobarcli/RecentListsOutput.swift:525-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:350\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"9161f64c1a60695328e7e5b1cf15886857454ef50bde033ad24220e6a7d0aab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): RepoBariOS/Sources/Views/ActivityView.swift:93-113 | Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:91-111 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/Views/ActivityView.swift:93\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/ActivityView.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf2c6bba76e58b27b32a62e3556806db6f6ff2844d1e5de24d21465408e3ad5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Sources/RepoBar/App/AppState\u002BActivity.swift:149-169 | Sources/RepoBarCore/Models/Repository\u002BFactory.swift:51-71 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Sources/RepoBar/App/AppState\u002BActivity.swift:149\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState\u002BActivity.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f6b4422e6201e43184a388f2d876670526c2d408cf65dfab93f0141d78f5dc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:384-403 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:585-604 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:384\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9a98c043a98e32da6f5e828c6e84d6d9ba06b5d085c0bebafd71088eb5f358"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Sources/repobarcli/RecentItemsOutput.swift:14-33 | Sources/repobarcli/RecentItemsOutput.swift:41-60 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentItemsOutput.swift:14\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentItemsOutput.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d2373b6ada2bd135ff36573767bb888053f15d85a0190faab585b900666ba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/RepoBar/Views/IssueMenuItemView.swift:14-32 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:14-32 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/PullRequestMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/RepoBar/Views/IssueMenuItemView.swift:14\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/IssueMenuItemView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0ed3d138fb11506006025aa037e646ee4aa301b9ec99c0e201bfcd2eb7373e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/RepoBarCore/Settings/MenuCustomization.swift:110-128 | Sources/RepoBarCore/Settings/MenuCustomization.swift:137-155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/Settings/MenuCustomization.swift:110\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Settings/MenuCustomization.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"02decdf06eec8d343559516135f6eba811bda6b835561e4681c60743e84bb8ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201319 lines \u00D7 5): 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 \u2014 there are 5 copies across 3 file(s) \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:331\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalListsOutput.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9a5d904d9a6373b70a38f03f5ad88c8c3d3aa0a03667e6c2e7cdf3ea4f1580"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): Sources/repobarcli/ReposCommand.swift:136-154 | Sources/repobarcli/ReposCommand.swift:157-175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ReposCommand.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"229d6dffc078d00f4780e554c29b2cfc464b53eb55c473aaa9898023c900a6b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18-35 | Sources/RepoBar/Views/MenuBannerViews.swift:103-120 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:18\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ActionsLimitsMenuViews.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35195829aa4344b8c355b67c130ceeac8a64e4d4b316f0722f9552280b666db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): RepoBariOS/Sources/Views/RepoDetailView.swift:96-111 | RepoBariOS/Sources/Views/RepoDetailView.swift:124-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060RepoBariOS/Sources/Views/RepoDetailView.swift:96\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/RepoDetailView.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc10ab6b32fdffa8bcfb4993f9c058956fbee1b4fd2fc397d616704e2d4fa34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:464-479 | Sources/RepoBarCore/API/GitHubSearchModels.swift:143-158 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d16f168791eb0231dbf8574efeb765868cb77b2b8c3b03ccb9fa02ddf371e7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BRepositoryHeadingBlocks.swift:95-110 | Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BRepositoryHeadingBlocks.swift:141-156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BRepositoryHeadingBlocks.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1ab6b78271c6182c023f494f757cc073caa912ca996e85c527cc35697441d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/repobarcli/LocalActionsCommands.swift:83-98 | Sources/repobarcli/LocalActionsCommands.swift:138-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/LocalActionsCommands.swift:83\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalActionsCommands.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a1405cabe5638edcc7ce9afa673b7ed54d818a5839b09695ffb2c428968615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:288-299 | Sources/RepoBar/Views/IssueNavigatorView.swift:308-322 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"d09b5c6e10ac0c164577617a69a2291a8451581450ad4c8f42eceaa0ac2b6d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:223-237 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:380-394 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:223\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c6c3566e4438fa68d37f3c6b204b83912068bd3cfe4455038773d6cb897113a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/RepoBar/Views/MenuLabelChipsView.swift:40-54 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:102-116 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/MenuLabelChipsView.swift:40\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBar/Views/RecentIssueFiltersView.swift:117\u0060 calls \u0060buttonStyle\u0060, \u0060accessibilityLabel\u0060, \u0060Text\u0060 and \u0060Sources/RepoBar/Views/MenuLabelChipsView.swift:55\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/MenuLabelChipsView.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eed3deb69ff956fa70726902a5126421919815aa0b895c9dce9948fd5cecce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI.swift:177-191 | Sources/RepoBarCore/API/GitHubRestAPI.swift:210-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:177\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"518ca13720b6781b29db11ba8466c9fde9ce14cff995793ceb2ef92748fcaf08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/RepoBarCore/API/GraphQLClient.swift:85-99 | Sources/RepoBarCore/API/GraphQLClient.swift:186-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GraphQLClient.swift:85\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1b1618b0e580a336ec918df240feb8cfaaf1dd432cf6e67473b47c23bf8b3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Sources/repobarcli/LocalListsOutput.swift:55-68 | Sources/repobarcli/LocalListsOutput.swift:119-133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/LocalListsOutput.swift:55\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalListsOutput.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a493b708132746f052aed231034f8999753abc05ea033c0a8d1ddb5d5074c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Sources/repobarcli/LoginCommands.swift:98-112 | Sources/repobarcli/LoginCommands.swift:263-277 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LoginCommands.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"52edfd7df6074eb103d6f958b6e8eccc6c12bc51eb4421955dab0359d4f7bf7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/RepoBar/Settings/GitHubAPIUsageSection.swift:171-184 | Sources/RepoBar/Views/MenuBannerViews.swift:232-245 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/GitHubAPIUsageSection.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2af1afa6fa346bcccdfec5b157d378f9d1ec8cecb59a9184466d9593b546f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:207-220 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:364-377 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:207\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30ed85f0b17273da726bcd6022cd8f07b1f4d6daba02d5c4f3fb0a974a291fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Sources/repobarcli/LocalListsOutput.swift:33-45 | Sources/repobarcli/LocalListsOutput.swift:102-115 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalListsOutput.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c86c28d41b7104b7ad9389a36c2f1627547a7499b739c63e75c28ebbd61c6f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): 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 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/CommitMenuItemView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f26089ba2f1861ef54825063fa779f50ac81d1792198a898769f7e567a4f6a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Sources/RepoBar/Views/DiscussionMenuItemView.swift:28-40 | Sources/RepoBar/Views/IssueMenuItemView.swift:27-39 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:27-39 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBar/Views/PullRequestMenuItemView.swift:42\u0060 calls \u0060DraftPillView\u0060 and \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift:42\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/DiscussionMenuItemView.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"483031b4e812027bd330711a84d99b66914e1d6d5c1c110e9c5e2b7563ac7087"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Sources/repobarcli/RecentListsOutput.swift:266-278 | Sources/repobarcli/RecentListsOutput.swift:333-345 | Sources/repobarcli/RecentListsOutput.swift:508-520 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91f6d311fabfd3bd4fec326fe533b07dab1789711e7f5e58593044aa4df8222"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Sources/RepoBar/App/AppState\u002BRefresh.swift:82-94 | Sources/RepoBar/App/AppState\u002BRefresh.swift:267-278 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/App/AppState\u002BRefresh.swift:267\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState\u002BRefresh.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eba89b02e4c19a6f8a21a6a1a438958f74ff7b98f22c00da5867b91e9431e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:442-454 | Sources/RepoBarCore/API/GitHubSearchModels.swift:107-118 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBarCore/API/GitHubSearchModels.swift:107\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6299378dcf78c19f9a3c2ca4de395dacacad96b56280be27bd1e59fd9efd45a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/RepoBarCore/Models/RepoRecentItems.swift:183-195 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:54-66 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Sources/RepoBarCore/Models/RepoRecentItems.swift:183\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Models/RepoRecentItems.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef094c6689f46a05f3d1e494366b8f53c3eddd33bdb1d2cb6c6f7a7a05422083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14-26 | Sources/RepoBarCore/Support/RepoBarCacheDatabase.swift:135-147 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift:14\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GraphQLResponseDiskCache.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce2dbfb1a39ae18479039609522711c024e2485988d770568c079b620d7a0b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/repobarcli/SettingsSupport.swift:425-437 | Sources/repobarcli/SettingsSupport.swift:440-452 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/SettingsSupport.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"838a4ef0b8698d08b116ff267d4c050905b99923d4bc52a240191d16ee55b2a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:32-43 | Sources/RepoBarCore/Models/GitHubReferenceMatch.swift:126-137 | Sources/RepoBarCore/Models/RepoRecentItems.swift:100-111 | Sources/RepoBarCore/Models/Repository.swift:54-65 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:55-66 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift:32\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalRepoStatus.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6ee023a7b94abf5040d6ec7af7d078f42a65e5c85040c9a69b1c03d81824f9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): Sources/repobarcli/CLIArgumentNormalizer.swift:35-46 | Sources/repobarcli/CLIArgumentNormalizer.swift:48-59 | Sources/repobarcli/CLIArgumentNormalizer.swift:61-72 | Sources/repobarcli/CLIArgumentNormalizer.swift:94-105 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 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 \u0060Sources/repobarcli/CLIArgumentNormalizer.swift:35\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIArgumentNormalizer.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"79644c60f9258aa1d19caa2b863e147fbf596f4a38207e0d036ab38f735a9ae4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Sources/repobarcli/RecentListsOutput.swift:288-299 | Sources/repobarcli/RecentListsOutput.swift:354-365 | Sources/repobarcli/RecentListsOutput.swift:529-540 \u2014 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 \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:288\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e7551337862c1633e674e66079351396a48f88d0704febcefd459699ff5ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:318-329 | Sources/RepoBar/App/AppState\u002BVisibility.swift:44-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/App/AppModel.swift:318\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba96684180d8d4eaacfae59f968aac152b0e191e110bb2c95e5816cb020bf06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): RepoBariOS/Sources/Views/ActivityView.swift:164-175 | RepoBariOS/Sources/Views/RepoDetailView.swift:464-472 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060RepoBariOS/Sources/Views/RepoDetailView.swift:463\u0060 calls \u0060HStack\u0060 and \u0060RepoBariOS/Sources/Views/ActivityView.swift:163\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/ActivityView.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"918e1344a97759242c873b447927aa8b4c62db942edd0595d43b9e5932f108c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/RepoBar/StatusBar/RecentMenuService.swift:316-327 | Sources/RepoBar/StatusBar/RecentMenuService.swift:330-341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentMenuService.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a264b56f376199bdb01aedd7caa28512d302430450cacc130a00aa15fc403c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:153-164 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:135-146 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"179a3748b85baa9b00bbbd071eee4a9c6c68075e632012e07e63fb7900521620"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/RepoBarCore/Models/RepoRecentItems.swift:99-110 | Sources/RepoBarCore/Support/RepositoryPipeline.swift:33-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Sources/RepoBarCore/Models/RepoRecentItems.swift:99\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Models/RepoRecentItems.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf2d725e72e6e96ec9ab6b18b8eafbe5f138b4788f7c1be83734cefd4dcb57e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BTokens.swift:73-84 | Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BTokens.swift:116-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BTokens.swift:73\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BTokens.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a442ba6de9609da22bd2732e3cb791609d8c581743badc8ea495ea6344206e0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): 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 \u2014 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 \u2014 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 \u0060Sources/repobarcli/CLIArgumentNormalizer.swift:37\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIArgumentNormalizer.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7995b9f04a2c7e74b1dc81f9aab89e431b0a4e94acc1e8cd74da05b1ea08b85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/RepoBar/Views/DiscussionMenuItemView.swift:10-20 | Sources/RepoBar/Views/IssueMenuItemView.swift:10-20 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:10-20 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/DiscussionMenuItemView.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d963302eec4044dfe2ad67c669b1973598d3800884a69950750777fc86b0824"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:283-293 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:303-313 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:464-474 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060Sources/RepoBarCore/LocalProjects/LocalGitService.swift:283\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"527b05309f6f80c96125b8fdc1293b1e7bb9605d945e788cce9ed75f98a194e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift:13-23 | Sources/RepoBar/Views/HeatmapAxisLabelsView.swift:13-23 \u2014 before extracting anything, compare \u0060RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift\u0060 and \u0060Sources/RepoBar/Views/HeatmapAxisLabelsView.swift\u0060 as WHOLE FILES: 100% of the shorter file\u0027s 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapAxisLabelsView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e126b6682110cb0a3cd02d8de9dfe6b5752ba24c9e3a325d00f4af68b4ff1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/RepoBar/Settings/AccountSettingsView.swift:507-517 | Sources/RepoBar/Settings/AccountSettingsView.swift:538-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/Settings/AccountSettingsView.swift:507\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f185e7effaf9416dae5773857f4619e173cc931df5b30b461f354fe958dddb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift:358-367 | Sources/RepoBar/StatusBar/StatusBarMenuManager.swift:648-658 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/GitHubReferenceStatusCoordinator.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"df08ab591a163426a84cccd674e4db98c455e37c2c4068288cb6071006b1c40c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Sources/RepoBar/Support/TerminalApp.swift:138-147 | Sources/repobarcli/LocalActionsSupport.swift:242-252 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Sources/RepoBar/Support/TerminalApp.swift:138\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBar/Support/TerminalApp.swift:148\u0060 calls \u0060error\u0060 and \u0060Sources/repobarcli/LocalActionsSupport.swift:253\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Support/TerminalApp.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"732957f25b4f52623db7a5184d52c4871fdd5eb7d1b7a8e75a4c6d32cc4982f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/repobarcli/LocalActionsSupport.swift:143-153 | Sources/repobarcli/LocalActionsSupport.swift:156-166 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/LocalActionsSupport.swift:143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalActionsSupport.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ffb3978722fb3ad2197311fe7eb22eba03dc85f0e703a0a71024ccbea159e8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/repobarcli/RecentListCommands.swift:388-398 | Sources/repobarcli/RecentListCommands.swift:487-497 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentListCommands.swift:388\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListCommands.swift"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"028f66c092d472e7a7fc81c003db051306ff2878c3d9f38b7b8a5941e09647e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:509-515 | Sources/RepoBarCore/Support/GlobalActivityMerger.swift:32-41 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/App/AppModel.swift:509\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b5b56c00eff1181728a91ac1df5a4be4ab23c2e0f97282c8e843af1be8a596"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): RepoBariOS/Sources/Auth/OAuthCoordinator.swift:75-83 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:103-112 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Auth/OAuthCoordinator.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"90b6811e217a81f2fe081268f46ec53c12b9710f959dea07e933328ec5843dee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/RepoBar/App/AppState\u002BIssueNavigation.swift:176-185 | Sources/RepoBar/Views/IssueNavigatorModel.swift:408-417 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState\u002BIssueNavigation.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77f428c062f1fd69be5fa8d43045a5e31b9e1f78789810f54a17dcfe3afad56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:155-164 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:211-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:155\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ActionsLimitsMenuViews.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"245a48d782f99b17bd9fa9a217c3e0b90d6d28102cb2466bdfdbc8b4f4cff333"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:10-19 | Sources/RepoBar/Views/TagMenuItemView.swift:10-19 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"c73b9cc084e649cc560a0aba890ecce3af9d288f213c3500b98e50ff7c5f2b88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/RepoBarCore/Auth/TokenStore.swift:574-583 | Sources/RepoBarCore/Auth/TokenStore.swift:632-641 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Auth/TokenStore.swift"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5add276475dc0eed4a6b7c81fdb02e747d3f8086c596f409c12ce291d2590d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/RepoBarCore/Settings/MenuCustomization.swift:28-37 | Sources/RepoBarCore/Settings/MenuCustomization.swift:46-55 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/Settings/MenuCustomization.swift:28\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Settings/MenuCustomization.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7112a86c563ced0bf23a221139678fdab1e1cdaf3e805fc6c47c12ff1946d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/repobarcli/RecentListsOutput.swift:32-41 | Sources/repobarcli/RecentListsOutput.swift:91-100 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:32\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"238888ed2f50209ad561e45da33dc83014eb664adb791c80068e1766ac7e984b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/repobarcli/RecentListsOutput.swift:107-116 | Sources/repobarcli/RecentListsOutput.swift:133-142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:107\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcc6c3c4e4e146a921ce846a7f7a6792a4239102be96f9f500dd0ce62c30e73b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/repobarcli/RecentListsOutput.swift:271-280 | Sources/repobarcli/RecentListsOutput.swift:464-473 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:271\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"3191eb7b2696f1afe2e5adfbf5e4204f0f61b766c25596597dee329eebb584cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/repobarcli/StatusCommand.swift:53-62 | Sources/repobarcli/StatusCommand.swift:115-124 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/StatusCommand.swift:53\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/StatusCommand.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae4122774da8489e497828a88901da4d282ec2b208952a3af6da96fd54b02e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 8): 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 \u2014 there are 8 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListCommands.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ac3c2b5bb7fbcbd30cf1baa22d359f26f503fede5a7f28917442677f47bcb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Sources/RepoBar/Views/IssueMenuItemView.swift:24-32 | Sources/RepoBar/Views/PullRequestMenuItemView.swift:24-32 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:24-32 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/PullRequestMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/RepoBar/Views/IssueMenuItemView.swift:24\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/IssueMenuItemView.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"3065f945e2321a1344658d7b53c86cff4324b5053b42a46b6e79b08aa766f879"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:342-350 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:391-399 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:436-444 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"8137af23795fd2ea9dcb99eb7b1552142419d13ef1b6792e5cf4a5c6be554310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Sources/repobarcli/RecentListsOutput.swift:33-41 | Sources/repobarcli/RecentListsOutput.swift:92-100 | Sources/repobarcli/RecentListsOutput.swift:237-245 \u2014 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 \u2014 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 \u0060Sources/repobarcli/RecentListsOutput.swift:33\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentListsOutput.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"732796934c65f47b1247158efd1d95bd6cd40dd025f5a0dca8ba2c8ccb05e7e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:498-506 | Sources/RepoBarCore/Support/GlobalActivityMerger.swift:21-29 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/App/AppModel.swift:498\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"67f23d56b36ca600e5bcbc3f03c7f493e42b1d3ecf5ca0ad9bc5aa8a888a639a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): RepoBariOS/Sources/Views/RepoListView.swift:60-68 | RepoBariOS/Sources/Views/RepoListView.swift:71-80 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060RepoBariOS/Sources/Views/RepoListView.swift:71\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/RepoListView.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae9dbc14cfa1eb54dddd8427260c9f5329fae994176cee8a719849c6c10081b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBar/Settings/AccountSettingsView.swift:491-499 | Sources/RepoBar/Settings/AccountSettingsView.swift:520-528 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/Settings/AccountSettingsView.swift:491\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/AccountSettingsView.swift"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b67dc8d4f19f67c7d93bcc652f5227395d61da9a81939b7bd6f810f3147aa8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:240-248 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:464-472 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:240\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a44f1ee72c521a98d2a1f68a29e76d9f6babc573f521a44f9938b6872531ef8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift:405-413 | Sources/RepoBar/StatusBar/StatusBarMenuBuilder\u002BMenuItems.swift:83-91 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RepoSubmenuBuilder.swift"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e370ace0f7daf8a13df41e10340797c5b6ef4d1c58cd3fb57d9965e791b31d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:151-159 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:189-197 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:151\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ce5b59547de41acf3c8bb2f3032879e5bec4c2480198e41754a335c57d0a99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBarCore/API/GraphQLClient.swift:102-110 | Sources/RepoBarCore/API/GraphQLClient.swift:203-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GraphQLClient.swift:102\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"7270e807ae391f99b990319cd55725d735c81dfc548b923771c68aac61fd86cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift:289-297 | Sources/RepoBarCore/Support/GitHubReferenceTranslator.swift:265-273 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift:289\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d99c0c70d1ac4fecc8dd2887f268c03b6d951c9c2f86fcec1cb32779012e76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/RepoBarCore/Support/RateLimitJuice.swift:107-115 | Sources/RepoBarCore/Support/RateLimitStatusFormatter.swift:491-499 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/RateLimitJuice.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb0cb337ce4661f059ed750ad8998ac51751e4f2b9f4b34664cf6baea78d28de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/repobarcli/LocalListsOutput.swift:72-80 | Sources/repobarcli/RecentListsOutput.swift:253-261 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/repobarcli/LocalListsOutput.swift:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/LocalListsOutput.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb5f4ce05adbb74f1fef1c11794a3a344ca08726f5662cb687160dd41b7b134a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:113-120 | RepoBariOS/Sources/App/AppModel.swift:138-145 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"e46b77f6da783d859aef73c2c4ce8ed4bb4c7c1ee612060a3fa204dc2f0684bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/RepoBar/App/AppState\u002BIssueNavigation.swift:91-98 | Sources/RepoBar/App/AppState\u002BIssueNavigation.swift:198-205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBar/App/AppState\u002BIssueNavigation.swift:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState\u002BIssueNavigation.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"7459be510a80f89c3295b157d8b38439a291893c4826691e006eee098b9f1624"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift:120-127 | Sources/RepoBar/Views/IssueNavigatorAppKitAdapters.swift:285-291 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c6008c571052909d9e088f22515b1fb4e1eba59351fac96a5c43646c8225a53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/RepoBar/Views/LocalBranchMenuRowView.swift:41-48 | Sources/RepoBar/Views/LocalWorktreeMenuRowView.swift:31-38 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/LocalBranchMenuRowView.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"509f2fa97ac93b3727210ae76b95b645cfc35510fc484a764045476e3e12420b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:14-21 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:13-20 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:14\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u0060alignment\u0060 to \u0060.center\u0060 in one and \u0060.top\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f45b273ea96a4e71c8ca8465e7aaa6326c975ea9bee56afe094ccebff49e663a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift:251-258 | Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift:306-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift:251\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b8ae9387fb0f16186f8e217d87ee1369cfd979b1c14d185f4cfac8c526be31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/repobarcli/CLIArgumentNormalizer.swift:29-36 | Sources/repobarcli/CLIArgumentNormalizer.swift:85-92 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/CLIArgumentNormalizer.swift:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIArgumentNormalizer.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ca900badbabfb33ee7b8d987d11bca5e8397bc0b0faad6c5c310162551bcbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/repobarcli/StatusCommand.swift:68-75 | Sources/repobarcli/StatusCommand.swift:128-135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/repobarcli/StatusCommand.swift:68\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/StatusCommand.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d533b68adeb6792dffa0893cdd92c6f8c634d50ada3c42a3fb5f0100ae410753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): 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 \u2014 there are 4 copies across 2 file(s) \u2014 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 \u0060Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift:118\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/ActivityMenuCoordinator.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f52bf9027068ee70065ef1b17296813a8061f9e3dc93da5bcb82e1939f28c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:121-128 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:191-197 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:315-322 \u2014 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 \u2014 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 \u0060Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:121\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ActionsLimitsMenuViews.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb00ba64d0f1becf6e0997c38bfbd83bc2d05bced6ca515686c5368140bc2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Sources/RepoBar/Views/BranchMenuItemView.swift:9-15 | Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:9-15 | Sources/RepoBar/Views/TagMenuItemView.swift:9-15 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/BranchMenuItemView.swift:9\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBar/Views/BranchMenuItemView.swift:16\u0060 calls \u0060HStack\u0060 and \u0060Sources/RepoBar/Views/ReleaseAssetMenuItemView.swift:16\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/BranchMenuItemView.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5a90d9189a9da6aefd74d6b5db5b2662720f5dd4bf7752530ca7b76830d042"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): RepoBariOS/Sources/Auth/OAuthCoordinator.swift:61-67 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:89-95 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/Auth/OAuthCoordinator.swift:61\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Auth/OAuthCoordinator.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c6aa29d292db9bae9a02e28ebf9e5fdace20c1c84a4d2be3e439e1cb3c291a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:47-53 | Sources/RepoBar/Support/GitHubReleaseNotificationRunner.swift:59-65 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Support/GitHubPullRequestNotificationRunner.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c44f4c93878a106227d874860dfaa8c8394cde670d4db144e21f427c6f609a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRecentDecoders.swift:250-256 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:120-126 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRecentDecoders.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"67268e61d08ae212fe44437ab1ccf6f02861ccc487b1d69690e785c8663593c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:327-333 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:342-348 | Sources/RepoBarCore/API/GitHubRestAPI.swift:538-543 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:327\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:325\u0060 calls \u0060URLQueryItem\u0060 and \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:340\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e3058dd1996b6ea2787b80262b329a98a90eb86c76d5f52b4b1a9b5103743e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI.swift:331-337 | Sources/RepoBarCore/API/GitHubRestAPI.swift:477-483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:331\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:484\u0060 calls \u0060URLQueryItem\u0060 and \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:338\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f4757fd278a756cd1a39137ce5b028fbaef7ac41caa6ba2c466f4862e0da285"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI.swift:476-482 | Sources/RepoBarCore/API/GitHubRestAPI.swift:511-516 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:476\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"442f0d2db9612ad9fffaee5ce3dc13ded7ac0d6777881f8302530a0cb503ddb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/API/GraphQLClient.swift:75-81 | Sources/RepoBarCore/API/GraphQLClient.swift:176-182 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GraphQLClient.swift:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"415f614520e9e2ec73dab3a3bd523143a57e98236293797523a2cddb3ca2d62e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:255-261 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:373-379 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060return\u0060 inside it is the body\u0027s 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 \u0060git\u0060 to \u0060LocalGitRunner\u0060 in one and \u0060GitRunner\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a97d29575f9d17d7ddf0aefb22a9dad0d39a5724c066ee500373fdf0f1ecf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:264-270 | Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift:485-491 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060return\u0060 inside it is the body\u0027s 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 \u0060git\u0060 to \u0060LocalGitRunner\u0060 in one and \u0060GitRunner\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"581c00071a83e52aa87e1df5f110bdef57c1da25a12347f6b323815affb755a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Sources/RepoBarCore/API/GitHubRestAPI.swift:330-336 | Sources/RepoBarCore/API/GitHubRestAPI.swift:476-482 | Sources/RepoBarCore/API/GitHubRestAPI.swift:511-516 \u2014 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 \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:330\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:484\u0060 calls \u0060URLQueryItem\u0060 and \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:338\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"b566a9b3b2d42ac391a6b8acea889a6d85dfb1ab8f55214fce1ef939fbe486c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:507-512 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:343-348 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"45cfcedb9b4d58c6205e2668b17ec5f1359144fdcb4e056ccecc6e48e25461d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRequestRunner.swift:381-386 | Sources/RepoBarCore/API/GitHubSearchModels.swift:136-141 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRequestRunner.swift:381\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRequestRunner.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1bc928df1e7c0bbb426262e08338e65dc293ce6ecf6b67aee4148adab8a54af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift:124-129 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationDetector.swift:89-94 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"e697edb67c5366c27cd5a916af14122322a4df14ba7c8cf7864de6d15a9fd20c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubArchiveReader.swift:24-29 | Sources/RepoBarCore/Support/GitHubArchiveReader.swift:40-45 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubArchiveReader.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f12b098dacf521ed0aeec035a7c53d9c13a16ca0109b9efd98466b16a04e8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubArchiveStore.swift:221-226 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:234-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubArchiveStore.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e42f37b8a60a079150b831536c4ee05e43979dd2ada211ce6da9aed030e1f2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Sources/RepoBarCore/API/GitHubRecentDecoders.swift:252-256 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:469-473 | Sources/RepoBarCore/API/GitHubSearchModels.swift:148-152 | Sources/RepoBarCore/Support/PullRequestAISummarizer.swift:122-126 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRecentDecoders.swift:252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRecentDecoders.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"335ab3927c086be7077e8b8c9d3bf5a42f8f62fee9471d14943c2ef6bad8105a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift:268-272 | Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:544-548 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:414-418 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/ChangelogMenuCoordinator.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a0c070843546c871c37ead9989a3eee32639e43ffb147a9ff84c45d06bedcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510-514 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:335-339 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:346-350 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:510\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f73b597b125f647975493554bd1515a7caf31cdeca2980b83a64e9352d683d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:231-235 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:258-262 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:285-289 \u2014 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 \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:231\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a0485f2d0547b631b83e7ea47e683eac291a9598fc65d16411a74b6633b7be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/repobarcli/ArchiveCommands.swift:169-173 | Sources/repobarcli/ArchiveCommands.swift:437-441 | Sources/repobarcli/ArchiveCommands.swift:477-481 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ArchiveCommands.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"064477ddfdbb94db7988f9a8aa33099d3ea99a6840545aba2f6aecb760f83bf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapView.swift:59-63 | Sources/RepoBar/Views/HeatmapView.swift:47-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bf1ebf7b77d576bf2924e552257a6957de50c597d53adcd8cef585dd95a16e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapView.swift:68-72 | Sources/RepoBar/Views/HeatmapView.swift:56-60 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/Views/HeatmapView.swift:68\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapView.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebf5727702c2f3cdf1a5b7279cf1c57ce2837ac50eeedd1e2786398ede01ab96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapView.swift:75-79 | Sources/RepoBar/Views/HeatmapView.swift:63-67 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapView.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0ae673e2d38c5f69a69a8989861575f46c77aa15c37ced9590b90b669d8e9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Sources/RepoBar/Views/PullRequestMenuItemView.swift:98-113 | Sources/RepoBar/Views/ReleaseMenuItemView.swift:86-101 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/PullRequestMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/ReleaseMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/PullRequestMenuItemView.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1af780eef1d3817b5df6525c47793990a2cad00a1f8913de3b63c5f5f9a31bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): RepoBariOS/Sources/App/AppModel.swift:69-75 | Sources/RepoBar/App/AppState\u002BRefresh.swift:215-221 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/App/AppModel.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f12ed6b6714485bd98be6e8606b3916facc53673fbb18dff7c8747a92123b50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): RepoBariOS/Sources/Auth/OAuthCoordinator.swift:94-100 | Sources/RepoBar/Auth/OAuthCoordinator.swift:40-48 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Auth/OAuthCoordinator.swift"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb01670c235e122d4841e9688d94c09265dd6ef82cd0cfa7d7bbeb94abca5491"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): RepoBariOS/Sources/Support/RefreshInterval\u002BLabel.swift:4-11 | Sources/RepoBarCore/Settings/UserSettings.swift:480-487 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Support/RefreshInterval\u002BLabel.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a73acd8d610c7ae1dec21dd0bd75ee738c1ef5771199f549622adfcd9b25a617"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Support/RefreshScheduler.swift:12-16 | Sources/RepoBar/Support/RefreshScheduler.swift:12-16 \u2014 before extracting anything, compare \u0060RepoBariOS/Sources/Support/RefreshScheduler.swift\u0060 and \u0060Sources/RepoBar/Support/RefreshScheduler.swift\u0060 as WHOLE FILES: 86% of the shorter file\u0027s 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 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Support/RefreshScheduler.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6c1f9608b3dca0458840030dfd78fc39921e258f163ecd72e92c38a17b55a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): RepoBariOS/Sources/Support/RepositorySortKey\u002BLabel.swift:4-13 | Sources/RepoBar/Support/RepositorySortKey\u002BLabels.swift:12-21 | Sources/RepoBar/Support/RepositorySortKey\u002BLabels.swift:23-32 | Sources/RepoBar/Support/RepositorySortKey\u002BLabels.swift:34-43 \u2014 there are 4 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Support/RepositorySortKey\u002BLabel.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"06178b2d8b0f7e529eaf98db7b4f704a2c5a325065712b1e6dbd951b704357e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapView.swift:9-13 | Sources/RepoBar/Views/HeatmapView.swift:15-19 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapView.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5be4a1562cd44b3305f96ee0da5f1709a71ca2d1ba6cb4e375a0419b150951"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): RepoBariOS/Sources/Views/RepoDetailView.swift:524-531 | Sources/repobarcli/VerifyCommands.swift:459-466 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/RepoDetailView.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19435c4b09f153cd75df7ba2e24bd740365aab4288014de751088222e85eabf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift:19-31 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator.swift:20-32 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/LocalGitMenuCoordinator.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d6e40c7783a563fd64541ef11631e1bbe57fb986f4b2528489ab2ef08e4001"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:174-182 | Sources/RepoBar/Views/ActionsLimitsMenuViews.swift:348-356 | Sources/RepoBar/Views/MenuBannerViews.swift:247-255 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/ActionsLimitsMenuViews.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e85dacf3e2477513a1e4e0c3fa23d9a813a854f5bd8def3ed3c1ed1e47d40b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): 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 \u2014 before extracting anything, compare \u0060Sources/RepoBar/Views/DiscussionMenuItemView.swift\u0060 and \u0060Sources/RepoBar/Views/IssueMenuItemView.swift\u0060 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/CommitMenuItemView.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"66073aa050b92aac6c30036db29fb0158131c4247caa3829516efa65f3fc938e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:456-462 | Sources/RepoBarCore/API/GitHubSearchModels.swift:120-126 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8fdcd67f34f493e8a57bb97ffa276ab1341f15ecd09dba44ea8c2800fe6df8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/RepoBarCore/Support/GitHubArchiveReader.swift:176-182 | Sources/RepoBarCore/Support/GitHubArchiveStore.swift:409-415 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubArchiveReader.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d64f80ccb0b1373d0d8f2413b00e86b8c5c01355f7581468cb08716ca3ecf4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Sources/repobarcli/AccountsCommands.swift:93-98 | Sources/repobarcli/AccountsCommands.swift:123-128 | Sources/repobarcli/LocalActionsCommands.swift:262-267 | Sources/repobarcli/LocalActionsCommands.swift:289-294 \u2014 there are 4 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/AccountsCommands.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79af727e6fc15af0d205e7fc72aaefa5aa8733c6b6eb85a8b4878c0314d0807"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/repobarcli/RecentItemsOutput.swift:137-142 | Sources/repobarcli/RecentListsOutput.swift:577-582 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/RecentItemsOutput.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"34a296f670cd6808148f12c7f01d8b5479a01b09080e6cf2c2e879319e0ce307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:14-21 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationSnapshotStore.swift:14-21 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b65144d252795725a097eb4304d9aced40782d8b9c5c9b99b27305e500e7eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift:23-27 | Sources/RepoBarCore/Notifications/GitHubReleaseNotificationSnapshotStore.swift:23-27 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationSnapshotStore.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60938898441d312aaf96ad74fc88cd1f2e8fc001a42ccafb509b3d10a5ec288"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 14): 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 \u2014 there are 14 copies across 3 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/ArchiveCommands.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"011575cdb659626fc7348902ffcecd1efcb580f6858e813a266faabb0bfc59d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Auth/OAuthCoordinator.swift:34-38 | Sources/RepoBarCore/Auth/OAuthLoginFlow.swift:59-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Auth/OAuthCoordinator.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"de78cdde584168a0288971af13cc1b0c456cd564f8e1d11828c91d1a9749b200"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): RepoBariOS/Sources/Views/HeatmapView.swift:108-112 | Sources/RepoBar/Views/RepoBarLoadingView.swift:152-156 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060RepoBariOS/Sources/Views/HeatmapView.swift:108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"RepoBariOS/Sources/Views/HeatmapView.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"41dc91e804eca6917abd730f608d5473f7e1332019d288c0d231de3520cf8a72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:252-257 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:261-266 | Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:299-304 \u2014 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 \u2014 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 \u0060Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift:252\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/RecentListMenuCoordinator\u002BMenuItems.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a32db76fac54682a46709ed956508743d5b22b927ebc28b18fdef685335702e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/RepoBar/Views/MenuLabelChipsView.swift:59-66 | Sources/RepoBar/Views/RecentIssueFiltersView.swift:126-133 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060Sources/RepoBar/Views/RecentIssueFiltersView.swift:126\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Views/MenuLabelChipsView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"446daaaa0b3510c2b74c2967f71120a309e47fee0ce7a1c22673f7b382e48b3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:218-222 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:245-249 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:272-276 \u2014 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 \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:218\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ae6701d14f5dcb0402ecf77ef478af0a50cb5d457de17fb440be6d2a9b90a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:353-358 | Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:363-368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift:353\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI\u002BReferenceLookup.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"926e09d2d87ab3ec33b9227bd608e6bd100797337ac3436db083b0133e0021f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/RepoBarCore/API/GitHubRestAPI.swift:199-203 | Sources/RepoBarCore/API/GitHubRestAPI.swift:225-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/API/GitHubRestAPI.swift:199\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRestAPI.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52f612135295df8066255126a5fafe9007962f7876aedfc07e348fe88b82f95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Sources/RepoBarCore/LocalProjects/LocalGitService.swift:91-95 | Sources/RepoBarCore/LocalProjects/LocalGitService.swift:99-103 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060Sources/RepoBarCore/LocalProjects/LocalGitService.swift:91\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"01e1bd0b7e6a4b54ac6988df93573a3d62ed501397240a777e010b429f69eaaf"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: RepoBarCore: RepoBarCore: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"caf68522e8bace7fd47d3625ece9dd10b43714b97f676376b9055b241e6dc6e5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: StatusBarMenuManager (LCOM4 5): StatusBarMenuManager\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcc231e72b7d4a8089261694d48872235a2d3665daa04fdc3ea87340446885ac"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppState (LCOM4 4): AppState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/App/AppState.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee36b142bba508a906f06c35ab51a51bc2f0fe58e0f8ff68457aa5a3510a8eb9"}},{"ruleId":"D8","level":"warning","message":{"text":"Coverage not measured \u2014 Swift suite: Coverage NOT MEASURED: the Swift half could not be measured \u2014 the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository\u0027s maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"62e63e619c28f057e129f2997c965d32a457366a9ce18ca019ffb6bdfba85c99"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: : This method\u0027s 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* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/RepoBarTests/DiagnosticsLoggerTests.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d89cde0c02a0c0600223f0e6098879956aa41a5c934fa1b6ed060816b532175"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: : This method\u0027s 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* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/RepoBarTests/RepoBarCoreModelsTests.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d4a025b61852910519f07cd246e439f642be22ed8bec3e66e60605a5c96e7e8"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: : This method\u0027s 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* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/RepoBarTests/UserSettingsCoverageTests.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea2d91e41c34cc2ca4996fb9a20b96a705656c72095540d4f68ef31d594f449"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: : This method\u0027s 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* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Tests/repobarcliTests/CLIEndToEndTests.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"64889e6fb32c025639b57ee185eb72eb2e03170461b88cb3773869320059f343"}},{"ruleId":"D13","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e70dbbaebb32337d56d9c83b8d3b5599702d964d803ea2dc3c782b974641a764"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/RepoBarCore/API/GitHubRequestRunner.swift: Sources/RepoBarCore/API/GitHubRequestRunner.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is GitHubRequestRunner.get at line 50), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 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: \u201Cfix: ship 0.9.3 quota accuracy improvements (#135)\u201D; \u201Cfix: preserve observed usage over synthetic full quota reports\u201D; \u201CFix GitHub quota tracking and stack menu bar counts for 0.9.2\u201D; \u201Cfix: honor GitHub retry budgets across REST and GraphQL (#129)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 21:04:54 -07:00\u0027 --until=\u00272026-09-30 21:04:54 -07:00\u0027 --full-history --no-merges -- Sources/RepoBarCore/API/GitHubRequestRunner.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GitHubRequestRunner.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e62bab014865c33cda5f8a390cfee28447a6ec77dac89d84f51bde9aa9e9716"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/RepoBarCore/API/GraphQLClient.swift: Sources/RepoBarCore/API/GraphQLClient.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is GraphQLClient.repoSummary at line 58), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 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: \u201Cfix: ship 0.9.3 quota accuracy improvements (#135)\u201D; \u201CFix GitHub quota tracking and stack menu bar counts for 0.9.2\u201D; \u201Cfix: honor GitHub retry budgets across REST and GraphQL (#129)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 21:04:54 -07:00\u0027 --until=\u00272026-09-30 21:04:54 -07:00\u0027 --full-history --no-merges -- Sources/RepoBarCore/API/GraphQLClient.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/GraphQLClient.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f80d73251c5e286d49895d6fa82d610ae0f9e248ceeb5ebed970ccb3ee0524"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/RepoBarCore/API/RateLimitSnapshot.swift: 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\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is RateLimitSnapshot.from at line 11), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 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: \u201Cfix: ship 0.9.3 quota accuracy improvements (#135)\u201D; \u201Cfix: preserve observed usage over synthetic full quota reports\u201D; \u201CFix GitHub quota tracking and stack menu bar counts for 0.9.2\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-02 21:04:54 -07:00\u0027 --until=\u00272026-09-30 21:04:54 -07:00\u0027 --full-history --no-merges -- Sources/RepoBarCore/API/RateLimitSnapshot.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/API/RateLimitSnapshot.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9272df6467256fac93d1f9e56a6c67a33e6db44f81127f2c6490ca0f971d1ab0"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 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 (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 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 \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D22","level":"warning","message":{"text":"Redundant naming with unclear distinction. \u0027repositoryList\u0027 and \u0027cachedRepositoryList\u0027 appear to perform the same logical operation (fetching a list of repositories) but differ only by a \u0027cached\u0027 prefix. It is unclear if \u0027repositoryList\u0027 is uncached, or if \u0027cachedRepositoryList\u0027 is the primary method and \u0027repositoryList\u0027 is an alias/legacy. This creates confusion about which method to use for standard operations.: Unify into a single method, e.g., \u0027repositoryList(limit:)\u0027. If caching is an implementation detail, it should be handled internally. If there is a distinct \u0027force refresh\u0027 vs \u0027use cache\u0027 behavior, use explicit verbs like \u0027fetchRepositoryList(force:)\u0027 or \u0027getCachedRepositoryList()\u0027. Given the presence of \u0027clearCache\u0027 and \u0027clearRepoDetailCache\u0027, the client likely manages cache state internally, making the explicit \u0027cached\u0027 prefix in the method name redundant and confusing. (signatures: GitHubClient.repositoryList(limit: Int?): [Repository] | GitHubClient.cachedRepositoryList(limit: Int?): [Repository])"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aef3a4b9daea42a3067c8e2918ee4b30c1809cc76ed4fd90fd2ba52760f33e8e"}},{"ruleId":"D22","level":"warning","message":{"text":"Inconsistent naming for content retrieval. \u0027repoContents\u0027 returns a list of items (metadata/directory listing), while \u0027repoFileContents\u0027 returns raw data. The naming convention \u0027repoContents\u0027 vs \u0027repoFileContents\u0027 is slightly inconsistent with the return types. \u0027Contents\u0027 usually implies a list, while \u0027FileContents\u0027 implies raw data. However, \u0027repoContents\u0027 with an optional path suggests it might also fetch a single file if a path is provided, but it returns [RepoContentItem]. This ambiguity makes it unclear if \u0027repoContents\u0027 is strictly for directories or if it handles files differently than \u0027repoFileContents\u0027.: Rename \u0027repoContents\u0027 to \u0027repoDirectoryContents\u0027 or \u0027repoListing\u0027 to clearly indicate it returns a list of items. Keep \u0027repoFileContents\u0027 for raw data retrieval. Alternatively, if \u0027repoContents\u0027 is intended to be a general-purpose content fetcher, it should have a consistent return type or clear overloads, but currently, the distinction between returning metadata ([RepoContentItem]) vs raw data (Data) is obscured by the similar names. (signatures: GitHubClient.repoContents(owner: String, name: String, path: String?): [RepoContentItem] | GitHubClient.repoFileContents(owner: String, name: String, path: String): Data)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8152a087e0299cb6d4247069a1bea3885a667c0e22896b03c1890e0c3ec37cdf"}},{"ruleId":"D22","level":"warning","message":{"text":"Ambiguous cache clearing operations. \u0027clearCache\u0027 and \u0027clearRepoDetailCache\u0027 suggest different scopes of caching. It is unclear if \u0027clearCache\u0027 is a global clear that includes \u0027repoDetailCache\u0027, or if they are distinct caches. This leads to potential redundancy or confusion about which method to call to clear specific data.: Clarify the scope. If \u0027clearCache\u0027 is a global clear, remove \u0027clearRepoDetailCache\u0027 or make it an alias. If they are distinct, name them more specifically, e.g., \u0027clearGlobalCache()\u0027 and \u0027clearRepositoryDetailCache()\u0027. Consider using a more structured cache management API if multiple cache types exist. (signatures: GitHubClient.clearCache() | GitHubClient.clearRepoDetailCache())"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0a5f900dc6f200770c66cb3b6c2cd850c9ea412c4cda6826c4f92b7411248b3c"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (44635 LoC, 205 public types across 9 directories). Review these for cohesion \u2014 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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7ea375804dda0eeca1eeaabd2e30647f2479716dec72e855c0be4e1f22a1ff81"},"properties":{"commitSha":"f949074704ea25ca348c1f6dbc18e401d2b663cd"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b1253f479c47b3cbb41c03a8be95b33da85880b9be863076024841742400dbd1"},"properties":{"commitSha":"866f272fb4a9b620ae8d9f9e31079c6f6178b972"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1498825690ee691422757d83c6c8726aaf69040fa62a3b6b71a03075f0880320"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 8 of 183 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 183 of the 291 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: Sources/RepoBarCore/Models/ActionsUsageInfo.swift, Sources/RepoBarCore/Notifications/GitHubPullRequestNotificationDetector.swift, Sources/RepoBar/Views/ActionsLimitsMenuViews.swift, Sources/RepoBar/App/AppState\u002BActions.swift, Sources/RepoBarCore/API/GitHubRestAPI\u002BActions.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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: StatusBarMenuManager.swift \u2192 GitHubReferenceBrowserMenuItemView.swift, StatusBarMenuBuilder\u002BRepoSubmenus.swift, AppLimits.swift, MenuRepoFilters.swift, RepoRecentItems.swift: \u0060Sources/RepoBar/StatusBar/StatusBarMenuManager.swift\u0060 changes together with 5 other files \u2014 \u0060Sources/RepoBar/StatusBar/GitHubReferenceBrowserMenuItemView.swift\u0060, \u0060Sources/RepoBar/StatusBar/StatusBarMenuBuilder\u002BRepoSubmenus.swift\u0060, \u0060Sources/RepoBar/Support/AppLimits.swift\u0060, \u0060Sources/RepoBar/Support/MenuRepoFilters.swift\u0060, \u0060Sources/RepoBarCore/Models/RepoRecentItems.swift\u0060 \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"324586c6356dbcd3369599ddf8daca4a8b5d3e5213d5c317e92b6546a711b95a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CLIOutput.swift \u2194 Commands.swift: \u0060Sources/repobarcli/CLIOutput.swift\u0060 and \u0060Sources/repobarcli/Commands.swift\u0060 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 \u2014 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 \u2014 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 \u0060d976bd0c\u0060 refactor: share repo query defaults and formatters; \u00604462fea8\u0060 feat(cli): default repo to URL; \u006091cbba85\u0060 perf(cli): stabilize release columns \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/repobarcli/CLIOutput.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d562de243ae81451716e616d066a4cb846b5c82c9899538e1d53fde9898b81"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: SettingsView.swift \u2194 LocalProjectsService.swift: \u0060Sources/RepoBar/Settings/SettingsView.swift\u0060 and \u0060Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift\u0060 change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 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 \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u00604927f031\u0060 feat: show dirty files in menu; \u006012dba9de\u0060 feat: add local git state block and actions; \u00602b7e2bcb\u0060 feat: show git sandbox info \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/Settings/SettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c5e79f123cbd988f571cf8ed73693ce1c0f79d4a39eef4f9398fd7884d184f"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: StatusBarMenuBuilder.swift \u2194 RepoRecentItems.swift: \u0060Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift\u0060 and \u0060Sources/RepoBarCore/Models/RepoRecentItems.swift\u0060 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 \u2014 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 \u2014 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 \u0060c7273234\u0060 feat: add commit feeds to menus; \u00603b1b76d4\u0060 feat: add release assets and extra submenus; \u00601712af95\u0060 feat: add CI runs submenu \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBar/StatusBar/StatusBarMenuBuilder.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5187b32a617e4a964b75bd948e9697ba9071b285babe4153fda8810a575bc5b6"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"}},{"ruleId":"DM4","level":"error","message":{"text":"Anemic domain model: Error: \u0060Error\u0060 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) \u2014 the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/Error\u002BAuth.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"288158ee458347081bede4f8f36b68388802252549b456db97c0bb5958242597"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 3138 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"R1","level":"warning","message":{"text":"Type Safety: 5 typed \u00B7 4 plain JS \u2014 the untyped files are Scripts/docs-list.mjs, Scripts/generate-llms.mjs, Scripts/json_to_sdl.js, Scripts/package-app.test.mjs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d00ee7953f55325a823d27e5db9657c80ca9b9861c0c0abf8fe487cd3fa586d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3 locations): Scripts/ghrest.ts:63 \u00B7 Scripts/ghrest.ts:104 \u00B7 Scripts/ghrest.ts:137 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 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 \u2014 the whole function, component or branch these lines sit in \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/ghrest.ts"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"38160819cf6c32e6bdaacd260b06e551da25561e245473b9ec06ab82781308e2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function extractMetadata (cyclomatic 16, cognitive 32): 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 \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/docs-list.mjs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f080ae04cebb1da5ab37f407742b935027702429360f6438d449b94b9d4e361"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 11, cognitive 8): (anonymous) has cyclomatic complexity 11 and cognitive complexity 8; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/ghql.ts"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa15275efd735f0f7b37e0ad66450977cf417797e640dc8338ec2fe0781dd828"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/docs-list.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fc10f0074f9b9b62c8e25fc03049b759e663bd2d33367da552113874dc0bb9"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/generate-llms.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ac278389d24ed1b35122883c7b2bd661bef7a67610d5a5d51b3a6246ad0d7f"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Scripts/json_to_sdl.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"57090cd8e3275d7701d65b8615f0ec1ab4acd43bd2f18fc1aab8c0c444266336"}},{"ruleId":"R6","level":"warning","message":{"text":"No typecheck script: test \u2713 \u00B7 lint \u2713 \u00B7 typecheck \u2717 \u2014 read from this repository\u0027s package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: \u0060test\u0060 for the suite, \u0060lint\u0060 or \u0060prettier\u0060 for linting, \u0060typecheck\u0060/\u0060type-check\u0060/\u0060tsc\u0060 for type checking. \u2717 therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline \u2014 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 \u2713 means the wiring is DECLARED \u2014 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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"912edc7f1fd20bf80ef68c3293e3048565115e48707dc5f9d492201598794658"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host == \u0022github.com\u0022 || host.hasSuffix(\u0022.github.com\u0022)\u0060 appears character-identically in 2 files \u2014 Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift, Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BURLs.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceLocalContext.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"208b4ea21dfc19c1d7594a58895f18361fd0b09c3bb6ce7926bfdcfe686e36c5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060normalized.contains(\u0022sha\u0022) || normalized.contains(\u0022commit\u0022) || normalized.contains(\u0022hash\u0022)\u0060 appears character-identically in 2 files \u2014 Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BContext.swift, Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BHeadingReferences.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/Support/GitHubReferenceTranslator\u002BContext.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"be70fe852ca10c60b0c6e4ba35b055d589a0f5c4781e03232e959b24ba3835fb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status.contains(\u0022M\u0022) || status.contains(\u0022R\u0022) || status.contains(\u0022C\u0022) || status.contains(\u0022T\u0022) || status.contains(\u0022U\u0022)\u0060 appears character-identically in 2 files \u2014 Sources/RepoBarCore/LocalProjects/LocalGitService.swift, Sources/RepoBarCore/LocalProjects/LocalProjectsService.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/RepoBarCore/LocalProjects/LocalGitService.swift"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b21a47ff9c92d3a3633a053b676e8a77139b445e14cd03b83f4d28cad605cc"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"CWE-506","shortDescription":{"text":"CWE-506"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":6,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}