{"$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":"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":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"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":"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":"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":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"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":"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":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"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":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"SearchViewModel.transform (cyclomatic 44): SearchViewModel.transform has cyclomatic complexity 44 (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":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"03007e75eb98dc87d2d2dae6391555ff71f7cfc7f2c606fed14c050afacf3593"}},{"ruleId":"D1","level":"warning","message":{"text":"RepositoryViewController.bindViewModel (cyclomatic 35): RepositoryViewController.bindViewModel has cyclomatic complexity 35 (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":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f00024520e5dcd156a90ab697b16c2d0340bd79184ef24f4acf2f06bd0b13c"}},{"ruleId":"D1","level":"warning","message":{"text":"UserViewModel.transform (cyclomatic 31): UserViewModel.transform has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/User Details/UserViewModel.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3046e8d8e265b5f0a454df5040fde397cd2f67bb44eb66846cba5ef4332f89f"}},{"ruleId":"D1","level":"warning","message":{"text":"UserViewController.bindViewModel (cyclomatic 27): UserViewController.bindViewModel has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/User Details/UserViewController.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9a1f41e732801a0eecc8eb9a225dca628b8c375c2dab9c6353a986b50ceece"}},{"ruleId":"D1","level":"warning","message":{"text":"RepositoryViewModel.transform (cyclomatic 24): RepositoryViewModel.transform has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c718fa12b0879348329edb57827b5e6265ff4c1485ee0284f369ffcd6977f78"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsViewController.bindViewModel (cyclomatic 21): SettingsViewController.bindViewModel 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":"SwiftHub/Modules/Settings/SettingsViewController.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"49e102c405cf3c8248f4dee86b26882fc49556c8cf36233ebbe98622c7562c1c"}},{"ruleId":"D2","level":"warning","message":{"text":"SearchViewModel.transform (cognitive 51): SearchViewModel.transform has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 14 (16 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fd0d3fb543c708117e0c19f53852a2d875f6ea417a565f505c8acaa1941b60d"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryViewController.bindViewModel (cognitive 38): RepositoryViewController.bindViewModel has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (35 pts), match/switch 2, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"5051e472c9fe2bb1fc28ec3ae4d9d083c82785a7b4b4195ff6fb09641ce359f2"}},{"ruleId":"D2","level":"warning","message":{"text":"UserViewModel.transform (cognitive 27): UserViewModel.transform has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, boolean chains 5, match/switch 3 (4 pts), ternaries 1 (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":"SwiftHub/Modules/User Details/UserViewModel.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4d1041eb4592e2956da78e2c0fb741e87c96e8ed7cb958834e6405c9802cc3"}},{"ruleId":"D2","level":"warning","message":{"text":"UserViewController.bindViewModel (cognitive 25): UserViewController.bindViewModel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 2, ternaries 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":"SwiftHub/Modules/User Details/UserViewController.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"582882f3427c827f5e5fcb18cdf58c950c0b1df23cede41ddac6762b11bf1a18"}},{"ruleId":"D2","level":"warning","message":{"text":"RepositoryViewModel.transform (cognitive 19): RepositoryViewModel.transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 3, match/switch 2, ternaries 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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f525162a254dcf161930034bcc13ab2d987975c7a3a7d495269156a0cb4da6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SearchViewModel.transform: MethodTooLong \u2014 transform runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53\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":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"640457148f1a8b90e4443d0dbaf1fa9011f90a54c2d716ba26a3ce67330d5e7d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepositoryViewModel.transform: MethodTooLong \u2014 transform runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03\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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17bfa930cd552ee1c16dd260b30718366dc51c56909e2bff790d5736de81d16"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RestApi: TooManyMethods \u2014 59 methods. The bar is 30 methods; this is 29 over it, 1.97\u00D7 the bar. Most of these members implement repository.SwiftHubAPI (51 of 59 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Networking/Rest/RestApi.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc091fd4d40e783eb054ff4262d1dbf5bd0c9d2402be7781e3afde89419fc153"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GraphApi: TooManyMethods \u2014 54 methods. The bar is 30 methods; this is 24 over it, 1.80\u00D7 the bar. Most of these members implement repository.SwiftHubAPI (51 of 54 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Networking/GraphQL/GraphApi.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7378d2b1234d2f39c11459085bb099ffde824615d8b4f1194289f90f62b169"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: UserViewModel.transform: MethodTooLong \u2014 transform runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68\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":"SwiftHub/Modules/User Details/UserViewModel.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"4240d9aa0b955faa8807652f04ad18178f3b068f10d00f0a603abe58d1f17ff7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RepositoryViewController.bindViewModel: MethodTooLong \u2014 bindViewModel runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\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":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a84d37e296f92f6e28481ba68eeb3ebfe3e80c96a03bf49592c945312234dd9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: UserViewController.bindViewModel: MethodTooLong \u2014 bindViewModel runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\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":"SwiftHub/Modules/User Details/UserViewController.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff5c34d83f18612265090a26d238afadafbdbe1a90288c3fc3e42f0a92013fc7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsViewModel.transform: MethodTooLong \u2014 transform runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\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":"SwiftHub/Modules/Settings/SettingsViewModel.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85e48a77d4baf01f94455297ac7beade43b6a9b6f7a410898d8819904bf5420"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ChatViewController: 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":"SwiftHub/Common/ChatViewController.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81f4b9b41070792d17dd97d66f6a93eaac7e372e01994757f0abbca4cc1fc36"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (9 members, 14 shared lines): SwiftHub/Modules/Branches/BranchesViewModel.swift:34-66 | SwiftHub/Modules/Commits/CommitsViewModel.swift:36-78 | SwiftHub/Modules/Events/EventsViewModel.swift:56-121 | SwiftHub/Modules/Issues/IssuesViewModel.swift:43-92 | SwiftHub/Modules/Notifications/NotificationsViewModel.swift:48-108 | SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift:38-82 | SwiftHub/Modules/Releases/ReleasesViewModel.swift:36-78 | SwiftHub/Modules/Repositories/RepositoriesViewModel.swift:48-104 | SwiftHub/Modules/Users/UsersViewModel.swift:49-107 \u2014 These 9 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 9 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 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Branches/BranchesViewModel.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"91fa187f8558281dd42f993765dae0c46c7b071eb848e3f4ddd0a17f9db50462"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): SwiftHub/Modules/Branches/BranchesViewController.swift:24-46 | SwiftHub/Modules/Commits/CommitsViewController.swift:24-52 | SwiftHub/Modules/Contents/ContentsViewController.swift:32-62 | SwiftHub/Modules/Notifications/NotificationsViewController.swift:63-99 | SwiftHub/Modules/Pull Requests/PullRequestsViewController.swift:55-83 | SwiftHub/Modules/Releases/ReleasesViewController.swift:24-50 \u2014 These 6 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 6 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 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Branches/BranchesViewController.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68e255c27c175965861941082c4de766974ea445fcefe0fb1aabf898073ede0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): SwiftHub/Modules/Events/EventsViewController.swift:75-114 | SwiftHub/Modules/Issues/IssuesViewController.swift:82-117 | SwiftHub/Modules/Repositories/RepositoriesViewController.swift:47-82 | SwiftHub/Modules/Repository Details/RepositoryViewController.swift:130-304 | SwiftHub/Modules/User Details/UserViewController.swift:143-294 | SwiftHub/Modules/Users/UsersViewController.swift:46-81 \u2014 These 6 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 6 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 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Events/EventsViewController.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb9c929ff374ea9ea3fdf0d7bf4ac8494d57a3246ad91d15ed7e7ebaf6cd3fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): SwiftHub/Networking/GraphQL/Apollo\u002BRx.swift:27-44 | SwiftHub/Networking/GraphQL/Apollo\u002BRx.swift:50-67 | SwiftHub/Networking/GraphQL/Apollo\u002BRx.swift:73-90 \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 \u0060SwiftHub/Networking/GraphQL/Apollo\u002BRx.swift:27\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":"SwiftHub/Networking/GraphQL/Apollo\u002BRx.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabfdf1128b0fc98ad66ef969b71624c030de5a8c1aa50e8d707181d527e7a98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): SwiftHub/Models/User.swift:135-150 | SwiftHub/Models/User.swift:157-172 \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 \u0060SwiftHub/Models/User.swift:135\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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060graph\u0060 to \u0060ViewerQuery.Data.Viewer?\u0060 in one and \u0060UserQuery.Data.User?\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":"SwiftHub/Models/User.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21ea171bb753a26ae32f2001bd6e953401dbc524408111fce2dd7a4e4c4bd93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:311-324 | SwiftHub/Modules/User Details/UserViewModel.swift:264-278 \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 \u0060SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:311\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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"05049c040601c0e5c471b658c2b6abaa085dcce7752f4a06cee754805b4ab34d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): SwiftHub/Modules/Events/EventsViewModel.swift:73-85 | SwiftHub/Modules/Issues/IssuesViewModel.swift:60-72 | SwiftHub/Modules/Notifications/NotificationsViewModel.swift:71-83 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Events/EventsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Issues/IssuesViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Events/EventsViewModel.swift:73\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":"SwiftHub/Modules/Events/EventsViewModel.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"4770d9feadcdad1393c6ba7f2a94d913b8701377da571dc3df898ef6f275caaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): SwiftHub/Modules/Issue Details/IssueViewModel.swift:35-47 | SwiftHub/Modules/Pull Request Details/PullRequestViewModel.swift:35-47 \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":"SwiftHub/Modules/Issue Details/IssueViewModel.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4abc0a77764ff5a3863311f4639cfa599f8aecef16c894074f312381ec25ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryDetailCell.swift:13-25 | SwiftHub/Modules/Settings/Cells/SettingCell.swift:13-25 \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":"SwiftHub/Modules/Repository Details/RepositoryDetailCell.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"39924a2b2cf61b831be09faa93e9236ccb3b7306deb9ea58220abd71a53d3c9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): SwiftHub/Modules/Search/SearchViewModel.swift:121-133 | SwiftHub/Modules/Search/SearchViewModel.swift:171-183 \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 \u0060SwiftHub/Modules/Search/SearchViewModel.swift:121\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":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfed980fcabf22f28d5b01fca9bc5a8d9379b25a0286e558e0b31b31d75dfe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): SwiftHub/Modules/Issue Details/IssueViewController.swift:55-66 | SwiftHub/Modules/Pull Request Details/PullRequestViewController.swift:55-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 \u0060SwiftHub/Modules/Issue Details/IssueViewController.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Issue Details/IssueViewController.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e45fadadcd172f560e57d86a750e2351267f5d59ff6926ad42d564227a1157"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): SwiftHub/Modules/Branches/BranchesViewModel.swift:50-60 | SwiftHub/Modules/Commits/CommitsViewModel.swift:52-62 | SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift:55-65 | SwiftHub/Modules/Releases/ReleasesViewModel.swift:52-62 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Commits/CommitsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Branches/BranchesViewModel.swift:50\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":"SwiftHub/Modules/Branches/BranchesViewModel.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b73fc9438cef03dac8d15a09153a6ee4e9d20865f2946f9696a91074c4b70aa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): SwiftHub/Modules/Commits/CommitsViewModel.swift:68-78 | SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift:72-82 | SwiftHub/Modules/Releases/ReleasesViewModel.swift:68-78 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Commits/CommitsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Commits/CommitsViewModel.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Commits/CommitsViewModel.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d32b4ff9b3b4219d7ab87205380f0cbea86183a55034761921508db85da5e0c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Issue Details/IssueCommentsViewModel.swift:39-49 | SwiftHub/Modules/Pull Request Details/PullRequestCommentsViewModel.swift:39-49 \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 \u0060SwiftHub/Modules/Issue Details/IssueCommentsViewModel.swift:39\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":"SwiftHub/Modules/Issue Details/IssueCommentsViewModel.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6aed3555cd2b8211763f6c7cc97c0ebfa3d42950ffa91f2fd57c4e34ec8ee6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Issues/IssueCellViewModel.swift:51-61 | SwiftHub/Modules/Pull Requests/PullRequestCellViewModel.swift:45-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 \u0060SwiftHub/Modules/Issues/IssueCellViewModel.swift:51\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":"SwiftHub/Modules/Issues/IssueCellViewModel.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73b5240e2aa1a3dbdf85e7f71357a6cb817c674c676fac7251a6757406be630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Languages/LanguagesViewController.swift:70-80 | SwiftHub/Modules/Settings/SettingsViewController.swift:68-78 \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 \u0060SwiftHub/Modules/Languages/LanguagesViewController.swift:70\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":"SwiftHub/Modules/Languages/LanguagesViewController.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e185d166678bb3466d54f0de0f76b1ede147e3caabf7db85c46f7be476bec209"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Search/SearchViewModel.swift:95-105 | SwiftHub/Modules/Search/SearchViewModel.swift:146-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Search/SearchViewModel.swift:95\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":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bfb1295e583b6e5b23a619f212b614423654c38d82bcb508cf102fbee3ce5df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/User Details/ContributionsCell.swift:27-37 | SwiftHub/Modules/User Details/UserDetailCell.swift:13-23 \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 \u0060SwiftHub/Modules/User Details/ContributionsCell.swift:27\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":"SwiftHub/Modules/User Details/ContributionsCell.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"536fd31bdad64d8b17724f75d74b2a6b993a8569a8f5045887eb037948539b36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): SwiftHub/Modules/Events/EventsViewController.swift:93-102 | SwiftHub/Modules/Issues/IssuesViewController.swift:96-105 | SwiftHub/Modules/Repositories/RepositoriesViewController.swift:61-70 | SwiftHub/Modules/Users/UsersViewController.swift:60-69 \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 \u0060SwiftHub/Modules/Events/EventsViewController.swift:93\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 before the matched lines, \u0060SwiftHub/Modules/Events/EventsViewController.swift:89\u0060 calls \u0060disposed\u0060, \u0060drive\u0060 and \u0060SwiftHub/Modules/Issues/IssuesViewController.swift:95\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":"SwiftHub/Modules/Events/EventsViewController.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0bb0ed9f41d82e3858c3440adec8bb6567772b7434bf3e666410d9ef82bf2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewController.swift:308-317 | SwiftHub/Modules/User Details/UserViewController.swift:298-307 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift\u0060 and \u0060SwiftHub/Modules/User Details/UserViewController.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift:308\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":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5050a739c169ad1fcc08441dd3ebf8fa36c071c76b143464cdf84d090ff6025"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): SwiftHub/Modules/Search/SearchViewModel.swift:210-219 | SwiftHub/Modules/Search/SearchViewModel.swift:225-234 \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 \u0060SwiftHub/Modules/Search/SearchViewModel.swift:210\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":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"48972955e6ff8d02ea1d2c2413ea9b0c1b520dffd07435272318918bd507d68f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewController.swift:284-292 | SwiftHub/Modules/User Details/UserViewController.swift:285-293 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift\u0060 and \u0060SwiftHub/Modules/User Details/UserViewController.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift:284\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":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"0146d702f4010ac2ea5265c034b189acd0f5b3142afff1c8079797dc15c6c315"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 9): SwiftHub/Modules/Branches/BranchesViewModel.swift:39-46 | SwiftHub/Modules/Commits/CommitsViewModel.swift:41-48 | SwiftHub/Modules/Events/EventsViewModel.swift:62-69 | SwiftHub/Modules/Issues/IssuesViewModel.swift:49-56 | SwiftHub/Modules/Notifications/NotificationsViewModel.swift:60-67 | SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift:44-51 | SwiftHub/Modules/Releases/ReleasesViewModel.swift:41-48 | SwiftHub/Modules/Repositories/RepositoriesViewModel.swift:53-59 | SwiftHub/Modules/Users/UsersViewModel.swift:54-60 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Commits/CommitsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Branches/BranchesViewModel.swift:39\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060SwiftHub/Modules/Events/EventsViewModel.swift:59\u0060 calls \u0060bind\u0060, \u0060disposed\u0060 and \u0060SwiftHub/Modules/Branches/BranchesViewModel.swift:36\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":"SwiftHub/Modules/Branches/BranchesViewModel.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a3a731583e7a2f7601530782234f84dae9858be0ef67451844c3ba6f4d2f43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 9): SwiftHub/Modules/Branches/BranchesViewModel.swift:49-56 | SwiftHub/Modules/Commits/CommitsViewModel.swift:51-58 | SwiftHub/Modules/Events/EventsViewModel.swift:72-79 | SwiftHub/Modules/Issues/IssuesViewModel.swift:59-66 | SwiftHub/Modules/Notifications/NotificationsViewModel.swift:70-77 | SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift:54-61 | SwiftHub/Modules/Releases/ReleasesViewModel.swift:51-58 | SwiftHub/Modules/Repositories/RepositoriesViewModel.swift:62-68 | SwiftHub/Modules/Users/UsersViewModel.swift:63-69 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Commits/CommitsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Pull Requests/PullRequestsViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Branches/BranchesViewModel.swift:49\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":"SwiftHub/Modules/Branches/BranchesViewModel.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec573181377d559ea6c67c10c5112e5a3723443ed20f86686a42ac9adb605aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): SwiftHub/Modules/Events/EventsViewModel.swift:90-97 | SwiftHub/Modules/Issues/IssuesViewModel.swift:71-78 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Events/EventsViewModel.swift\u0060 and \u0060SwiftHub/Modules/Issues/IssuesViewModel.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Events/EventsViewModel.swift:90\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":"SwiftHub/Modules/Events/EventsViewModel.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"0edda3830ac0004a92dd4204be1b89d3b95d1e33fa00658d9288f2e694739a7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): SwiftHub/Modules/Issue Details/IssueCommentsViewController.swift:23-30 | SwiftHub/Modules/Pull Request Details/PullRequestCommentsViewController.swift:23-30 \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 \u0060SwiftHub/Modules/Issue Details/IssueCommentsViewController.swift:23\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":"SwiftHub/Modules/Issue Details/IssueCommentsViewController.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ab62deebc21bc6f69959cc698fa08cf3417055ba6d772bb4f837f413d6d30f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:107-114 | SwiftHub/Modules/User Details/UserViewModel.swift:104-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 \u0060SwiftHub/Modules/Repository Details/RepositoryViewModel.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. 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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"6494ae15cfb453b09bb20be783472eed0b764618bf316dd4436cd18f2b97c758"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): SwiftHub/Modules/Branches/BranchesViewController.swift:32-38 | SwiftHub/Modules/Commits/CommitsViewController.swift:32-38 | SwiftHub/Modules/Contents/ContentsViewController.swift:40-46 | SwiftHub/Modules/Notifications/NotificationsViewController.swift:74-80 | SwiftHub/Modules/Pull Requests/PullRequestsViewController.swift:65-71 | SwiftHub/Modules/Releases/ReleasesViewController.swift:32-38 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060SwiftHub/Modules/Notifications/NotificationsViewController.swift:72\u0060 calls \u0060asObservable\u0060 and \u0060SwiftHub/Modules/Branches/BranchesViewController.swift:30\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":"SwiftHub/Modules/Branches/BranchesViewController.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e59aac30c30035bf0ee27a0fff13bee368285d0c72f2e02730d0f3b34772c02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewController.swift:247-253 | SwiftHub/Modules/User Details/UserViewController.swift:246-252 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift\u0060 and \u0060SwiftHub/Modules/User Details/UserViewController.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift:247\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":"SwiftHub/Modules/Repository Details/RepositoryViewController.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cdf86e134cd30bb86ed7224d63163e56ee77aa283d3ac675bfdf7937b0e8153"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:97-103 | SwiftHub/Modules/User Details/UserViewModel.swift:94-100 \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 \u0060SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:97\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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d3b9557c0b42e275de09aace9c46bf1d3af85be5b31a2582be0730c1135b1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): SwiftHub/Modules/Settings/SettingsViewModel.swift:147-153 | SwiftHub/Modules/Settings/SettingsViewModel.swift:158-164 \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 \u0060SwiftHub/Modules/Settings/SettingsViewModel.swift:147\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":"SwiftHub/Modules/Settings/SettingsViewModel.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"451049cace06a81047ced42b888bf83f8528a72df9265a69617f9cebb52f0412"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): SwiftHub/Modules/Events/EventsViewController.swift:95-100 | SwiftHub/Modules/Issues/IssuesViewController.swift:98-103 | SwiftHub/Modules/Repositories/RepositoriesViewController.swift:63-68 | SwiftHub/Modules/Repository Details/RepositoryViewController.swift:249-254 | SwiftHub/Modules/User Details/UserViewController.swift:248-253 | SwiftHub/Modules/Users/UsersViewController.swift:62-67 \u2014 before extracting anything, compare \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift\u0060 and \u0060SwiftHub/Modules/User Details/UserViewController.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060SwiftHub/Modules/Repository Details/RepositoryViewController.swift:247\u0060 calls \u0060drive\u0060, \u0060disposed\u0060 and \u0060SwiftHub/Modules/Issues/IssuesViewController.swift:96\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":"SwiftHub/Modules/Events/EventsViewController.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4dd16c75bf25b87e5d52234136f5c0b3de6038f4657b4c6c9fba18e9e661eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): SwiftHub/Modules/Settings/SettingsViewModel.swift:143-148 | SwiftHub/Modules/Settings/SettingsViewModel.swift:154-159 | SwiftHub/Modules/Settings/SettingsViewModel.swift:165-170 \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. 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":"SwiftHub/Modules/Settings/SettingsViewModel.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"71730a70ea2987c56db0e52660bb5d99868eafb2c58a7765df49205a6b1e5d9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftHub/Modules/Repositories/RepositoriesViewController.swift:77-82 | SwiftHub/Modules/Users/UsersViewController.swift:76-81 \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 \u0060SwiftHub/Modules/Repositories/RepositoriesViewController.swift:77\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":"SwiftHub/Modules/Repositories/RepositoriesViewController.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c33f58312550445975541d8337ec57bbe6ab6515510fd59a737048a5aed6c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:154-159 | SwiftHub/Modules/User Details/UserViewModel.swift:149-154 \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":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91a6f11c1f5ba08a9282fd1a2c95aec096e5d0cc3fc1d3777f1e8cbf55a281c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): SwiftHub/Modules/Commits/CommitsViewController.swift:47-51 | SwiftHub/Modules/Releases/ReleasesViewController.swift:45-49 \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 \u0060SwiftHub/Modules/Commits/CommitsViewController.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":"SwiftHub/Modules/Commits/CommitsViewController.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"607524f1eaef0155f9b0ebb7d86a27b29666d2a5cc2bf57292225073a8b082e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Repositories/RepositoryCell.swift:30-40 | SwiftHub/Modules/Users/UserCell.swift:30-40 \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":"SwiftHub/Modules/Repositories/RepositoryCell.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"d41e124bc0a02784fe58d0d033ebf924e72e49077730289969cb94883eb0214b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftHub/Modules/Languages/RepoLanguageCell.swift:13-23 | SwiftHub/Modules/Settings Language/LanguageCell.swift:13-23 \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":"SwiftHub/Modules/Languages/RepoLanguageCell.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"88943d9bf9cffadedf0348d72b0bd32d65199bc3a500326d9f3873ec95feda59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftHub/Models/Repository.swift:203-208 | SwiftHub/Models/User.swift:244-249 \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":"SwiftHub/Models/Repository.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"4162d82ec432b6b86b72c5eff2d49d0c0bb97b7d247196b1eccd368282d29326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): SwiftHub/Modules/Issue Details/IssueCommentsViewModel.swift:28-32 | SwiftHub/Modules/Issue Details/IssueViewModel.swift:29-33 \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":"SwiftHub/Modules/Issue Details/IssueCommentsViewModel.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b40ea53077430845bc3e136fa5bd41c762de0050e534d1aff0e5262a993996b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftHub/Modules/Issues/IssuesViewController.swift:19-24 | SwiftHub/Modules/Pull Requests/PullRequestsViewController.swift:19-24 \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":"SwiftHub/Modules/Issues/IssuesViewController.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"421bc410471860f0ebf5dace88036418a403217778fa191689485d6723efcee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): SwiftHub/Modules/Pull Request Details/PullRequestCommentsViewModel.swift:28-32 | SwiftHub/Modules/Pull Request Details/PullRequestViewModel.swift:29-33 \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":"SwiftHub/Modules/Pull Request Details/PullRequestCommentsViewModel.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ab2065517ddb4a6628ff6b5c04c92901c161d9a597acd92ad1365aee989686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryDetailCellViewModel.swift:15-21 | SwiftHub/Modules/User Details/UserDetailCellViewModel.swift:15-21 \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":"SwiftHub/Modules/Repository Details/RepositoryDetailCellViewModel.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80efef8cac72013e99dff5e5b461f2daf1baf41ca39f93df2c6876ed6067811"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): SwiftHub/Modules/Repository Details/RepositoryViewModel.swift:47-53 | SwiftHub/Modules/User Details/UserViewModel.swift:46-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"7132c5d0684a5ebc4c499e66911e2d448582a36dcc72e81a42605dd2ef90c5b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): SwiftHub/Models/User.swift:29-33 | SwiftHub/Models/User.swift:36-40 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060graph\u0060 to \u0060ViewerQuery.Data.Viewer.ContributionsCollection?\u0060 in one and \u0060UserQuery.Data.User.ContributionsCollection?\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":"SwiftHub/Models/User.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c6913905b1e83b7eb046519b0ec09a612556b9f1bdba324d91b2050042ff0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): SwiftHub/Modules/Events/EventsViewController.swift:104-112 | SwiftHub/Modules/Notifications/NotificationsViewController.swift:82-90 \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 \u0060SwiftHub/Modules/Events/EventsViewController.swift:104\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":"SwiftHub/Modules/Events/EventsViewController.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"402b4f022b88254b4c767f16af26b44e93d4e225fe5c7ebed51498c1b10ad188"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ChatViewController (LCOM4 20): ChatViewController\u0027s methods fall into 20 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 20 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":"SwiftHub/Common/ChatViewController.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b588db55eee31f633f2386632479a8bd129e6cbd7446313160bf7d27a29a4a"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ViewController (LCOM4 16): ViewController\u0027s methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 16 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":"SwiftHub/Common/ViewController.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb568ea656a20d923047cd2fd3c7471e1995536cc31ccadd1d8fd720340e85b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: LibsManager (LCOM4 14): LibsManager\u0027s methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 14 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":"SwiftHub/Managers/LibsManager.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"713a881c5fdfaa5f08a1acdbc2ce60389d99b072a66a999eabe567e45b83cbcb"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Reactive (LCOM4 8): Reactive\u0027s methods fall into 8 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 8 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":"SwiftHub/Managers/ThemeManager.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"004d051b05dbba3193a20e9df364e89adb3585d661ede92a459353cfcf103649"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 6): AppDelegate\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 6 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":"SwiftHub/Application/AppDelegate.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"eece79c5af6dbfa6bc14355e42f4cdbc63800661c91d3a6b2afb738c90d1eec2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: RestApi (LCOM4 5): RestApi\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":"SwiftHub/Networking/Rest/RestApi.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"1689cd72aa024ae3abd4f9db87757db4520207f7dddc1fb8534aa6570d23a02a"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: UIView (LCOM4 5): UIView\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":"SwiftHub/Common/View.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3001adbc4316a5b42e1802f49c5c59aff4fed1c24329bc8064740fb03bb7b82"}},{"ruleId":"D9","level":"note","message":{"text":"Inverted test pyramid: Most tests are end-to-end, which tends to be brittle and slow."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3fc0c6fc621cd18b83a2d2c03ea6976b61fb4769f62dc21043f0af4cad912d10"}},{"ruleId":"D10","level":"error","message":{"text":"Assertions commented out: testExample: The test body contains commented-out assertion calls and no live one \u2014 it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHubTests/SwiftHubTests.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8955769e4943af14960d68385f1033dc251daa3942fbee7a68e2186a1a4932"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPerformanceExample: 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":"SwiftHubTests/SwiftHubTests.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9e50bf846844b8c3a980f8fc05de45d4ee3acc0b3db12f2aeff377e653a73e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testScreenshotSettings: 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":"SwiftHubUITests/SwiftHubUITests.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3be1b0c8967d42d76956c917020d9bd3ec2270ffdebb31ee4aad9448edd330"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testScreenshotRepositoryDetails: 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":"SwiftHubUITests/SwiftHubUITests.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c313f31693cf0950894cbc9d7a9184826a6e4285a1bc41cc980c5fbd6ed0f0a"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testScreenshotSearch: 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":"SwiftHubUITests/SwiftHubUITests.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9dfe00b1637f5b72613221454b515b59fa06b44aba9c468580ad4aa1e78e9d"}},{"ruleId":"D10","level":"error","message":{"text":"Test project verifies nothing: SwiftHubTests: No conventional assertion call was detected in 2 of 2 tests in \u0060SwiftHubTests\u0060 \u2014 the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off \u2014 it is not an approval/verifier harness."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHubTests/SwiftHubTests.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"258222076582342adb3c083e61288785f81c7fd8a3a0275b548d41226a729d7e"}},{"ruleId":"D10","level":"warning","message":{"text":"Test project verifies nothing: SwiftHubUITests: No conventional assertion call was detected in 3 of 3 tests in \u0060SwiftHubUITests\u0060 \u2014 the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHubUITests/SwiftHubUITests.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"a79401ee5ebd3932b87a81a26d24b66aea32968e1df4a9ac50a8f3ab68e597c5"}},{"ruleId":"D12","level":"warning","message":{"text":"No Gemfile.lock committed by an application: This repository declares 2 gem(s) across 1 Bundler manifest(s) and ships no application \u0060.gemspec\u0060, so it is an APPLICATION \u2014 but no \u0060Gemfile.lock\u0060 is committed. Nothing records the versions a working build resolved to, so \u0060bundle install\u0060 re-resolves against whatever rubygems.org serves today and two deploys of this commit are not guaranteed to be the same deploy. Run \u0060bundle install\u0060 and commit the resulting \u0060Gemfile.lock\u0060. (A published GEM correctly omits its lock, which is why this is asked only of a repository that ships no .gemspec.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"cce86a6764b0429f696055851835123ad1dee71ace60575c329aed06e5e6bcd7"}},{"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":"D34","level":"note","message":{"text":"Dormant codebase: 67 of 68 significant files have no living knowledge \u2014 the codebase as a whole is dormant, not 67 separate risks. Counted over 68 of the 187 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c69f1e54b7dd6fe9029dd02df6ba8f8145b789f2f18dbdaa086c40ded49dba6"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Repository Details/RepositoryViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da78280ba5598db877bd351290539de1c6b1fd5a73deff68733c8635abc0e086"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftHub/Modules/Search/SearchViewModel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"255e3b76bdd92e171e98d5c8c41464da2128c6990235bcea87a9edb76d54b541"}},{"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":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"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) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"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-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-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-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":0,"secretScannerRunsExcluded":0}}}]}