{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"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"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"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"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED1","name":"Handler temporal coupling","shortDescription":{"text":"Handler temporal coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/ED1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"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":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"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":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"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":"CleaningEngine.cleanItems (cyclomatic 41): CleaningEngine.cleanItems has cyclomatic complexity 41 (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":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d873ad188bc140c1932c1fdbff930d8d0df0f151d1cbabd04e6f896b5d54b9"}},{"ruleId":"D1","level":"warning","message":{"text":"AppPathFinder.matchesApp (cyclomatic 35): AppPathFinder.matchesApp 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":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dee68e6c8e152e2d433a2ac2dbb9600b9664761dbe2be8336a852d113b30d05"}},{"ruleId":"D1","level":"warning","message":{"text":"InteractiveReview.select (cyclomatic 31): InteractiveReview.select has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/InteractiveReview.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4163a009d06aa730c8b87976a002de648348582772afb91ab489410709a76c7"}},{"ruleId":"D1","level":"warning","message":{"text":"AppleStorageService.measure (cyclomatic 28): AppleStorageService.measure has cyclomatic complexity 28 (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":"PureMac/Services/AppleStorageService.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c65200595f187c05c0a3429ed995e4c75d4f40af1df4c2dd2352d8dbce580a"}},{"ruleId":"D1","level":"warning","message":{"text":"UniversalBinaryScanner.parseFatFile (cyclomatic 27): UniversalBinaryScanner.parseFatFile has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. 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":"PureMac/Logic/Scanning/UniversalBinaryScanner.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc3be5db98f35d1c3655de3115b9c9570edb3f85d39b42d0cf3e3d0afacdac3"}},{"ruleId":"D1","level":"warning","message":{"text":"CleaningEngine.cleanWithAdminPrivileges (cyclomatic 24): CleaningEngine.cleanWithAdminPrivileges 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":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f1bf9d088b62a106e203e7986b88b931d0cae7a1fe627b52688f2a63078cc9f"}},{"ruleId":"D1","level":"warning","message":{"text":"ProcessResourcesView.body (cyclomatic 24): ProcessResourcesView.body has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/ProcessResourcesView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b50541a9f048a2701e00405ba3804f5be8f7497111b2f34761165b88ecaa135"}},{"ruleId":"D1","level":"warning","message":{"text":"SimilarPhotoFinder.scan (cyclomatic 23): SimilarPhotoFinder.scan has cyclomatic complexity 23 (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":"PureMac/Services/SimilarPhotoFinder.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"f804260949ed392b619da1e4b66953c65687a7e95a8f0b97b1c9331493e50419"}},{"ruleId":"D1","level":"warning","message":{"text":"TerminalSession.readEscapeSequence (cyclomatic 22): TerminalSession.readEscapeSequence has cyclomatic complexity 22 (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":"cli/Sources/puremac/Core/TerminalSession.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df79f4ecc37d9a05a0139bd66b7c3bd5a2f0aab0b7b81d0c8089f636b1885bc"}},{"ruleId":"D1","level":"warning","message":{"text":"DuplicateFinder.scan (cyclomatic 22): DuplicateFinder.scan has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"403ef0883af73c84d21d25eca449512269a41143fd4d42fc3b99ef3834088344"}},{"ruleId":"D1","level":"warning","message":{"text":"Analyze.browse (cyclomatic 20): Analyze.browse has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \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":"cli/Sources/puremac/Commands/Analyze.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"65858872002f4855e92bb021592ad3450161be74ac201827d6559c17b4a35861"}},{"ruleId":"D1","level":"warning","message":{"text":"AppleFeaturesView.backupContent (cyclomatic 20): AppleFeaturesView.backupContent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c57b2044764235c971fdd51672c911e10f47b3db4e773c182c8ddb2281b426"}},{"ruleId":"D1","level":"warning","message":{"text":"ProtectionAudit.parse (cyclomatic 19): ProtectionAudit.parse has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52ce38fd069cf5fe645d882c2ce6dbab02ffa95e0fcb92699a497123bf6b524"}},{"ruleId":"D1","level":"warning","message":{"text":"InteractiveReview.render (cyclomatic 18): InteractiveReview.render has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/InteractiveReview.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"af266157d884266ae74ed3152364d393a3be5b0e228334801cabf928ed62c14a"}},{"ruleId":"D1","level":"warning","message":{"text":"Safety.canRemove (cyclomatic 18): Safety.canRemove has cyclomatic complexity 18 (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":"cli/Sources/puremac/Core/Safety.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac843930aef7e23faaa769e2e07884e3a35a822d0ec9a69fc89428c408fdfaf7"}},{"ruleId":"D1","level":"warning","message":{"text":"StorageExplorer.measure (cyclomatic 18): StorageExplorer.measure has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/StorageExplorer.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcd35a3106e3d7a50f615ba50a096edd720e25fd551f4a63202cd468b86fc41"}},{"ruleId":"D1","level":"warning","message":{"text":"AppState.cleanAll (cyclomatic 18): AppState.cleanAll has cyclomatic complexity 18 (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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"535436f2f5b120cdd93b3704f3f87bf83fd5425b156973c3d038c3fe5a12fa35"}},{"ruleId":"D1","level":"warning","message":{"text":"Purge.run (cyclomatic 17): Purge.run has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Purge.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4b6f258edc48d7adbebb660afa315e3b81a9e7ab2c656d70bb9714d1e653f2"}},{"ruleId":"D1","level":"warning","message":{"text":"ScanEngine.scanDirectory (cyclomatic 17): ScanEngine.scanDirectory has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d4bff768a0a13ae9feeb9cf5bb1b98e99950731c256118fb787da57a8444b4"}},{"ruleId":"D1","level":"warning","message":{"text":"AppPathFinder.processLocation (cyclomatic 17): AppPathFinder.processLocation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27708eb1bb64b475b2ff2b40af4d5df6555ae2c2ca160e4c16fec4c3f951f72"}},{"ruleId":"D1","level":"warning","message":{"text":"Clean.run (cyclomatic 16): Clean.run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Clean.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3dc2f8335495163270a1bb7bf1f847f537baf9753edf68d059082784c66a273"}},{"ruleId":"D1","level":"warning","message":{"text":"PlainSelectionReview.parseSelection (cyclomatic 16): PlainSelectionReview.parseSelection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Clean.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"45bc6a117dc20fe32a4bc59208e2c3e29640122f0eeb96bca1dd21692645e6b7"}},{"ruleId":"D1","level":"warning","message":{"text":"DeviceBackupService.walk (cyclomatic 16): DeviceBackupService.walk has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DeviceBackupService.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"005139eb154eeafac0a8d83d28615a350194eed673dbc0bb64a031665d78e244"}},{"ruleId":"D1","level":"warning","message":{"text":"ScanEngine.scanLargeFiles (cyclomatic 16): ScanEngine.scanLargeFiles has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72c220a700276b0f3c6793aa4776b8f02217676b0259df657ea1abe7a29fcac"}},{"ruleId":"D1","level":"warning","message":{"text":"ScanEngine.scanBrewCache (cyclomatic 16): ScanEngine.scanBrewCache has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e0b53f504ed8cdf4a4a21a501d98ea51b1e09014e6b2e47f484c76a6bc5aaa"}},{"ruleId":"D1","level":"warning","message":{"text":"AppRelease.isStableAppRelease (cyclomatic 16): AppRelease.isStableAppRelease has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/UpdateService.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"4164881dcc7e146a4d17cb5916cc2cc59440679df4e0e4d20ea2bd4763be7a4e"}},{"ruleId":"D1","level":"warning","message":{"text":"LanguageFilesScanner.inspect (cyclomatic 16): LanguageFilesScanner.inspect has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/LanguageFilesScanner.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab07f8524a82684cd7d140dc02239f48810bc306922071efa194778f77fb90da"}},{"ruleId":"D2","level":"warning","message":{"text":"CleaningEngine.cleanItems (cognitive 102): CleaningEngine.cleanItems has cognitive complexity 102 (threshold 15). Drivers by points: if/else 31 (90 pts), boolean chains 9, error handling 1 (2 pts), loops 1 (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"677507c25f510489f410cadfbdc9a0fa918adf21c94fd14b74cede6c01288f6d"}},{"ruleId":"D2","level":"warning","message":{"text":"AppPathFinder.matchesApp (cognitive 44): AppPathFinder.matchesApp has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 16, ternaries 4 (5 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c66695b9bf51693385731240e55fc80b0246d3b733e95acdced6c8567a82ea7"}},{"ruleId":"D2","level":"warning","message":{"text":"InteractiveReview.select (cognitive 41): InteractiveReview.select has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 25). 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":"cli/Sources/puremac/Core/InteractiveReview.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a98657c72b250d7291c5e131e2c17e2036ddd7679042cc11de09fb3022525a"}},{"ruleId":"D2","level":"warning","message":{"text":"AppleStorageService.measure (cognitive 37): AppleStorageService.measure has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 12, error handling 1 (2 pts), loops 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/AppleStorageService.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd9a4a7418e7115a916a1abeeb90edf1d4bec1e3374c114d4f50b6c29034b94"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.scanDirectory (cognitive 36): ScanEngine.scanDirectory has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (28 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 19). 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":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a126b3de42ef1ae512709ecb71553923530adf0f1df2049b8a63a01c37fcd04"}},{"ruleId":"D2","level":"warning","message":{"text":"StorageExplorer.measure (cognitive 36): StorageExplorer.measure has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), error handling 2 (5 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 17). 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":"PureMac/Services/StorageExplorer.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"4edbcc7b6dea8b4e095b5d4a862e58ba1caad1fcb9fa5ac0bf3a969e251cf1ee"}},{"ruleId":"D2","level":"warning","message":{"text":"UniversalBinaryScanner.parseFatFile (cognitive 36): UniversalBinaryScanner.parseFatFile has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 9). Of this number, 32 points are the body\u0027s own statements and 4 belong to 2 function items inside it that branch. 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":"PureMac/Logic/Scanning/UniversalBinaryScanner.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"d39e2c35927254205192097a0ce2ae4f853a92a00107a8afde17f9658e05909d"}},{"ruleId":"D2","level":"warning","message":{"text":"AppPathFinder.processLocation (cognitive 35): AppPathFinder.processLocation has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 2 (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":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c67099a28a40bbc260c94961e8a8d431874683d6799065ceb1c7162436377ab"}},{"ruleId":"D2","level":"warning","message":{"text":"Purger.scan (cognitive 34): Purger.scan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Purger.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4c0e548df3e58ea18b815a6c6fb5dfbdfcbb107504141d89c053852897a1d0"}},{"ruleId":"D2","level":"warning","message":{"text":"UniversalBinaryScanner.fatFrameworkBinaries (cognitive 34): UniversalBinaryScanner.fatFrameworkBinaries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/UniversalBinaryScanner.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5b4860c61a891570d984e44b0f6836f5f533b681c80425f8e6edd5e8c8c3803"}},{"ruleId":"D2","level":"warning","message":{"text":"DuplicateFinder.scan (cognitive 33): DuplicateFinder.scan has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 5, error handling 2 (4 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb7315455da7b768365149f5003b0a467b5f86ab84a64f8dd7d82749140c20d5"}},{"ruleId":"D2","level":"warning","message":{"text":"SimilarPhotoFinder.scan (cognitive 32): SimilarPhotoFinder.scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 9, loops 2 (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":"PureMac/Services/SimilarPhotoFinder.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"9648cbb612b409b902ce5c680ecd93657fd781ac9ae9d2f4529a8c76814ea9ec"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.scanBrewCache (cognitive 30): ScanEngine.scanBrewCache has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 3 (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":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a152f958a20f009f1beff46691b433a859524c068098344d28272d2609defb2"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessResourcesView.body (cognitive 29): ProcessResourcesView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/ProcessResourcesView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20b50582beecadeaa67ee072e8284c550fd2b3256eb3ce02db46fbdef2e5cd3"}},{"ruleId":"D2","level":"warning","message":{"text":"CleaningEngine.cleanWithAdminPrivileges (cognitive 27): CleaningEngine.cleanWithAdminPrivileges has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 5, loops 2, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ca8caa743efc556098e1b1ad4e596b446823fa0dcf8cd060244aa6bdbfe914"}},{"ruleId":"D2","level":"warning","message":{"text":"Cleaner.remove (cognitive 26): Cleaner.remove has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (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":"cli/Sources/puremac/Core/Cleaner.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"656b40e06deee937f21bbe89878042c638936cee05fffc2660c8b970f8fdbff5"}},{"ruleId":"D2","level":"warning","message":{"text":"InteractiveReview.render (cognitive 26): InteractiveReview.render has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 8, loops 2, match/switch 1 (2 pts), boolean chains 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":"cli/Sources/puremac/Core/InteractiveReview.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"864db5988aeeb195069fd5cbdaa9ac76cce7c5dde2d22a634d0ece78ac8f9713"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceBackupService.trash (cognitive 25): DeviceBackupService.trash has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (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":"PureMac/Services/DeviceBackupService.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"5245e9cbc0aa039409733a76175c4fbc51b83f42a375c1468527f1ff47314bb0"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.scanNodeCache (cognitive 25): ScanEngine.scanNodeCache has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a9a08a5ff6cc2a2d463fefcbcf1d2a699033423013a90803907efc38b15aef"}},{"ruleId":"D2","level":"warning","message":{"text":"AppleFeaturesView.backupContent (cognitive 24): AppleFeaturesView.backupContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"b189d2c8f047a08f29a344b40e0794c4550550bac28182e499057c1a68ba2756"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationUpdater.upgrade (cognitive 23): ApplicationUpdater.upgrade has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (8 pts), error handling 4 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ApplicationUpdater.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f3ddafd286c5f2e35448247946963aaf5d9899c430cc88a38d3b9b26ee71a54"}},{"ruleId":"D2","level":"warning","message":{"text":"ProtectionAudit.parse (cognitive 23): ProtectionAudit.parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 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":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a2a08cea7454a7aa822c816a35d5b54a4e7439b46034702d7d19dab824efa71"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.scanLargeFiles (cognitive 23): ScanEngine.scanLargeFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 8). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fac6efa0650db7abbd49779e908d0dac14ab8245f71e6d8f8a631d92a93a8c9"}},{"ruleId":"D2","level":"warning","message":{"text":"OrphanListView.removeSelectedOrphans (cognitive 23): OrphanListView.removeSelectedOrphans has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Orphans/OrphanListView.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"50be3359eaf15e5d0ae44b518b0ed91dd5a6bf64697882acb1109c8a572f615d"}},{"ruleId":"D2","level":"warning","message":{"text":"PlainSelectionReview.parseSelection (cognitive 22): PlainSelectionReview.parseSelection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Clean.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c1980ed540eb9886039b5cd7289711f0724ac2c55be55c85fb995b505ac5df7"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.findOrphans (cognitive 20): AppState.findOrphans has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts), boolean chains 1 (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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"e61572866fc7a687560b62bdd7b7428be17b497bf8f4ab8bc9dd84c031badb82"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.cleanAll (cognitive 20): AppState.cleanAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 2). 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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"4619bec0723ae21a90560b51ebcf0d4cb13fe339bc72613229021bc864763a77"}},{"ruleId":"D2","level":"warning","message":{"text":"AppInfoFetcher.fetchInstalledApps (cognitive 20): AppInfoFetcher.fetchInstalledApps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/AppInfoFetcher.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9527ce0de07e46a625abe52bdaea50077ba4116a779d5d93da93f2808e55269c"}},{"ruleId":"D2","level":"warning","message":{"text":"Analyze.browse (cognitive 19): Analyze.browse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Analyze.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"db97bbd6f9837a56a45c22bd4dfa728d455235e0a225005b7eab47b120afdc2e"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationUpdater.parseCaskPresentationDescriptors (cognitive 19): ApplicationUpdater.parseCaskPresentationDescriptors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 3 (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":"PureMac/Services/ApplicationUpdater.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"377dd99e5879e3607d596bdb8ec3d7f6a159bdc5d6d75a6e81c3d5a94703fddd"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessResourceSampler.sample (cognitive 19): ProcessResourceSampler.sample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 5 (8 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProcessResourceMonitor.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ad07f4601612a84cf0629aeea98a8dad83d41c9735f46dfff379be26824da2"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.getLocalSnapshots (cognitive 19): ScanEngine.getLocalSnapshots has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (5 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e1b58b08475c8e35a4d4000a97ab6579b4062a7bdac7c5e0628ba645bfd774"}},{"ruleId":"D2","level":"warning","message":{"text":"DuplicateFinderView.moveSelectedToTrash (cognitive 19): DuplicateFinderView.moveSelectedToTrash has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/DuplicateFinderView.swift"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b43216225e0c74789465e26b582259c01ed4861532302d9dce6f49ea390a421"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceBackupService.walk (cognitive 18): DeviceBackupService.walk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DeviceBackupService.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f2a4a603e6622ce8c1145cd9b9d2e266338ff39a595dcff48739be140a05a6"}},{"ruleId":"D2","level":"warning","message":{"text":"LanguageFilesScanner.inspect (cognitive 18): LanguageFilesScanner.inspect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/LanguageFilesScanner.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9cc68ad3c2ed749693def568ef5fd630fbf23df07d5e0d31ef5a96847eb8e8b"}},{"ruleId":"D2","level":"warning","message":{"text":"Safety.canRemove (cognitive 17): Safety.canRemove has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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":"cli/Sources/puremac/Core/Safety.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ea407432e0f690b79002b39d39b1335f25ce7e69135bccd82a0ab90eaf9f05"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceBackupService.scan (cognitive 17): DeviceBackupService.scan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 5 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DeviceBackupService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9879750f94f660af2457bf578bf27041f323d8b0b0f495a43893040290c4c9eb"}},{"ruleId":"D2","level":"warning","message":{"text":"AppState.cleanCategory (cognitive 17): AppState.cleanCategory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 2). 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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a6065b38f394d52fc3bcc1985568c1fd2ea3a5ae12f9f1894a1231c5c0da770"}},{"ruleId":"D2","level":"warning","message":{"text":"AppPathFinder.applyConditions (cognitive 17): AppPathFinder.applyConditions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed9d783c5271f8d0c1c04440574b4f3f5f1fda47f1fc717c54c7e1c3e27ed29"}},{"ruleId":"D2","level":"warning","message":{"text":"Purge.run (cognitive 16): Purge.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Purge.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ddaeed0b71285fa6742d026e78f335c4e346a7dfcc8d525aefb1a1cf6c7288"}},{"ruleId":"D2","level":"warning","message":{"text":"Term.displayWidth (cognitive 16): Term.displayWidth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Term.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a5455e51f815eb9c2919dfe1c09ef107aa1236aa2665551da4e8e959cd6d33"}},{"ruleId":"D2","level":"warning","message":{"text":"PerformanceInspector.scanStartupItems (cognitive 16): PerformanceInspector.scanStartupItems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/PerformanceInspector.swift"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"46c1611577b8284f62196c98728cdb7977f3ed9bc848960f9c3bb42ef800585e"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanEngine.scanUserCache (cognitive 16): ScanEngine.scanUserCache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddcd2f7dbf545608a800fb026f60469511244979012ea28b86991b196c501e4a"}},{"ruleId":"D2","level":"warning","message":{"text":"UpdateService.check (cognitive 16): UpdateService.check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/UpdateService.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf07809fb531047f0347af3bb6c4786c8d134cd4ffaec8252999cc942243472"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AppState: TooManyMethods \u2014 56 methods. The bar is 30 methods; this is 26 over it, 1.87\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a047c0690adc7bad13b430feedd81971dfffdc752ec73e0fdf8365e37b618d25"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AppState: ClassTooLong \u2014 737 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 337 over it, 1.84\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"55cd1890aed1a3b065b06bbbd4a5ba88dd39194946812a0999d58a1bc9ce912f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/ScanEngine.swift: FileTooLong \u2014 835 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 335 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"813ddbe052df609c4cbce693ff47bd3f01ce437e65653bfda6888a9479e2bff0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ViewModels/AppState.swift: FileTooLong \u2014 761 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AppState (51-1209). The bar is 500 significant lines; this is 261 over it, 1.52\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d6f0aed8af86110369de3a5076d834771d06e7254db8b9db9f815bf915d7d40"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CleaningEngine.cleanItems: MethodTooLong \u2014 cleanItems runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\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":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cfa5de2d53347f261b0e7ad78191ffa39da62ff9f1beff4a80bd37a329af1c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DuplicateFinderView: ClassTooLong \u2014 539 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 139 over it, 1.35\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":"PureMac/Views/Tools/DuplicateFinderView.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f5a7d81adeba9ae5f82d1273e1ef54e86842b8d4e5cb82d7beca59e1d086974"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MainWindow.sidebar: MethodTooLong \u2014 sidebar runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\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":"PureMac/Views/MainWindow.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4762749de82c0ce8bf45e46b5f05a617a9dcb35674319a9d8d651b9e6ae4cbf"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DashboardView: ClassTooLong \u2014 477 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 77 over it, 1.19\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":"PureMac/Views/DashboardView.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba96163ebfb57e5c92fe7e8ef2114ac16295fb107d48ba177351e57f6dbf48e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ScanEngine: TooManyMethods \u2014 35 methods. The bar is 30 methods; this is 5 over it, 1.17\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":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a902a3681cca878590167584865c06c3e7e063592a0e0c8bef4cf7f360833e5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/CleaningEngine.swift: FileTooLong \u2014 560 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 60 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de741e5c92332505a1d647b44fd225887bf795854f8d2c52562e631b8c4ca8b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/DashboardView.swift: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: DashboardView (3-643). The bar is 500 significant lines; this is 57 over it, 1.11\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/DashboardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c7853893be9b57e0b32f62d5d7c9790c694d66bb4136d5b97e1c4bc54d934e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Tools/DuplicateFinderView.swift: FileTooLong \u2014 545 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DuplicateFinderView (4-705). The bar is 500 significant lines; this is 45 over it, 1.09\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/DuplicateFinderView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8dc66cb7ccc86ea7e1d2ed8a767251ac85109080d674975ba3f6f34a2b1509"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/ApplicationUpdater.swift: FileTooLong \u2014 525 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 25 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ApplicationUpdater.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0555fc26c326b8ed2488392096652ebbcecd96b09a7c051fb4cd9a1da16e85e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Tools/AppleFeaturesView.swift: FileTooLong \u2014 505 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: AppleFeaturesView (4-454). The bar is 500 significant lines; this is 5 over it, 1.01\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"27027a8866c85a1468760393efc3d1340ae7452df6ea647e234c9100d08d94c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 27 shared lines): PureMac/ViewModels/AppState.swift:816-869 | PureMac/ViewModels/AppState.swift:944-1014 | PureMac/ViewModels/AppState.swift:1016-1074 \u2014 These 3 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\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 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"216a90bedc5b5c698b183cf848effe7f512f523f0abe1e84ec59ddee62bd4b8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): PureMac/Views/Tools/ProtectionView.swift:78-141 | PureMac/Views/Tools/ProtectionView.swift:175-205 | PureMac/Views/Tools/SimilarPhotosView.swift:221-237 | PureMac/Views/Tools/SimilarPhotosView.swift:299-336 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/ProtectionView.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed231e04cf1612937ecba64543fad493ae63df6e876a7dd2e2bd7cdbb2c28712"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (71 corresponding lines): cli/Sources/puremac/Commands/Clean.swift:42-121 | cli/Sources/puremac/Commands/Purge.swift:45-115 \u2014 These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Clean.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"381ecc41ce9572d8d64f26d09c212b397d9c2ed99ba773c26310158007d59858"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:239-286 | PureMac/Views/Tools/SpaceExplorerView.swift:258-305 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c2bd9d3848aef3f12ef774dfc62cf4681dce251d768b8780c459b35cd30e5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): PureMac/Views/Components/ConfettiView.swift:146-172 | PureMac/Views/Components/ConfettiView.swift:174-198 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Components/ConfettiView.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeeb94f50f10e31ac23d4399d20e42822b5f8d2ac3a075310e99c939f7fd895"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): PureMac/Services/CleaningEngine.swift:754-783 | PureMac/Services/CleaningEngine.swift:790-823 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d5a0f3b1b37b7dc3dc034403a50760772a3e2e33e7aece1e8429f66470b2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:338-369 | PureMac/Views/Tools/SpaceExplorerView.swift:342-376 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ae6b5dee0a2544027e4829854341e5504387d25cd3bc991b72eb7e9ff8bc2a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): PureMac/Views/Components/DashboardCharts.swift:24-48 | PureMac/Views/Components/DashboardCharts.swift:361-388 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Components/DashboardCharts.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a16d05acc97a501b9d3597ec1746256fe64988bf476887108efbecaeaa22b65"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:163-189 | PureMac/Views/Tools/SpaceExplorerView.swift:167-207 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb6d76ec9c44f037cb668d02404e6afd9f4e424072c89394591f455653e3cac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:64-98 | PureMac/Views/Tools/SpaceExplorerView.swift:80-116 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc330884b1155461e632ca6a5794f22f9103d9d81c4a10b159af2621f36f03be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): PureMac/Views/Tools/DuplicateFinderView.swift:215-243 | PureMac/Views/Tools/DuplicateFinderView.swift:245-265 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/DuplicateFinderView.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"035c6e15442d5d781aebec36d4f8beeb021da1092c17bb79995b720f8b19de7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:137-161 | PureMac/Views/Tools/SpaceExplorerView.swift:141-165 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfaf445a3ce9a2b2f3ef00db0db9e0d2128e6f1d1ae31d73642173c0af3c6c79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): PureMac/Services/DuplicateFinder.swift:399-417 | PureMac/Services/DuplicateFinder.swift:419-437 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"270db223370323f5d01df91bf43149c750974f37e657e139097ec2238134e519"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): PureMac/Services/SimilarPhotoFinder.swift:325-341 | PureMac/Services/SimilarPhotoFinder.swift:343-361 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/SimilarPhotoFinder.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"5efca53df40a6d2278b930712165bdc05b8fc2622eaa80724e1fea916e6f14fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): PureMac/Views/Tools/SimilarPhotosView.swift:371-392 | PureMac/Views/Tools/SpaceExplorerView.swift:239-256 | PureMac/Views/Tools/SpaceExplorerView.swift:378-397 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeba46339d48fcb1e522279dab5c88e946ea648dc80dacd097ae918b8853526e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): PureMac/Logic/Scanning/LanguageFilesScanner.swift:104-120 | PureMac/Logic/Scanning/UniversalBinaryScanner.swift:136-154 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/LanguageFilesScanner.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05bc1c78e628edc71634e032cf98c02f8c2316e32d4b433d779929b25c09ddb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): PureMac/Views/Tools/AppUpdatesView.swift:129-143 | PureMac/Views/Tools/AppUpdatesView.swift:336-354 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/AppUpdatesView.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"55250d3403b75db4a3aa3e2d282f995ddcbbe8ee93aa440f84dd5a51842cc91e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): PureMac/Services/ScanEngine.swift:121-141 | PureMac/Services/ScanEngine.swift:291-306 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"580b72448e5b64c773241a29a03c1d6b905b074be658d0201487ff087a38dcab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): PureMac/Services/CleaningEngine.swift:840-849 | PureMac/ViewModels/AppState.swift:521-530 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"393f417e9be589cb8412a35f09a35f31d3350a482890104f1ae0a590f1e3f781"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): PureMac/Views/Tools/DuplicateFinderView.swift:560-575 | PureMac/Views/Tools/SimilarPhotosView.swift:32-46 | PureMac/Views/Tools/SpaceExplorerView.swift:34-49 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/DuplicateFinderView.swift"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11b93a31ca93a26ade82acc60319742d9b1ed9d71eead560aad0d0091e1bfd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): PureMac/Services/DuplicateFinder.swift:451-462 | PureMac/Services/SimilarPhotoFinder.swift:442-452 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"670fa9ad4d9a35ab44d8d4aa0474eb140bcd9742a591844ec457562ebcc4d649"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): PureMac/Services/DuplicateFinder.swift:486-496 | PureMac/Services/SimilarPhotoFinder.swift:476-491 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f8f3c3ce03ae6b87e9f300d1f30e70ac1d0c7816dc324dfdfa696de09a2d6fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): PureMac/Services/ProtectionAudit.swift:267-284 | cli/Sources/puremac/Core/Shell.swift:80-97 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca8210fbd05ac517ce86cef0bc64d017ab78fd6baf75d9f15e66c193f7fe0e43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): PureMac/Logic/Utilities/ProviderPaths.swift:63-81 | cli/Sources/puremac/Core/Safety.swift:48-58 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Utilities/ProviderPaths.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0355b1579ff9c52f36795ac34614cab933e752c03ae3270789a1f50960250730"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): cli/Sources/puremac/Commands/Ignore.swift:14-19 | cli/Sources/puremac/Commands/Ignore.swift:25-30 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Ignore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dbeb91215c767c677cf9068adc975afb2758660c6e9801fc06e0c5c280dce71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): cli/Sources/puremac/Core/Safety.swift:94-106 | cli/Sources/puremac/Core/Safety.swift:108-118 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Safety.swift"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"786cfe6a377960d7d06e6630bcddc596fd23b0315ea07971cadbed1e3c517e7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): cli/Sources/puremac/Core/Term.swift:114-125 | cli/Sources/puremac/Core/Term.swift:127-138 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Term.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6e3684c353183c01ab300ab45fae8d1e7331a835ff304e63eeb4ade08046fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): cli/Sources/puremac/Core/Cleaner.swift:67-76 | cli/Sources/puremac/Core/Safety.swift:37-46 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Cleaner.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"86568c4f4e937ec11a33b5547f2844827ece110d370da172fd8ef42301eb669c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): cli/Sources/puremac/Core/Stores.swift:80-91 | cli/Sources/puremac/Core/Stores.swift:93-104 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Stores.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"647fcb7e4eb6356f0a0127c98f9bd8c5f6f40e1f72854d11f8e97049f4557f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): PureMac/ViewModels/AppState.swift:492-494 | PureMac/Views/Tools/AppUpdatesView.swift:427-429 | PureMac/Views/Tools/SpaceExplorerView.swift:512-514 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e031b93b1271237637de58d3e50c53eecfbd8579f433752a6069f29e133eac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): PureMac/Services/DuplicateFinder.swift:482-484 | PureMac/Services/SimilarPhotoFinder.swift:472-474 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fb9d36fa940ceef4bfa606478332a52d739cf715a8bc6b0c5a40716912793d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): PureMac/Services/ApplicationUpdater.swift:175-178 | PureMac/Views/Tools/PerformanceView.swift:446-449 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ApplicationUpdater.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"78296e40c0966f0291492130a3464a9bc16fba7692b5b0f51ed61c6b0c45b3b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): PureMac/Views/Apps/AppFilesView.swift:369-371 | PureMac/Views/Apps/AppListView.swift:65-67 | PureMac/Views/Components/PermissionSheet.swift:274-276 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Apps/AppFilesView.swift"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7b4881382e3ea073148d4d14febb9da095df0a3cb491e99d264da4f92ed025"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): PureMac/Views/Apps/AppFilesView.swift:373-375 | PureMac/Views/Components/PermissionSheet.swift:278-283 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Apps/AppFilesView.swift"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3c7063db9c55b6c680ed97101ad44172a7121291aa57589f9b7b3f0642c7d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201330 lines \u00D7 2): PureMac/Services/ScanEngine.swift:449-470 | PureMac/Services/ScanEngine.swift:825-854 \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 \u0060PureMac/Services/ScanEngine.swift:449\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":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c7b4a6f2f39abb87b3481601947b0ce7a26629a4f5adc47c3e223aa070876d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 2): PureMac/ViewModels/AppState.swift:957-985 | PureMac/ViewModels/AppState.swift:1021-1047 \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 \u0060PureMac/ViewModels/AppState.swift:957\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"c05998b5014121fabab33b34dbe8a2210378ed7b645314fd85be113fca41e77a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): PureMac/Views/MainWindow.swift:173-197 | PureMac/Views/MainWindow.swift:200-224 \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 \u0060PureMac/Views/MainWindow.swift:173\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":"PureMac/Views/MainWindow.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3d0ac238d59abc0ee1b02cb7966eab7132da2b9694d427337ef01eeeaa06f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 2): PureMac/Views/Tools/SimilarPhotosView.swift:168-189 | PureMac/Views/Tools/SpaceExplorerView.swift:183-207 \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 \u0060PureMac/Views/Tools/SimilarPhotosView.swift:168\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":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"6535ecffbde67bf6c7078af78ad7dfda5dfb9f15106fff9fe2a707895b2f01fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): PureMac/Views/Apps/AppFilesView.swift:452-473 | PureMac/Views/Orphans/OrphanListView.swift:321-342 \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 \u0060PureMac/Views/Apps/AppFilesView.swift:452\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":"PureMac/Views/Apps/AppFilesView.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccdc0aa15d7c38e2cec874ea9060d983fc1da3bcb0f62f5f5733102d8424b7e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): PureMac/Services/CleaningEngine.swift:503-522 | PureMac/Services/ScanEngine.swift:981-1000 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"997e93cb33f2573454cd86fdaf268eebd5e95fd8ed6c12cdf8311efd17edf7c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): PureMac/Views/Tools/AppleFeaturesView.swift:118-135 | PureMac/Views/Tools/ProcessResourcesView.swift:34-49 \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":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"125fa3dfceb39231340b3bf30f55264b4a9bf9ed503ede8ce42dd119f9606175"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): PureMac/Services/ProtectionAudit.swift:270-284 | cli/Sources/puremac/Core/Shell.swift:83-97 \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 \u0060PureMac/Services/ProtectionAudit.swift:270\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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6fbd7f439f317ae240929667414cad64dab886a38ef37574b17514bdb2e237"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): PureMac/ViewModels/AppState.swift:855-869 | PureMac/ViewModels/AppState.swift:1062-1073 \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 \u0060PureMac/ViewModels/AppState.swift:855\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b1dd3f711b886c425cfe00bb0e71faa7bea1ca19afab049e97112cb946b80f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): PureMac/Logic/Scanning/Locations.swift:77-90 | PureMac/Logic/Scanning/Locations.swift:127-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060PureMac/Logic/Scanning/Locations.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":"PureMac/Logic/Scanning/Locations.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeedad483095c45f4d9454c92b0a4b4b4b446b54488f7b904ddf70afea19e9a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): PureMac/Views/Tools/SimilarPhotosView.swift:249-262 | PureMac/Views/Tools/SpaceExplorerView.swift:268-281 \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 \u0060PureMac/Views/Tools/SimilarPhotosView.swift:249\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":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5be812911d54b7aa632d356f1a6ef1b2d5b7d34e3ac1df30fc0786e62227cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): PureMac/Views/Tools/AppleFeaturesView.swift:162-174 | PureMac/Views/Tools/AppleFeaturesView.swift:219-231 \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 \u0060PureMac/Views/Tools/AppleFeaturesView.swift:162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00600\u0060 in one and \u006014\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":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f58dde0172b24ba7dffb3d065ae40dda4fa116419aa17f0bda44e58ff9949d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): PureMac/Views/Tools/PerformanceView.swift:117-127 | PureMac/Views/Tools/SpaceExplorerView.swift:141-153 \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 \u0060PureMac/Views/Tools/PerformanceView.swift:117\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":"PureMac/Views/Tools/PerformanceView.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"18445a8a64e55d7889cb20a5cf7817678e43c2bba26e73efbaa26ddc7e519e16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): PureMac/Views/Tools/SimilarPhotosView.swift:32-44 | PureMac/Views/Tools/SpaceExplorerView.swift:34-46 \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 \u0060PureMac/Views/Tools/SimilarPhotosView.swift:32\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":"PureMac/Views/Tools/SimilarPhotosView.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"edacc8c8ae3ab3af5ada52099e700b904c5054ee4dac4a5429042f76508f976e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cli/Sources/puremac/Core/InteractiveReview.swift:244-255 | cli/Sources/puremac/Core/TerminalMenu.swift:52-63 \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 \u0060cli/Sources/puremac/Core/InteractiveReview.swift:244\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":"cli/Sources/puremac/Core/InteractiveReview.swift"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"c871ab75ffa6ac109a911ac477f6d6b385d17fd9305f3ebbecc2d1c892390e20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): PureMac/Services/CleaningEngine.swift:773-783 | PureMac/Services/CleaningEngine.swift:813-823 \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 \u0060PureMac/Services/CleaningEngine.swift:773\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":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"2955f74ff3268b13d85c27f6e1500e91ebad2dc97447d91abc1ee5292aed1ac7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): PureMac/Services/ScanEngine.swift:1182-1192 | PureMac/Services/ScanEngine.swift:1272-1282 \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 \u0060PureMac/Services/ScanEngine.swift:1182\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":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1bb3618a8bf09d2ad8ee585b6375858daddbe58fc07e4454bed33c6a4726ec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): cli/Sources/puremac/Commands/Clean.swift:109-121 | cli/Sources/puremac/Commands/Purge.swift:104-115 \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 \u0060cli/Sources/puremac/Commands/Clean.swift:109\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060cli/Sources/puremac/Commands/Purge.swift:102\u0060 calls \u0060dim\u0060 and \u0060cli/Sources/puremac/Commands/Clean.swift:107\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":"cli/Sources/puremac/Commands/Clean.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1220f5442ca9e8c283f85f11329c3d15d412ab101c9543c9228c6a17f80e78f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): PureMac/ViewModels/AppState.swift:832-840 | PureMac/ViewModels/AppState.swift:977-985 | PureMac/ViewModels/AppState.swift:1039-1047 \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 \u0060PureMac/ViewModels/AppState.swift:832\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060PureMac/ViewModels/AppState.swift:986\u0060 calls \u0060successWithSound\u0060, \u0060survivingItems\u0060 and \u0060PureMac/ViewModels/AppState.swift:842\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f750c9a846031d2cb1bb0dffb2285cc546469298f084f12ffdc7e6eccdfc757"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): PureMac/ViewModels/AppState.swift:843-852 | PureMac/ViewModels/AppState.swift:991-1000 | PureMac/ViewModels/AppState.swift:1050-1059 \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 \u0060PureMac/ViewModels/AppState.swift:843\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060PureMac/ViewModels/AppState.swift:986\u0060 calls \u0060successWithSound\u0060, \u0060survivingItems\u0060 and \u0060PureMac/ViewModels/AppState.swift:840\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"45831f279789f9f3287f03e8ac0199d7aedc5a348e87c9d4fd2422f04218a927"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20139 lines \u00D7 3): PureMac/Views/Tools/AppUpdatesView.swift:357-360 | PureMac/Views/Tools/SimilarPhotosView.swift:373-381 | PureMac/Views/Tools/SpaceExplorerView.swift:380-388 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060PureMac/Views/Tools/AppUpdatesView.swift:357\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u006013\u0060 in one and \u006012\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":"PureMac/Views/Tools/AppUpdatesView.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c65bdcbc2a1a37b8556d465cc279ad7f4e2b26942e5651d47ec7a0d07aec688"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): PureMac/Views/Tools/ProtectionView.swift:84-91 | PureMac/Views/Tools/ProtectionView.swift:180-187 | PureMac/Views/Tools/SimilarPhotosView.swift:306-313 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00606\u0060 in one and \u00603\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060PureMac/Views/Tools/ProtectionView.swift:92\u0060 calls \u0060Spacer\u0060 and \u0060PureMac/Views/Tools/SimilarPhotosView.swift:314\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":"PureMac/Views/Tools/ProtectionView.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8acc359a699e5f9092b8cb8c19e1315a710e6c089ad10108997243ece67779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): PureMac/Views/Components/ConfettiView.swift:162-172 | PureMac/Views/Components/ConfettiView.swift:188-198 \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 \u0060PureMac/Views/Components/ConfettiView.swift:162\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":"PureMac/Views/Components/ConfettiView.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"af17d7800b52e85497cde271a4b6e24eb000ea1c0e79023fd5dc01829b4d876e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): PureMac/Views/Tools/ProtectionView.swift:84-90 | PureMac/Views/Tools/ProtectionView.swift:180-186 | PureMac/Views/Tools/SimilarPhotosView.swift:223-229 | PureMac/Views/Tools/SimilarPhotosView.swift:306-312 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060PureMac/Views/Tools/ProtectionView.swift:84\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00606\u0060 in one and \u00603\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060PureMac/Views/Tools/ProtectionView.swift:92\u0060 calls \u0060Spacer\u0060 and \u0060PureMac/Views/Tools/SimilarPhotosView.swift:314\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":"PureMac/Views/Tools/ProtectionView.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dc471b9747afcd22435fa7ffbcdfc9be902c63addf1c7fe00b872633bdd559e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 3): PureMac/ViewModels/AppState.swift:823-830 | PureMac/ViewModels/AppState.swift:965-975 | PureMac/ViewModels/AppState.swift:1029-1037 \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 \u0060PureMac/ViewModels/AppState.swift:823\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":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":823}}}],"partialFingerprints":{"codehealthFindingId/v1":"4294d9aee860ac796640603dfd1d5ded729392643047373173d535585cd898cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): PureMac/Views/Tools/AppleFeaturesView.swift:46-52 | PureMac/Views/Tools/AppleFeaturesView.swift:165-171 | PureMac/Views/Tools/AppleFeaturesView.swift:222-228 \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 \u0060PureMac/Views/Tools/AppleFeaturesView.swift:46\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00606\u0060 in one and \u00605\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":"PureMac/Views/Tools/AppleFeaturesView.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbdd5167aca523bd04b35580ad198af6b36977c2abf357a061a06af7dd6b187f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): cli/Sources/puremac/Commands/Analyze.swift:309-317 | cli/Sources/puremac/Core/InteractiveReview.swift:381-389 | cli/Sources/puremac/Core/TerminalMenu.swift:93-101 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cli/Sources/puremac/Commands/Analyze.swift:309\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Commands/Analyze.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f71ed1c83d57b7ec0e7dc4c32a26d1bb0c2743bc34978e4d11931d06c96763"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): PureMac/Services/DuplicateFinder.swift:464-468 | PureMac/Services/SimilarPhotoFinder.swift:454-458 \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":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98c7a25b4b6047577622c5b595b73e67cb2b9b8da47378dc6e761f8d89e81d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): PureMac/Services/DuplicateFinder.swift:470-474 | PureMac/Services/SimilarPhotoFinder.swift:460-464 \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":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3bff3f5ad188fa24341c8dee34da4a49677b7823089832a15fb70576391cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): PureMac/Services/DuplicateFinder.swift:476-480 | PureMac/Services/SimilarPhotoFinder.swift:466-470 \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":"PureMac/Services/DuplicateFinder.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfab7c3367230f7522f6f1208a15d656de7e6b78d3cfa718e45e383fd436a00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): PureMac/Views/Orphans/OrphanListView.swift:149-160 | PureMac/Views/Tools/DuplicateFinderView.swift:524-535 \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":"PureMac/Views/Orphans/OrphanListView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a18bfd923cfcd8f335e4f8132dc8f3c49c8280f2f30e8a271796edcb182cbd"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: FullDiskAccessManager (LCOM4 4): FullDiskAccessManager\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/FullDiskAccessManager.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"9764aef1f844d947df951a73dd320059fd03951a5e409dc09d604141d817958f"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppState (LCOM4 4): AppState\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b916c35420e68aaf1cfd038d5db6e6dbf532b864f1461ea35791dc89e75e8eb"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testUnreadableFolderIsUnavailableNotEmpty: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/AppleStorageServiceTests.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"6209febe4c76cc583908d544e2c1890d8483b86a68108521fba89eb39cf1b6e9"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testXcodeJunkIncludesManagedDerivedDataForEachWorkspace: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9dd04531afb5fad3ad5e41580df2732eb49c7e58d265d21b74e6cd6099b485d"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testXcodeJunkIncludesMobileBuildMCPDerivedDataForEachWorkspace: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ec3810e57331b45b3f2e3e16ee24cb1dc69aa11db88943d5d681cb88c1333f"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testCleaningManagedDerivedDataLeavesWorkspaceStateIntact: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e64c1b925fd475177af540aa36f6114104e7617724c54d0f7fc848b1303410"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testCleaningMobileBuildMCPDerivedDataLeavesWorkspaceStateIntact: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5beaf5413befcb27c554ff8b5969d5d3e122b192e0677995faacfb2876c3f55"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testCleaningSkipsDerivedDataWhenLifecycleLockIsHeld: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"e437aa77b7a1e28b635b527a34b6cc0ae45b9ad7c565bd5fa08c1db7fea4e309"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testCleaningSkipsMobileBuildMCPDerivedDataWhenLifecycleLockIsHeld: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMacTests/XcodeBuildMCPDerivedDataSupportTests.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d229492d45c721e6ddfcde2ba75518215f5ca2871f486d9386126f3394fa94"}},{"ruleId":"D12","level":"warning","message":{"text":"No Package.resolved committed (cli/Package.swift): cli/Package.swift declares 1 dependency and no \u0060.library\u0060 product, so it is an APPLICATION \u2014 but no \u0060Package.resolved\u0060 is committed beside it. Nothing records the versions a working build resolved to, so \u0060swift build\u0060 re-resolves against whatever each dependency\u0027s git host serves today and two builds of this commit are not guaranteed to be the same build. Build once and commit the resulting \u0060Package.resolved\u0060. (A published LIBRARY correctly omits its resolution \u2014 SwiftPM ignores a library\u0027s \u0060Package.resolved\u0060 when the package is consumed \u2014 which is why this is asked only of a package that ships no \u0060.library\u0060 product.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6848f5eb33a4183c0ac25cd742fc40b8fc0be64f0c903ad471c7cc71a5986e02"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: PureMac/Services/CleaningEngine.swift: PureMac/Services/CleaningEngine.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in CleaningEngine.cleanItems at line 37. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 04:45:55 \u002B00:00\u0027 --until=\u00272026-11-14 04:45:55 \u002B00:00\u0027 --full-history --no-merges -- PureMac/Services/CleaningEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36b0927838ff82f3ad3946cb715d0c7fbf2592dfc890409919bf594383723c7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: PureMac/ViewModels/AppState.swift: PureMac/ViewModels/AppState.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AppState.cleanAll at line 944. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 04:45:55 \u002B00:00\u0027 --until=\u00272026-11-14 04:45:55 \u002B00:00\u0027 --full-history --no-merges -- PureMac/ViewModels/AppState.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/ViewModels/AppState.swift"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f65109cb923caae21d2ea770f70af436d3b53d7c03729902726a537ee08361"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: PureMac/Views/Tools/ProcessResourcesView.swift: PureMac/Views/Tools/ProcessResourcesView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ProcessResourcesView.body at line 14. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 04:45:55 \u002B00:00\u0027 --until=\u00272026-11-14 04:45:55 \u002B00:00\u0027 --full-history --no-merges -- PureMac/Views/Tools/ProcessResourcesView.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Tools/ProcessResourcesView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aad956839c1fdaa7e992f5e2df31ad6495878cc7d6ebc17470a5d709b317327"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: PureMac/Services/ProtectionAudit.swift: PureMac/Services/ProtectionAudit.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ProtectionAudit.parse at line 323. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 04:45:55 \u002B00:00\u0027 --until=\u00272026-11-14 04:45:55 \u002B00:00\u0027 --full-history --no-merges -- PureMac/Services/ProtectionAudit.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a156e83fc228b1433dd5ee130b82002f6bcbd81ccf661170514f9c00405f483"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: PureMac/Services/ProcessResourceMonitor.swift: PureMac/Services/ProcessResourceMonitor.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is ProcessResourceSampler.sample at line 134), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(performance): keep known members\u0027 CPU when an app gains a process\u201D; \u201Cfix(performance): keep the last process sample on screen while sampling is paused\u201D; \u201Cfix(performance): tell protected processes apart from churn in the process notes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 04:45:55 \u002B00:00\u0027 --until=\u00272026-11-14 04:45:55 \u002B00:00\u0027 --full-history --no-merges -- PureMac/Services/ProcessResourceMonitor.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProcessResourceMonitor.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c03ae5327f62f537dbffc01543eb0ca8909f6d512a21e153cf685a1ecd74d2e"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: PureMac/Views/Components/ConfettiView.swift, PureMac/Views/Components/AppBundleDragHandle.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fd2f192150c34653dfa287e0513d7de1f6b6e21f39197ee817a6d89141917b4f"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (3 single-owned of 81 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 81 of the 96 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: PureMac/Logic/Utilities/ProviderPaths.swift."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"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. ADRs are expected here because \u0060cli/Package.swift\u0060 makes this repository a deployable product (line 8)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Package.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d213f15ff25b61a0f24233d6fb9d7ebe78d743181dccec1dd5ff8ac913e2aa"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (20166 LoC, 215 module-visible types across 17 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ee6fe4db683eeb90935ad3bd5499654aacf9bc1cb68e47df1458236b0297ab31"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c5019c0e80b0c36835490896bf87a854a11c17f98ef01a5116ef35edfd85637a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"31e15292ee7781495cff3025f3779e23aded0d07be93120b45c65e1d6518c389"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7adc332f2d68b4a8e35c8868ce3df7038dc1a68ece15e2a5c16dee165f7a002c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"80828c073478d05a52dc2a34f5101b8c03fd43d60082a6107c652feb015e62e4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e669551e1f0177df320633323790461e54eac2f44b9adb385d8a8a6a472a10cb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 81 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 81 of the 96 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: PureMac/Logic/Utilities/OrphanSafetyPolicy.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Utilities/OrphanSafetyPolicy.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaa1789945c19a70029bcf01ddc1f91672b65bd41555fd2cf5e94c5a8e177f5a"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3d9450c1e9a738f2d810b3eef41d9babb54722911a7ca830a4cd182d6263d27e"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"ED1","level":"error","message":{"text":"Blocking wait inside a handler: AppPathFinder.processLocation: \u0060AppPathFinder.processLocation\u0060 is an event/message handler that blocks on a synchronous wait (a semaphore/queue \u0060.wait\u0060/\u0060.sync\u0060) \u2014 it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (\u0060async\u0060/\u0060await\u0060) instead of blocking the handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/AppPathFinder.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"a972bf700234c87991026ed661bc254b9f9d2dc94a96675176819d7ce0c4ad3f"}},{"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":"P2","level":"note","message":{"text":"Logging is not universal: Only 1/2 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060cli\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 3 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":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/build.yml"},"region":{"startLine":6}}}],"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"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060pruneDockerSystem\u0060 is async and calls .waitUntilExit() \u2014 a blocking call inside async code stalls the cooperative pool\u0027s thread \u2014 one per core \u2014 and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc92ef94fae85e71452acf7b4a796a7dd52c4a12f58b1350a61723a3eb1525d9"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060purgePurgeableSpace\u0060 is async and calls .waitUntilExit() \u2014 a blocking call inside async code stalls the cooperative pool\u0027s thread \u2014 one per core \u2014 and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/CleaningEngine.swift"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"da74e26560472758b6042ef45f70fc19ee852db11f796276cb98210bf30914df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inaccessibleCount \u003E 0 || skippedCount \u003E 0\u0060 appears character-identically in 2 files \u2014 PureMac/Services/StorageExplorer.swift, cli/Sources/puremac/Commands/Analyze.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/StorageExplorer.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"201147be18f9ac042fbe554628c84a83bb78a9244241ab7d82cba6d062a98fd2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060resolved == root || resolved.hasPrefix(root \u002B \u0022/\u0022)\u0060 appears character-identically in 2 files \u2014 PureMac/Services/ScanEngine.swift, PureMac/ViewModels/AppState.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ScanEngine.swift"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"709958df55e7c44e5d398c233b6849c722449fb6ba47fbb1376b959b54b0fdf8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060values.ubiquitousItemDownloadingStatus != .current \u0026\u0026 values.ubiquitousItemDownloadingStatus != .downloaded\u0060 appears character-identically in 2 files \u2014 PureMac/Services/AppleStorageService.swift, PureMac/Services/DuplicateFinder.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/AppleStorageService.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"79bfc6702ecf9e0b446578e2f008fac9935b856f24cde883a0ef45375e33563d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/Shell.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7d0f5cd337c278b431056401f0b1dc42d4c585c63b4731c24a18b2a3256388"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Views/Orphans/OrphanListView.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2b1bc7ef4d52f859bf2028b747ec3f129469ffa508429e37a31ba5158dcd7b7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/FullDiskAccessManager.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"17044ae17bb4ceead2c947e16c7655b579b57763da5ea0c0fac855ece0c62dda"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/FullDiskAccessManager.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5ee0d45012f0ca0a4ec404f814806eccb8b9191b73f04d64f5b06d2a55d8f1"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProcessResourceMonitor.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"642368edc95005c2324732f91a542d534694dbe5546ebd62f3f58293e3a65416"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/ProtectionAudit.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"1392c6e049288b941ffd124ae734e8cdf655f413d7acb270102cd64a41553c07"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/StorageExplorer.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc262291aaa4f8e64a17e6aa434cf6963fde341d8829a1fe0970f82e54f1dd9b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Services/StorageExplorer.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"7786091d5cb20d4b5be9b1dfb3fc5a6d35fb7227663bafb098c5e400df7d721d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Utilities/SimulatorRuntimeSupport.swift"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5008bd751f28822f5d853430bbe0642d9df6683e7bfbe5b28b5aee6fc9ff48"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Utilities/XcodeBuildMCPDerivedDataSupport.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f77e1a3fa726807a78895b4265f15581087c697b61a3a1b733d5aa5d6d7ae5"}},{"ruleId":"X5","level":"note","message":{"text":"Ruby\u0027s type checker does not check nil everywhere: This repository commits no Sorbet configuration (\u0060sorbet/config\u0060) and no \u0060Steepfile\u0060, so nothing type-checks its 2 Ruby product file(s): a nilable value reaches a method call silently and raises \u0060NoMethodError: undefined method \u2026 for nil\u0060 the first time it is nil. A \u0060# typed:\u0060 sigil does nothing without a \u0060sorbet/config\u0060 beside the code; a Steep run configured only on a command line is not something this check can read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"32b27113b1bc22f400935e8620d19eae7fd3ef145cc36018609c445ea8cd4af1"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060children\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cli/Sources/puremac/Core/CategoryScanner.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62cda1e0cb8e4e79584b85506d33677aac3ce72a81dd831e3a292b85d080033"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060appBundles\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/LanguageFilesScanner.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"aca933914e2d0708f5ac65eacb13f9ba26fa15c4bd0e13eaa1fbffd93459be1c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060listAppSupportDirectories\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/Locations.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb4e0db046982cc59296ef2ef579ec5b03d3c950fe3c6173d5eb353db8c908a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060appBundles\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/UniversalBinaryScanner.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"39cc84403d5b9ddba575e9455a27e7c25abe1d5f5a7e11cb07fb20ea323fcc61"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060fatFrameworkBinaries\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"PureMac/Logic/Scanning/UniversalBinaryScanner.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"2331f8ed77f19e34a6e6ca9420e6edbeff980bf64aad06fa6d905ed0e3c3ed99"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"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":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"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":12,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}