{"$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":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"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":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"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":"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":"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":"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":"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":"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":"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":"Battery.usageCallback (cyclomatic 60): Battery.usageCallback has cyclomatic complexity 60 (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":"Modules/Battery/main.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5ffbf4898f9837bd8105c7133b1a300f9d427fb9598832b4a2e2ec9f7bf40e"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.read (cyclomatic 59): SensorsReader.read has cyclomatic complexity 59 (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":"Modules/Sensors/readers.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c560cd8b1a664ba7005fad0bc0a9179091dea41c5364ea8b74a8f9e3fedd60"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.renderUsage (cyclomatic 57): Popup.renderUsage has cyclomatic complexity 57 (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":"Modules/Net/popup.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1c474e4fc48ca007242a9d628aa1cb7a79353fbc7e78ff87f4250283a6afd6"}},{"ruleId":"D1","level":"warning","message":{"text":"LineChartView.draw (cyclomatic 53): LineChartView.draw has cyclomatic complexity 53 (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":"Kit/plugins/Charts.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea5cdd7bcd60c5e8cc2e13694ed231a416684f0e8da3916538fc94364759a07"}},{"ruleId":"D1","level":"warning","message":{"text":"Network.usageCallback (cyclomatic 51): Network.usageCallback has cyclomatic complexity 51 (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":"Modules/Net/main.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9574e43e38b3dd53c83fc742cd8a73d0e6513fbbf6f79916c7fb78643373817"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getDiskInfo (cyclomatic 45): SystemKit.getDiskInfo has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"33d82d702cd8533428acd1be3c55e570d9c32d64ead54ce5061895630c14d314"}},{"ruleId":"D1","level":"warning","message":{"text":"helpers.swift.isNewestVersion (cyclomatic 38): helpers.swift.isNewestVersion has cyclomatic complexity 38 (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":"Kit/helpers.swift"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c8a5dca5731d016ba8b7f1977a87a3eedeb7a4e29d27bd786e9e269e80f1bf"}},{"ruleId":"D1","level":"warning","message":{"text":"Preview.usageCallback (cyclomatic 36): Preview.usageCallback has cyclomatic complexity 36 (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":"Modules/Net/preview.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"910c843ca9b72c7dce06a607cd448e917a6e583579e5b5ed459bf3e783391cc0"}},{"ruleId":"D1","level":"warning","message":{"text":"RAM.loadCallback (cyclomatic 36): RAM.loadCallback has cyclomatic complexity 36 (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":"Modules/RAM/main.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"48e8d1fd1bd4e07182069958a019a1b4394cbf90f04a8022dbfa62ba02573252"}},{"ruleId":"D1","level":"warning","message":{"text":"widget_t.new (cyclomatic 35): widget_t.new has cyclomatic complexity 35 (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":"Kit/module/widget.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ad70f27280775414fffc208820a103b1242cb3b5d50b113d9e96010e5f9e06"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n.translate (cyclomatic 34): i18n.translate has cyclomatic complexity 34 (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":"Kit/scripts/i18n.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"5074a49eca5ea7b33de5792580dd4b85786351727d006dce47dce1bd765839d7"}},{"ruleId":"D1","level":"warning","message":{"text":"DevicesReader.read (cyclomatic 33): DevicesReader.read has cyclomatic complexity 33 (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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"556d73b3bc48e88ea0d0b26737c28aa2cedc7aea96badd89e82bade8f87461d8"}},{"ruleId":"D1","level":"warning","message":{"text":"SMARTReader.getATASMART (cyclomatic 33): SMARTReader.getATASMART has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body\u0027s own statements and 6 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":"Modules/Disk/readers.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6807e4f5a8cbed28ffa061a7545e7d71ca2e4b0ba04d6cd61512fe926ae4bf"}},{"ruleId":"D1","level":"warning","message":{"text":"InfoReader.read (cyclomatic 32): InfoReader.read has cyclomatic complexity 32 (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":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c48238682aaa68f784fba183bb53eafaf5c3bb6f6f28a2838a66a5a62a2bc18"}},{"ruleId":"D1","level":"warning","message":{"text":"BatteryWidget.draw (cyclomatic 30): BatteryWidget.draw has cyclomatic complexity 30 (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":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c263cc0546a36ac1ea705d0ff8c9437a053ca1befafa7a65026684af249014e"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.read (cyclomatic 29): UsageReader.read has cyclomatic complexity 29 (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":"Modules/Battery/readers.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"94204586c863a489b4e648360b136bb26e8504fed24df2b9294d3e9256ea061c"}},{"ruleId":"D1","level":"warning","message":{"text":"readers.swift.driveDetails (cyclomatic 29): readers.swift.driveDetails has cyclomatic complexity 29 (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":"Modules/Disk/readers.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfc9b19770d218e113644210cc18b1cadd510aad4b4f460a3ddf7fe6ce02fec"}},{"ruleId":"D1","level":"warning","message":{"text":"FrequencyReader.read (cyclomatic 28): FrequencyReader.read 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":"Modules/CPU/readers.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a5a3b8ea8a43e9e2711819b036ff8fd07db031c63d94ce3b7a4695ab387904"}},{"ruleId":"D1","level":"warning","message":{"text":"Notifications.usageCallback (cyclomatic 28): Notifications.usageCallback 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":"Modules/Net/notifications.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"136667f45427964391cb7e5c80d7296bc7b5e316f0bc9dae45fe44386b8d0857"}},{"ruleId":"D1","level":"warning","message":{"text":"main.swift.main (cyclomatic 28): main.swift.main 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":"SMC/main.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"1354b84287d84346ad7f93c61f88015a4af96ce80c1e3b9d23a527f9ab6fb22c"}},{"ruleId":"D1","level":"warning","message":{"text":"SMC.getValue (cyclomatic 27): SMC.getValue has cyclomatic complexity 27 (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":"SMC/smc.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"967e4573a63701a36f48457e0ac1cef620a2bc447b8218bf1f6298ab40ae61bf"}},{"ruleId":"D1","level":"warning","message":{"text":"BarChart.draw (cyclomatic 27): BarChart.draw has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f4107dc5edab904d4101eb937fdc370e3e8feb4edb8bb6756a0c025b986ce9"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.getDetails (cyclomatic 27): UsageReader.getDetails has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea65e76c708992106adf014f7f3c8dd053c6180ba394a74630ec4b40ebfee55e"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getPlatform (cyclomatic 26): SystemKit.getPlatform has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c97d96fc19fe6fcb2290b9b39fcd48d3e30e453352c93556c4a71101cc267f"}},{"ruleId":"D1","level":"warning","message":{"text":"DevicesReader.fetchPmsetAccessoryLevels (cyclomatic 26): DevicesReader.fetchPmsetAccessoryLevels has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/readers.swift"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f75fe7dfe09535fb30e67d544d979547c3de05b3670d42a5ce6a9b24e85fa4"}},{"ruleId":"D1","level":"warning","message":{"text":"Preview.capacityCallback (cyclomatic 26): Preview.capacityCallback has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/preview.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c666a51161dc01f0adedbf5d2d32a098979f715ea240a494baafdaa1fc969b"}},{"ruleId":"D1","level":"warning","message":{"text":"LoadReader.read (cyclomatic 25): LoadReader.read has cyclomatic complexity 25 (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":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d653a3036aa33ef910f732af07e56b437b660f911ae3fcf3b299814a335bc5"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n.scan (cyclomatic 25): i18n.scan has cyclomatic complexity 25 (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":"Kit/scripts/i18n.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e3e1e7f44242866394d54dfbed6867616fb67d254a9920f2fa0fabab59c1f5"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getCPUCores (cyclomatic 24): SystemKit.getCPUCores 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52dd1078a1547c569df83e1c719561641c9673ec85f72d60cb4c2979a1db498"}},{"ruleId":"D1","level":"warning","message":{"text":"Portal.usageCallback (cyclomatic 23): Portal.usageCallback 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":"Modules/Net/portal.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"413d76890a30cc7ac7743556d6e6385e170a03c185cbc8bfa795a3a1423ec6d8"}},{"ruleId":"D1","level":"warning","message":{"text":"CapacityReader.read (cyclomatic 22): CapacityReader.read 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":"Modules/Disk/readers.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"465ae8dc07e0a37b2b9124b0298fcbe9b37aae53a7e2ad157f64cb551c2a9eba"}},{"ruleId":"D1","level":"warning","message":{"text":"GPU.infoCallback (cyclomatic 22): GPU.infoCallback has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/main.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc6cad9dbb0bea9962b2ddd77450c57b8d9717dc5fa5d23d4f3faa53f7101d4"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.initCalculatedSensors (cyclomatic 22): SensorsReader.initCalculatedSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c802c1b49486106dbedcabd85f3869ab4de1f277c91be6213a68b601477da72"}},{"ruleId":"D1","level":"warning","message":{"text":"LineChart.draw (cyclomatic 21): LineChart.draw has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/LineChart.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d062af33814fe8a45e8853a3a9481b00652d5f3bf1a645a42b95f5f1f599acc6"}},{"ruleId":"D1","level":"warning","message":{"text":"CPU.loadCallback (cyclomatic 21): CPU.loadCallback has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f1099b95373f63a80a0b121d86730fedff360a421a3fb26c7a4511251f984b"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.sensors (cyclomatic 21): SensorsReader.sensors has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd53c77f10de5e9a0597e71091acb7d529b9c238bfebd4801e567af90e92658"}},{"ruleId":"D1","level":"warning","message":{"text":"Charts.swift.drawToolTip (cyclomatic 21): Charts.swift.drawToolTip has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dfc93f20da72d56ef1ef683a42cea696a22e6b7d1f0a5f2fc37941975cec2f3"}},{"ruleId":"D1","level":"warning","message":{"text":"NetworkChart.draw (cyclomatic 20): NetworkChart.draw has cyclomatic complexity 20 (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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d0a4a69fe586a403c3473bc0ca871313ded22ce8949bdde1d92003216df4d0"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.renderUsage (cyclomatic 20): Popup.renderUsage 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":"Modules/Battery/popup.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d71387764214e3e63d957842a3df41705ce252cde56e1e50ecd7e34a6fc2b50"}},{"ruleId":"D1","level":"warning","message":{"text":"Disk.capacityCallback (cyclomatic 20): Disk.capacityCallback 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":"Modules/Disk/main.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc3b84c56673b1e3bc43384950df0e4d33d3096c1ac3e4247b443681a0fc8cd"}},{"ruleId":"D1","level":"warning","message":{"text":"ProcessReader.read (cyclomatic 20): ProcessReader.read 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":"Modules/Net/readers.swift"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"c721e30a49ac8a466dc2db2429942a8d5c0669ca4ec55ea4c0066e2de009d5d0"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard.processorValue (cyclomatic 20): Dashboard.processorValue 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":"Stats/Views/Dashboard.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"969721a14f8227c1adfeab31135aec80987b73d299d1cf5d50c4478d16199dbb"}},{"ruleId":"D1","level":"warning","message":{"text":"Sensors.usageCallback (cyclomatic 19): Sensors.usageCallback 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":"Modules/Sensors/main.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43f9d65eb7270084b2a6a029c50f16fb3810a2f808901ce38fa5d57e4467bd7"}},{"ruleId":"D1","level":"warning","message":{"text":"SMJobBlessUtil.setreq (cyclomatic 19): SMJobBlessUtil.setreq has cyclomatic complexity 19 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/SMJobBlessUtil.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5ace4f4a10032aba63ed3c01c0b98255ff6370897fb57d2859a30dcba2f6d3"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSelectorView.mouseDown (cyclomatic 18): WidgetSelectorView.mouseDown 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":"Kit/module/window.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"73fe4860c9549853413d8ef5d9e47b7746fe2eadecaf6595dce21739f29b6f5b"}},{"ruleId":"D1","level":"warning","message":{"text":"BatteryChartView.draw (cyclomatic 18): BatteryChartView.draw 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":"Kit/plugins/Charts.swift"},"region":{"startLine":1447}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66ffee81a38faea58f6b8f2c5cfbae7759cfe6f2af6f38bf4c6f11ede82adbc"}},{"ruleId":"D1","level":"warning","message":{"text":"ActivityReader.read (cyclomatic 18): ActivityReader.read 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":"Modules/Disk/readers.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20da346a05db0e88cc1eb1a580dca431ad7fe66b652a13064dd23df27648c61"}},{"ruleId":"D1","level":"warning","message":{"text":"InfoReader.readANEPower (cyclomatic 18): InfoReader.readANEPower has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/reader.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c99881a4b05bfc7770aafbafee9076b47c4f7cde4fcac345837f87b8df4bdf"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.callback (cyclomatic 18): Popup.callback 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":"Modules/Remote/popup.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa78176f7a5a09592e36fd02c43ff78c99a39feea46be1686bfaf52bed50bf6c"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.setup (cyclomatic 18): Popup.setup 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":"Modules/Sensors/popup.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"56699e3dad5787a99702f6d3d5b070c4e5b8f52d5fe6503c2003d34e53048128"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard.memoryValue (cyclomatic 18): Dashboard.memoryValue 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":"Stats/Views/Dashboard.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea59d15bb309d23f3853e855c425b44a2d2747b5a42e6faa3ab901d551aec47"}},{"ruleId":"D1","level":"warning","message":{"text":"Charts.swift.scaleValue (cyclomatic 18): Charts.swift.scaleValue 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":"Kit/plugins/Charts.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"44715dca8953ea2b60e59f09ab0b0685f8cae48b3299203f13149564172ebe72"}},{"ruleId":"D1","level":"warning","message":{"text":"SMC.setFanMode (cyclomatic 17): SMC.setFanMode 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":"SMC/smc.swift"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5880ab3eda1eaffe300df13acdc48080a639e946be64a8ddead1ad70aa6196c"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.parseArguments (cyclomatic 17): AppDelegate.parseArguments 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":"Stats/helpers.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab28ce7344dca8b0bbcd1e229d804d73b47530de3d128ee09d6cb79d167aea5"}},{"ruleId":"D1","level":"warning","message":{"text":"Provider.getTimeline (cyclomatic 17): Provider.getTimeline has cyclomatic complexity 17 (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":"Widgets/UnitedWidget.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c14a688c3af6a44818e5fca9b356b06b45fe3d48ab92bde95f6ecdef2862a9"}},{"ruleId":"D1","level":"warning","message":{"text":"LineChartView.addValue (cyclomatic 17): LineChartView.addValue 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":"Kit/plugins/Charts.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3bebd55f1657db44f0498eeec1b6e9c453d48c4a73a2441d52f024e62a6444"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemStats.command (cyclomatic 17): SystemStats.command 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f4f1b3423481b44b663dec73613caa66332d5d0e92407810b92aef6d20dc7c"}},{"ruleId":"D1","level":"warning","message":{"text":"RemoteAuth.authorize (cyclomatic 17): RemoteAuth.authorize has cyclomatic complexity 17 (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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0653f76e5f1331c22aca6c4f0e5f170e85ae7562f76c731494a006f2726340"}},{"ruleId":"D1","level":"warning","message":{"text":"RemoteAuth.pollForToken (cyclomatic 17): RemoteAuth.pollForToken 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ac0162938954ef971a3da5f9c4c4cdede7e67576931471e055af455aa62d6e8"}},{"ruleId":"D1","level":"warning","message":{"text":"CalendarView.generateDays (cyclomatic 17): CalendarView.generateDays 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":"Modules/Clock/popup.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de976b0d7c3a97ea1f731d1b2749435b9a3b87130df84ac2ffcfdb96b7cd6d9"}},{"ruleId":"D1","level":"warning","message":{"text":"SMARTReader.read (cyclomatic 17): SMARTReader.read 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":"Modules/Disk/readers.swift"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43e6094cf64bd0d1befc5373ecb0470c1db53d96ab33b9f3ae946ac44678062"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.physicalInterface (cyclomatic 17): UsageReader.physicalInterface has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6053f9fbdb878c83436661c2cccf32e6bcccd90b9f176f16e5f7f03b2e17a08f"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.initHIDSensors (cyclomatic 17): SensorsReader.initHIDSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"b00f8e5ed992a51dfad6b48cdad8e21ff34f1bf20e192e6d56131a8c37883bd6"}},{"ruleId":"D1","level":"warning","message":{"text":"SMC.read (cyclomatic 16): SMC.read 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":"SMC/smc.swift"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"816447ca7a11f5a77449b85f4bd66c7a183d1e171aeee5e3cc1d459f2b41858c"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getIcon (cyclomatic 16): SystemKit.getIcon has cyclomatic complexity 16 (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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52a4f7ba8877c70c44ff89044725149523ce0dce11620c79c3104e77c619a86"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.IOSensors (cyclomatic 16): SensorsReader.IOSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"f225ff21494a370f9f096303e3bcc83674710dbef924e73541126b77ccddc717"}},{"ruleId":"D1","level":"warning","message":{"text":"NSTextView.performKeyEquivalent (cyclomatic 16): NSTextView.performKeyEquivalent 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":"Kit/extensions.swift"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b42dd3d305420d999c170fcf6960847ea6551a688936cd68c5f4cb6219e94b4"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n._extract_translation (cyclomatic 16): i18n._extract_translation 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":"Kit/scripts/i18n.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"5698e3d48723736c97675a7460fe5e94aaae0fc5eafe0450d6c83863fb6e7e7e"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getDiskInfo (cognitive 141): SystemKit.getDiskInfo has cognitive complexity 141 (threshold 15). Drivers by points: if/else 30 (119 pts), boolean chains 11, loops 3 (10 pts), error handling 1 (nesting depth added 96). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"999b1dd85d15d00cacee08b443316196759c558bb312d41471397c11b84e0ae6"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderUsage (cognitive 102): Popup.renderUsage has cognitive complexity 102 (threshold 15). Drivers by points: if/else 42 (81 pts), boolean chains 16, ternaries 2 (5 pts) (nesting depth added 42). 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":"Modules/Net/popup.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"40847991b93e5946cfc3254e6300e9889b303efb8897833b00ed980c6ae338de"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.read (cognitive 97): SensorsReader.read has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (72 pts), boolean chains 21, loops 3 (4 pts) (nesting depth added 39). 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":"Modules/Sensors/readers.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee3934278a3a6f35f4ae612c8e1529507f8aa192bb5319520a91240d1286591a"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChartView.draw (cognitive 91): LineChartView.draw has cognitive complexity 91 (threshold 15). Drivers by points: if/else 23 (43 pts), ternaries 12 (25 pts), loops 8 (13 pts), boolean chains 10 (nesting depth added 38). 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":"Kit/plugins/Charts.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b935fea7326220cd6c79e6c377479f06a5ee3e4fe981e06a489cdc0e765748be"}},{"ruleId":"D2","level":"warning","message":{"text":"Battery.usageCallback (cognitive 87): Battery.usageCallback has cognitive complexity 87 (threshold 15). Drivers by points: if/else 28 (46 pts), match/switch 9 (25 pts), ternaries 5 (15 pts), boolean chains 1 (nesting depth added 44). 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":"Modules/Battery/main.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d219a7769e3145a066d0f0cc7ef7a57467ad92fb18f94c50fdcf2a804ab59c"}},{"ruleId":"D2","level":"warning","message":{"text":"readers.swift.driveDetails (cognitive 84): readers.swift.driveDetails has cognitive complexity 84 (threshold 15). Drivers by points: if/else 24 (80 pts), boolean chains 4 (nesting depth added 56). 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":"Modules/Disk/readers.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d59c0232f1c784a88c9d27696eb2e80ad6f63b0e8029fc3bc4939fbdcd7bf2"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.translate (cognitive 77): i18n.translate has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (56 pts), boolean chains 7, loops 4 (6 pts), ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 40). 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":"Kit/scripts/i18n.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4be8c8be9cfd6d73f681e6a250f5d53bf30a7485c0b733d7e7e0d4396d2f10a"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.usageCallback (cognitive 76): Preview.usageCallback has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (63 pts), boolean chains 13 (nesting depth added 29). 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":"Modules/Net/preview.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bb62fd4fc3ba52dc973aee98c9a9c708ed6995ebf5e3c7ef1e5a4bc6b1aecf2"}},{"ruleId":"D2","level":"warning","message":{"text":"CapacityReader.read (cognitive 75): CapacityReader.read has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (70 pts), boolean chains 4, loops 1 (nesting depth added 53). 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":"Modules/Disk/readers.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d563a8aec3f3b5167370dd2fcc68bbaafb0ab1369e344b03f13ac0e7b0894c7"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.capacityCallback (cognitive 68): Preview.capacityCallback has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (47 pts), ternaries 6 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 42). 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":"Modules/Disk/preview.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ba90af71f17a937a92275eba78c326cdde5a0da4ebb9934d59eb9342e60f36"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoReader.read (cognitive 59): InfoReader.read has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (50 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 27). 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":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a531ecbb4140ab6cf74e2d1caecae49ce9dc1f9ef3d056431a4d9084f75e89"}},{"ruleId":"D2","level":"warning","message":{"text":"Network.usageCallback (cognitive 55): Network.usageCallback has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 8 (21 pts), if/else 14 (18 pts), ternaries 4 (14 pts), boolean chains 2 (nesting depth added 27). 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":"Modules/Net/main.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffda922537a15bf06741e30a52e8a33764afc9cb5e189c9931e1d20d18c6c743"}},{"ruleId":"D2","level":"warning","message":{"text":"Notifications.usageCallback (cognitive 55): Notifications.usageCallback has cognitive complexity 55 (threshold 15). Drivers by points: if/else 26 (53 pts), boolean chains 2 (nesting depth added 27). 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":"Modules/Net/notifications.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e0de755582fa16b18962bb8093810c68c71a4e9bd314ed843d6f1ea38803ff"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.scan (cognitive 54): i18n.scan has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 8 (19 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 29). 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":"Kit/scripts/i18n.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"66039eea09005c9baf9e4fdddfddd2618c98f6cf36be1980e1bf259741f87d62"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getCPUCores (cognitive 53): SystemKit.getCPUCores has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (33 pts), match/switch 2 (12 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 29). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"19614ee730c3167ea47b6595352c66fd8b338b72641cb9576f1d9fdb180fe341"}},{"ruleId":"D2","level":"warning","message":{"text":"helpers.swift.isNewestVersion (cognitive 51): helpers.swift.isNewestVersion has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 17, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/helpers.swift"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87f0b09c9ce15b224589bbb020267fbc570ca57a3412cf57faa1afea918712a"}},{"ruleId":"D2","level":"warning","message":{"text":"LoadReader.read (cognitive 48): LoadReader.read has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 2 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 22). 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":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"df302ce1247103669946572e8f18098a90dcd47bf5e8e4c5a4a03a8fd95052e9"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.fetchPmsetAccessoryLevels (cognitive 46): DevicesReader.fetchPmsetAccessoryLevels has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 4 (12 pts), loops 5 (7 pts), boolean chains 6 (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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"214e57bca0736b0fd630b3dd6f953558581c0cd32a9da35527da71f7efd4d871"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getRamInfo (cognitive 45): SystemKit.getRamInfo has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (37 pts), loops 1 (5 pts), boolean chains 2, error handling 1 (nesting depth added 32). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"6880cc6d94c9cf24cf290ad53147fdb39c4b16e2d3cf75e94d3070ef2adcc735"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.fetchProfilerDevices (cognitive 45): DevicesReader.fetchProfilerDevices has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 4 (18 pts), boolean chains 2, error handling 1 (nesting depth added 31). 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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"049df17581c2ac226984dfc67a881a66e653b8b91ac226e685a7d0caffd1ee52"}},{"ruleId":"D2","level":"warning","message":{"text":"SMARTReader.getATASMART (cognitive 45): SMARTReader.getATASMART has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 5 (7 pts), boolean chains 5, ternaries 1 (nesting depth added 13). Of this number, 36 points are the body\u0027s own statements and 9 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":"Modules/Disk/readers.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fc247e9eec92263119750fd71f34ed75aef0eab2c38fed0079b94783e084e0"}},{"ruleId":"D2","level":"warning","message":{"text":"BarChart.draw (cognitive 44): BarChart.draw has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 5 (17 pts), if/else 10 (16 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d395eedab5fa275c80591f533db13e0491af0c2ba119a16185ac0eb976cfdb"}},{"ruleId":"D2","level":"warning","message":{"text":"BatteryWidget.draw (cognitive 44): BatteryWidget.draw has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 6 (12 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb5506d0cccf00962cf9a85403edef5877d3912a09c978f5633166f5ededd71"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getPlatform (cognitive 44): SystemKit.getPlatform has cognitive complexity 44 (threshold 15). Drivers by points: if/else 31 (44 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb80615e613b8f310fddaa1a4882ef635438c18d00264ffebdba84a19b0e6d29"}},{"ruleId":"D2","level":"warning","message":{"text":"FrequencyReader.read (cognitive 44): FrequencyReader.read has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 8, ternaries 5 (7 pts), loops 2 (3 pts) (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":"Modules/CPU/readers.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b572f9b1c7c200c77df46454d2795a2a6175095af7c74f36f6ea24f76c54bd5"}},{"ruleId":"D2","level":"warning","message":{"text":"CPU.loadCallback (cognitive 43): CPU.loadCallback has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 3 (14 pts), loops 1 (4 pts), boolean chains 1, match/switch 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":"Modules/CPU/main.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"de561a08a5b02d0655fa0194a492f2c09ca54b57763d0f1baf25758040301313"}},{"ruleId":"D2","level":"warning","message":{"text":"SMARTReader.read (cognitive 41): SMARTReader.read has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (36 pts), boolean chains 4, loops 1 (nesting depth added 24). 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":"Modules/Disk/readers.swift"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"134a07cf78df8cc0853b20272e8423f979fbb42012737d2fc5bd24b1c0ed61f4"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.read (cognitive 40): DevicesReader.read has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 9, ternaries 2, loops 1 (nesting depth added 7). 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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d812969e66edaa32f96e35d2cb691fa2bc1bfb4767da619c525825ddcf8b73"}},{"ruleId":"D2","level":"warning","message":{"text":"ActivityReader.read (cognitive 36): ActivityReader.read has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (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":"Modules/Disk/readers.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"5609c937a351dac6429c2639b9047031ce0780ed38c53cb56aa9ea7d89893cc2"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getDetails (cognitive 36): UsageReader.getDetails has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 10, loops 2 (3 pts), match/switch 1 (3 pts) (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":"Modules/Net/readers.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c576f9affdcb9a1b1c3201150bd15cda7ce897349db46f752dc6f580e621bb1"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderUsage (cognitive 35): Popup.renderUsage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 4 (9 pts), boolean chains 4 (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":"Modules/Battery/popup.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2247008017d3a27e6326ef216b34674e8974f14b35c2505b22ce3e99f68c49"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.memoryValue (cognitive 35): Dashboard.memoryValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Dashboard.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b069a2edf51e7cf2dc398bb393a3634051ac5060555514d330e0ee7d355e9b"}},{"ruleId":"D2","level":"warning","message":{"text":"NSTextView.performKeyEquivalent (cognitive 35): NSTextView.performKeyEquivalent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 1 (3 pts) (nesting depth added 23). 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":"Kit/extensions.swift"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"6616619f0900805717555ae6dec3f8917a1a5ea7a179644950b427121f94e8c1"}},{"ruleId":"D2","level":"warning","message":{"text":"main.swift.main (cognitive 35): main.swift.main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 9, loops 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/main.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"355e1ddfdbd5f4b22922ec6690e23c87c01b78f1dc54610f702cae2236f47a43"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getDisplayInfo (cognitive 34): SystemKit.getDisplayInfo has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 7 (14 pts), boolean chains 1, loops 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8a2bcf5ed84279c7285921d39fa857ab9c005792f1cf262577d0e4e16f628d"}},{"ruleId":"D2","level":"warning","message":{"text":"Portal.usageCallback (cognitive 32): Portal.usageCallback has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 10 (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":"Modules/Net/portal.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f645a14de864c10f8989e7e1dfcda3e646ed68d69a2e2c4bd4f3d4795d51e8"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.processorValue (cognitive 32): Dashboard.processorValue has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5 (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":"Stats/Views/Dashboard.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d559e0fe2ac523d9ddbceae6ad19460df234f5a63e80d0fbd3253089aae1ced"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChart.draw (cognitive 31): LineChart.draw has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d70394082d6a8356357c8c1f85f607357a081b047fb853835b192bd972e5d34"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getFrequencies (cognitive 31): SystemKit.getFrequencies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), boolean chains 2, ternaries 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d695aaa1b0800237985e6f7bd8e3adf166e96c11e85a11935b6b92a44245cef"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.read (cognitive 31): UsageReader.read has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 12, ternaries 2 (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":"Modules/Battery/readers.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"9262a137021202839b6a480f3f0797d9a7bab0f8bdbab8d1e92b530016a1fd93"}},{"ruleId":"D2","level":"warning","message":{"text":"SMC.setFanMode (cognitive 30): SMC.setFanMode has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 1 (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":"SMC/smc.swift"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"9225d475d4055a7c0c02b56e25eb0e0bcc861c7d5ccca8dd743e763c7f4135b7"}},{"ruleId":"D2","level":"warning","message":{"text":"Portal.callback (cognitive 29): Portal.callback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (8 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/portal.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"898485728d3b5b420b0ec7ab667d2b46ba1131345087169e16b74dcfaf3fcdbe"}},{"ruleId":"D2","level":"warning","message":{"text":"Disk.capacityCallback (cognitive 29): Disk.capacityCallback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 4 (10 pts), ternaries 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/main.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8d85ce4797b960e036c48359886d1037176e49cf944cd1083845285ea25678"}},{"ruleId":"D2","level":"warning","message":{"text":"RAM.loadCallback (cognitive 29): RAM.loadCallback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 5 (12 pts), ternaries 2 (4 pts), boolean chains 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":"Modules/RAM/main.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e677fa5745b1b4dd35eb19edae22c0ce2865b3a2923a01df360b31bb5d87b06"}},{"ruleId":"D2","level":"warning","message":{"text":"BarChart.init (cognitive 28): BarChart.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 1 (nesting depth added 14). 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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a5d97342319e586ce5aa8a803eb4b26b95f9b222e2c940d9fe79ae7e939804"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessReader.read (cognitive 28): ProcessReader.read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"371a27de4790c0c7c831558db9b14353dc193c0d51187f7fa5abd390bb72e83f"}},{"ruleId":"D2","level":"warning","message":{"text":"Sensors.usageCallback (cognitive 28): Sensors.usageCallback has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, match/switch 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":"Modules/Sensors/main.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e7cd0f77562b2789e456696e9e6edf3ddd17f290e6aa51840346ca8ca24127"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.initHIDSensors (cognitive 28): SensorsReader.initHIDSensors has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (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":"Modules/Sensors/readers.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"719e33c5b8fef1386d3b3a129ac1e0faab2bcca1e8af28f6008a37f466a30989"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.parseArguments (cognitive 27): AppDelegate.parseArguments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6 (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":"Stats/helpers.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad15d586e58fd50409fb237ec3ac1c7a6bc988a32f7db48ee5feb01c7576990"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemStats.command (cognitive 27): SystemStats.command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemStats.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"9febb3ca3f4f4f2aae674941daf8e598bc7a0f41e0791301974497d1ac57ef7b"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSelectorView.mouseDown (cognitive 26): WidgetSelectorView.mouseDown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, loops 1 (3 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":"Kit/module/window.swift"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6f74b56bee6900ee172aa06cdfa4b05f204c7da26aafbe06b26ad48364bb1e"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteAuth.pollForToken (cognitive 26): RemoteAuth.pollForToken has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (23 pts), error handling 1 (2 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9f97f8daaee3bb63c8bb13bc5c93f91fac83a7a9b472458a6aa969144b47d4"}},{"ruleId":"D2","level":"warning","message":{"text":"SMJobBlessUtil.setreq (cognitive 26): SMJobBlessUtil.setreq has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 4 (nesting depth added 8). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/SMJobBlessUtil.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"c56b75d0fca76d3ffed9aa9e6178f8f044b278e8c250bbd60bb5d59e08815001"}},{"ruleId":"D2","level":"warning","message":{"text":"widget_t.new (cognitive 25): widget_t.new has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/widget.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d13ad257bac88b9f30becba209561f4a19df5de8ab266a687a9bf6409991756"}},{"ruleId":"D2","level":"warning","message":{"text":"BatteryChartView.draw (cognitive 25): BatteryChartView.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), boolean chains 5, loops 5 (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":"Kit/plugins/Charts.swift"},"region":{"startLine":1447}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b0ea033537d45e94504f2d3de31329d951784d378f81b306e249a0880bd10e"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.setup (cognitive 25): Popup.setup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2, ternaries 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":"Modules/Sensors/popup.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44ffc1f59077a9a96d7c287314e7cbda9af1a6b923d7a69734c7764274fdf6b"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.check (cognitive 25): i18n.check has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc5d9cb4c8a40a506b7f9d1d810425b3c950e643b401bb681e639d654e763e1"}},{"ruleId":"D2","level":"warning","message":{"text":"ModuleSelectorView.mouseDown (cognitive 24): ModuleSelectorView.mouseDown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (3 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":"Stats/Views/AppSettings.swift"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff68d8d9de3af967cda6da876d5043990075a29806339ad90c6a11746f526d7"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.displaysValue (cognitive 24): Dashboard.displaysValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (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":"Stats/Views/Dashboard.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2cecec2a3eea9e0245a478436653f4a5f96b991dacf5e2be9aa5e78760a74f"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeedWidget.init (cognitive 23): SpeedWidget.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Speed.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f6875309517dab9f0580b458c351e484c752044e2363199ab04d365ac90de3"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.callback (cognitive 23): Popup.callback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/popup.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1cfb31f3855604f13db647338fc3c08e91f782fa020c2b7df9c249f43e302c"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.sensors (cognitive 23): SensorsReader.sensors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, loops 2, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42276eb4f93ddd3c76311628c3268c7dba7343e5e1c011cb2a7fa5917225175"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.initCalculatedSensors (cognitive 23): SensorsReader.initCalculatedSensors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b171103c5823a318cb03bdd69df10c4f2509a9c9961cf24a7008e65d333cde8"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChart.init (cognitive 22): LineChart.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/LineChart.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf400d60c5972c798b913f83426534a3d8a07d6a74751b36408d5d7d38676a74"}},{"ruleId":"D2","level":"warning","message":{"text":"Mini.init (cognitive 22): Mini.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (22 pts) (nesting depth added 12). 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":"Kit/Widgets/Mini.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a578bbe4b9aa52bb02d061600970a8cfb8b9a38a75eb5f8082c45b42c4b6d65"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkChart.draw (cognitive 22): NetworkChart.draw has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 8, loops 2 (3 pts), boolean chains 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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8472bcca4c95fdd65a9efa1abfbf5e323172a66a9c116e90005506f0218735d"}},{"ruleId":"D2","level":"warning","message":{"text":"module_c.init (cognitive 22): module_c.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 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":"Kit/module/module.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f396e156f3e3a71d4c467407ed7637c847ba6f9faddd43cf566fd911cfde9325"}},{"ruleId":"D2","level":"warning","message":{"text":"FanView.update (cognitive 22): FanView.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). 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":"Modules/Sensors/popup.swift"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b585aa9349b7dfaf2f894ec434b0e31a4e0ed12b5da33bac3847c6d2ee9bb8"}},{"ruleId":"D2","level":"warning","message":{"text":"Charts.swift.scaleValue (cognitive 22): Charts.swift.scaleValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, match/switch 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":"Kit/plugins/Charts.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d291911a1925bb15eb05d6851e152dcb713012614b7211f3f41b1b02b3649c87"}},{"ruleId":"D2","level":"warning","message":{"text":"StackWidget.draw (cognitive 21): StackWidget.draw has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Stack.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a08abc282ab643eb593e392f2b3bef9f82c59be077b1346e57139a63507c90e"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.listenForModuleToggle (cognitive 21): Module.listenForModuleToggle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). 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":"Kit/module/module.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"f427f2d4d37c091917dfed06c4b85b57196ad192b054ce8e6ed0c8a29747c00d"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.smartCallback (cognitive 21): Preview.smartCallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (9 pts), boolean chains 2 (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":"Modules/Disk/preview.swift"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ee0611b4656cbd2c7b848366ca78fb6657cd43c8fa6a5a11c4364498ece48c"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.physicalInterface (cognitive 21): UsageReader.physicalInterface has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (9 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"42af532a8357cc2eb8becfe40910621cec7fb9870801a691d3e404bb06b66872"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessView.init (cognitive 20): ProcessView.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 7 (9 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/process.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"411c206e2a2b466cd83a51545c4142888ac993b9a3dc89507100ebfd7f0dcc06"}},{"ruleId":"D2","level":"warning","message":{"text":"SMC.read (cognitive 20): SMC.read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/smc.swift"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe4c1f9fec91f2e901e989844a2c483df6a48ac4d19acf4120140470d144519"}},{"ruleId":"D2","level":"warning","message":{"text":"DB.persistHistory (cognitive 20): DB.persistHistory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (6 pts), boolean chains 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":"Kit/plugins/DB.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"b78768c9584c2aaed97ff504268c63ff71c840c867c5bcd0c3c70eb01c31430f"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getWiFiDetails (cognitive 20): UsageReader.getWiFiDetails has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1 (nesting depth added 10). 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":"Modules/Net/readers.swift"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3417b2c5e1dd1261d76f001240085fcdd22788a6f21684814cbb3095fae268"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.graphicsValue (cognitive 20): Dashboard.graphicsValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (4 pts), boolean chains 1, 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":"Stats/Views/Dashboard.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd063988dd26f6bf55360b335ca8730a798d2fb953bd7c4223b6c2b83918a5c"}},{"ruleId":"D2","level":"warning","message":{"text":"Charts.swift.drawToolTip (cognitive 20): Charts.swift.drawToolTip has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 14, boolean chains 3, if/else 3. 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":"Kit/plugins/Charts.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35154ff43e4cc20fcb733411f7ba41a926b42b300281cef4f45c5b98d6e8a46"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n._extract_translation (cognitive 20): i18n._extract_translation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (3 pts), error handling 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":"Kit/scripts/i18n.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"a178c90d9dadd429fdbd8918e1d0aa7ddbddd921b1c9369743f460bd5aa2fb16"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.dictionary (cognitive 20): i18n.dictionary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee972f599188cdf9928e83c88c3ab02305f914d236c589995a2d5301cf87b368"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChartView.addValue (cognitive 19): LineChartView.addValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, loops 1 (3 pts), ternaries 3 (nesting depth added 3). 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":"Kit/plugins/Charts.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f731abc810d4098878d14ba8b86291de8660ae3be69f6467f1a26c75780c43"}},{"ruleId":"D2","level":"warning","message":{"text":"DB.historyValues (cognitive 19): DB.historyValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 2 (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":"Kit/plugins/DB.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"30481486f7e764162279ab36f82803045137cca16c4f6a02a13bb1071045a70c"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderLoad (cognitive 19): Popup.renderLoad has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 5, boolean chains 4, loops 2 (4 pts) (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":"Modules/CPU/popup.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"194eebaf4ed1ff2ae76147aaf8bc276a927b3f9c636d5397d70cfcd0b7e683c3"}},{"ruleId":"D2","level":"warning","message":{"text":"CalendarView.generateDays (cognitive 19): CalendarView.generateDays has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 4 (6 pts), ternaries 4, boolean chains 3 (nesting depth added 3). 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":"Modules/Clock/popup.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"73ebf18f04bf588e405d2075983a4eeeee361dced8f26c7400afe941511642e5"}},{"ruleId":"D2","level":"warning","message":{"text":"GPU.infoCallback (cognitive 19): GPU.infoCallback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 2 (5 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/main.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0849bdaaadbc9f975eac8cee24e51eb111550519c56022c095b1ba12284de08"}},{"ruleId":"D2","level":"warning","message":{"text":"readers.swift.getDeviceIOParent (cognitive 19): readers.swift.getDeviceIOParent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"6692347120b1affa07b5ae23d27536bb57fd55d34161f32dd4c7afd8d39c99d6"}},{"ruleId":"D2","level":"warning","message":{"text":"SMCHelper.install (cognitive 18): SMCHelper.install has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), match/switch 1 (2 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":"Kit/helpers.swift"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe3cf132701009a1ceca204c5e54a2989b93d35973e26e15690e78b7fb6d328"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessView.valuesViews (cognitive 18): ProcessView.valuesViews has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 2, 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":"Kit/process.swift"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9450388e7790bb60e774ef866da4fc43d5d2e389fab7d05ccacd15f1fdf80d0"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.listenForPopupToggle (cognitive 18): Module.listenForPopupToggle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6 (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":"Kit/module/module.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b54566ed4ef5c3ebab5ba9de39b8d89017dc9c1c2bf226001c64658d729c764"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.cacheDevices (cognitive 18): DevicesReader.cacheDevices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, match/switch 1 (3 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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cad73b0b3b1ce1ca3dcf3c5fbe8b2ec91cc1e836ea8747f3fcfad447663ce59"}},{"ruleId":"D2","level":"warning","message":{"text":"CapacityReader.diskSpaceInBytes (cognitive 18): CapacityReader.diskSpaceInBytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, error handling 2 (nesting depth added 7). 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":"Modules/Disk/readers.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bddd3ed40b181a720737b2d372d251b0a019ee016fc029f4618d0f40e313b4f"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryWidget.init (cognitive 17): MemoryWidget.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (17 pts) (nesting depth added 10). 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":"Kit/Widgets/Memory.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbd77a3bf54b20f756bd1a974c88585dfb547e4606cd7f32598fed3eddf6e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getGPUInfo (cognitive 17): SystemKit.getGPUInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts), error handling 1 (nesting depth added 10). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"5329ce74e1f241ac4b2b86ce3657e9f3af551f0741bb654c2748be1765708499"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteAuth.authorize (cognitive 17): RemoteAuth.authorize has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 8. 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c294d94bc3e580840d3c9b3be9a29e06bcaa88b4a0af37270b212653f9fb084"}},{"ruleId":"D2","level":"warning","message":{"text":"Notifications.callback (cognitive 17): Notifications.callback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 3 (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":"Modules/Bluetooth/notifications.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cb69bb1a90868709b96d65b10bc8dd843b45752116030cf0590871d392f8f8"}},{"ruleId":"D2","level":"warning","message":{"text":"Notifications.init (cognitive 17): Notifications.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 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":"Modules/CPU/notifications.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a44ec44d8b10179b721b0fa7a8ea2abb5b29c15b44eb995c07dd359687ccf7"}},{"ruleId":"D2","level":"warning","message":{"text":"TemperatureReader.read (cognitive 17): TemperatureReader.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (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":"Modules/CPU/readers.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b195346a2a89e8568cc044810d001d786241ff96bfcd3b3473a79315f17d3fa"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoReader.readANEPower (cognitive 17): InfoReader.readANEPower has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 2). 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":"Modules/GPU/reader.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"da472789f6c0d8f5a97a5d45058169ef8ed14290b60f2ff1cb77afc7e4b4fa82"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getPublicIP (cognitive 17): UsageReader.getPublicIP has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6 (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":"Modules/Net/readers.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"267722e1499a1744faebb646332054678bcf518b81602c18bce9ff9a3743174b"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.IOSensors (cognitive 17): SensorsReader.IOSensors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef347e61102187182ff5182c2a504bb79477c8d2e70a8b96fe3072b257a7a17"}},{"ruleId":"D2","level":"warning","message":{"text":"SMC.getValue (cognitive 16): SMC.getValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/smc.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b6171af08205ffcf0fe5e130c348a5877d58dc78683750bcce0ef97f69a79d"}},{"ruleId":"D2","level":"warning","message":{"text":"SMC.setFanSpeed (cognitive 16): SMC.setFanSpeed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (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":"SMC/smc.swift"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d8bddfdce2d7be838a35ce655e8e0b4d225695765794590cf536fd0d3166d2"}},{"ruleId":"D2","level":"warning","message":{"text":"Provider.getTimeline (cognitive 16): Provider.getTimeline has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. 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":"Widgets/UnitedWidget.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f579bc067b9fe9fa62afdb4817c3b39d2f8f1d5d8b0f6713f344a4938cf186bb"}},{"ruleId":"D2","level":"warning","message":{"text":"GaugeChartView.draw (cognitive 16): GaugeChartView.draw has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 4 (5 pts), boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":1159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06c7237babd2249000d4ff9ac91284884f1279b8e79964aba0b4e70d4a5f248"}},{"ruleId":"D2","level":"warning","message":{"text":"Updater.install (cognitive 16): Updater.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (4 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Updater.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d698c16e0b1a8784e3abe37209006f46f7d3118607315b9eeab5bd2c710102"}},{"ruleId":"D2","level":"warning","message":{"text":"BatteryView.draw (cognitive 16): BatteryView.draw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (2 pts), 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":"Modules/Battery/popup.swift"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f73573c98116053d01a0fcb3351694cbf9d485aaac9e3524230af8f74ca9bf"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.loadCallback (cognitive 16): Preview.loadCallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/preview.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"9634818e15d5cdbe961c8bef3287fb052854c1ea1440eb2130ad781e7c18b222"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.toggleInterfaceDetails (cognitive 16): Popup.toggleInterfaceDetails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6 (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":"Modules/Net/popup.swift"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"5884a7491ffb2a99ec07eeef257d9e990c387b744ef67647f0d229e94d125562"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkWidget.body (cognitive 16): NetworkWidget.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/widget.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d2de216e3f089ea11a685ea1d60b082a2d499218f3c9d827ceeedf3c0f6e339"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessReader.read (cognitive 16): ProcessReader.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2, boolean chains 1, error handling 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":"Modules/RAM/readers.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3bae5e97cccbf59eae7a8fefbd710dd8a85e306993a301c099eec5f2823995"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteMachineStream.openConnection (cognitive 16): RemoteMachineStream.openConnection has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), error handling 1 (nesting depth added 3). 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":"Modules/Remote/main.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b98f5ea4400651f710bb25750cc45899087872d65e1f369560f2715aa72820e"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteList.update (cognitive 16): RemoteList.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/settings.swift"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a1fd21fc582dcaaa676e5d8d463f577210e4336ab03cc7015e82cb26c94bd7"}},{"ruleId":"D2","level":"warning","message":{"text":"FanView.setupControls (cognitive 16): FanView.setupControls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (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":"Modules/Sensors/popup.swift"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0c1d409b27e22ae2cadd208b6e3d598b429890a96bfa6466c8a36177272af4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Kit/helpers.swift: FileTooLong \u2014 1679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1179 over it, 3.36\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":"Kit/helpers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd235e868d0267dc23007a893290dd993468ada08a2d2d070787d13d08566bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/Charts.swift: FileTooLong \u2014 1188 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 688 over it, 2.38\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":"Kit/plugins/Charts.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"669a9ad3743d70a362ec37e4483d15b0bbd748d497acad9825738320910fd232"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/SystemStats.swift: FileTooLong \u2014 1071 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 571 over it, 2.14\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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cfdf1a2ff64317adb469ab3d651b5efc4bd4a9f6ad5d7988a066cd4bed31151"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LineChartView.draw: MethodTooLong \u2014 draw runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93\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":"Kit/plugins/Charts.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"78776b7ece548e92eccfb7ba5cbb72cf056852da12fd541b0f40a1ce8d68df3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Net/readers.swift: FileTooLong \u2014 880 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 380 over it, 1.76\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":"Modules/Net/readers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd71ef6787178369af132a3199736e4112c5f4307cc5b4b50d6290840bccc74a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Sensors/popup.swift: FileTooLong \u2014 869 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 369 over it, 1.74\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":"Modules/Sensors/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a94681e7c110a37f013ad4f245336d7154e9532801b2509bfa0ff8a89785bd"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Popup: ClassTooLong \u2014 665 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 265 over it, 1.66\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":"Modules/Net/popup.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"4329f2c5f5324597b251989d16b5f7fcf6061ba8440f88830c8a1e4994f1701a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BatteryWidget.draw: MethodTooLong \u2014 draw runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8000f6115e4261d61de3e0d6efeef1a93683cd7fcaade93cfb62e193b301f6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/SystemKit.swift: FileTooLong \u2014 740 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: SystemKit (236-923). The bar is 500 significant lines; this is 240 over it, 1.48\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48dc6cea3d4e6a40e4b1bbe5ec9c5e1cae8ef8d9d1deb4f55d3fedd020d0f0d1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Clock/popup.swift: FileTooLong \u2014 698 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 198 over it, 1.40\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":"Modules/Clock/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8871b778445b5a6489f5b02cc4c824e56b2631ac3faf28a971a246ac2bc5d6a9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Popup.renderUsage: MethodTooLong \u2014 renderUsage runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb2845c4a0df992103a259f12e356f0d01b948bf8c6ac9f70025e85f48678f4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Net/popup.swift: FileTooLong \u2014 667 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Popup (16-956). The bar is 500 significant lines; this is 167 over it, 1.33\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":"Modules/Net/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de664dd3186696c9e4eac490ad7f9f0b91cab2bafee1e798351c80de6347bc3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Kit/extensions.swift: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 144 over it, 1.29\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":"Kit/extensions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b8b4271f93cc03edfa04b7d5b964fab820d48dd503967ed22a4d6c0535af70"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SpeedWidget: ClassTooLong \u2014 498 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 98 over it, 1.25\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":"Kit/Widgets/Speed.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf8dad2b18835892b45cd825d5484b27df6f78c161932f2a09f109ee8490587"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SystemStats: TooManyMethods \u2014 37 methods, declared across 2 files: plugins/SystemStats.swift (27), Remote/main.swift (10). The bar is 30 methods; this is 7 over it, 1.23\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemStats.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"84206164c84192b194ad71ce31dcb3bb0b89d918d577e7aaa47bd22e67720b96"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Popup: ClassTooLong \u2014 488 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 88 over it, 1.22\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53a43b7683155a6c5bfc830448fc42f30ac004c7045f73ee9feecd334f4c5d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Disk/popup.swift: FileTooLong \u2014 604 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 104 over it, 1.21\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":"Modules/Disk/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"606559c080c5906c75355b92ff0a8f1b58c82efc608808ec04c9a4960acfefd7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ApplicationSettings: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ebdc40d507586de0934353e0ad6afb68eee400a38d5be3ff499383e7b68659"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: UsageReader: ClassTooLong \u2014 479 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 79 over it, 1.20\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":"Modules/Net/readers.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"a082ab95623435de0e9b52fd97c70b8fbea9e2e1fcaaee758ccd1dcbd1a3731a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Battery.usageCallback: MethodTooLong \u2014 usageCallback runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/main.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c424848762459bd62e5c84e6e8c7e77de49086389c74fa0278fdbf9a00d47e9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SystemKit: ClassTooLong \u2014 475 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 75 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0212b76656c8f5c4378bb131ea6384a9a403a43ab209ef914e93c94e918f63"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Popup: 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":"Modules/CPU/popup.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2b612535f5a975c9bb693f3c41ff791c5a5a672bc90bb826e1b348a98eb2c6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Popup: 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":"Modules/Net/popup.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"345e5a4805979b3b991c0d67687496399397c0e1080436f778ae06aa902a6ad2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ApplicationSettings.init: MethodTooLong \u2014 init runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9904f96563b9776a45ee5549783641602e9dda51b7750ede5e681615467672a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NetworkChart.draw: MethodTooLong \u2014 draw runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5efe0d5f7322a019592e5534e31b9f2c3531159d13557c4bdd15642514965cab"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: scripts/i18n.py: FileTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 56 over it, 1.11\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":"Kit/scripts/i18n.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc4cf52d45b27f3590ebd57b18a290821b489a1c194aab332140260e9933533"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: module/window.swift: FileTooLong \u2014 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10\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":"Kit/module/window.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddad33d38fad3facbf3b69be0d1e114a5ba6aefbd0703dd8a6ee0bb61bc679f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: UsageReader: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"711d821b10f43eda522a5f25d3925dd4e64a98ee9c3bb6acd07aaf3809046d64"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Disk/readers.swift: FileTooLong \u2014 541 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 41 over it, 1.08\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":"Modules/Disk/readers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"069dc060144d96de3aa08d3a1fdb00d690791e4a379f24e95492803724d69f60"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MQTTManager: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 over it, 1.07\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemStats.swift"},"region":{"startLine":982}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4930735b0ab2158ca48b426b62ecf6b4c08c8fbc730662b886fe0fa176a1be"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/AppSettings.swift: FileTooLong \u2014 523 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: ApplicationSettings (15-601). The bar is 500 significant lines; this is 23 over it, 1.05\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd58666be9d61717773ce7cbf05a996187882d5e08e6648855323668f78d44b6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FanView: ClassTooLong \u2014 418 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 18 over it, 1.05\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/popup.swift"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26c4b946709ae4a4005466644c8c8ba40dcce1b2ac451d955cc6b3d1494cc42"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Sensors/values.swift: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 18 over it, 1.04\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":"Modules/Sensors/values.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c810f6687e606de71bfd1a34db85102043461815fc60d1642a90e98e3f635529"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AppDelegate: TooManyMethods \u2014 31 methods, declared across 2 files: Stats/AppDelegate.swift (16), Stats/helpers.swift (15). The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/AppDelegate.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ca1dbd704c98acf07cca00242bb4e910b6dc823ca571d3a51df65da35bbe89"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LineChartView: ClassTooLong \u2014 409 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 9 over it, 1.02\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":"Kit/plugins/Charts.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"4588a54db2fa94a9f2a7beed433aeb2d6ac6d81923e32b3eed6f3c5ddfcc7986"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Preview.usageCallback: MethodTooLong \u2014 usageCallback runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\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":"Modules/Net/preview.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84bbab90b1e6360fe69861ab2686efbc782bfc845125271ce615e3524788298"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: SMC/smc.swift: FileTooLong \u2014 506 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: SMC (160-722). The bar is 500 significant lines; this is 6 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":"SMC/smc.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"057ba89510020be7a14ea6b7499e61511a4b4f80ded63baba3a13b0d891d5359"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ApplicationSettings: ClassTooLong \u2014 402 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 2 over it, 1.01\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7687d311a88ff96d8fa73d583a6cb9c81abdde70f4ee704995349008a8b7e980"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SMC: ClassTooLong \u2014 402 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 2 over it, 1.01\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":"SMC/smc.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b295a315d78a92ecc44a26aac839f7f8c1c76e7ca5c55e891257d45a74c70ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Modules/Sensors/values.swift:215-231 | Modules/Sensors/values.swift:232-248 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/Sensors/values.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9c695aaa20b41d5cba503f832be8c6325683b8759b6564c6979297d0499060"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): Modules/Battery/popup.swift:155-170 | Modules/Battery/popup.swift:172-185 | Modules/Battery/popup.swift:187-273 | Modules/Battery/popup.swift:275-289 | Modules/Net/popup.swift:254-283 | Modules/Net/popup.swift:285-334 | Modules/Net/popup.swift:336-372 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"beae698f63fff7508da3a5619ac18941559e64bbeb9d48740ad3b4f1a8698987"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Modules/Battery/popup.swift:291-309 | Modules/CPU/popup.swift:368-389 | Modules/Disk/popup.swift:84-103 | Modules/GPU/popup.swift:159-182 | Modules/Net/popup.swift:374-393 | Modules/RAM/popup.swift:227-243 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d4e3e1806faeccd627f528884fba17109fe04529d4361caa930ece9eca24fc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Modules/CPU/preview.swift:102-183 | Modules/Disk/preview.swift:123-236 | Modules/Net/preview.swift:117-146 | Modules/RAM/preview.swift:85-165 | Modules/RAM/preview.swift:183-220 | Modules/RAM/preview.swift:222-253 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"df349ed4204b6bc074fe7161814cc5747cdbb4ad0167ef6e1bd39f4bc79981ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/Battery/main.swift:138-281 | Modules/Disk/main.swift:293-361 | Modules/GPU/main.swift:179-238 | Modules/Net/main.swift:251-354 | Modules/RAM/main.swift:154-253 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/main.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c790404db9e3751e6992fdec9bd4eb3ad29e6d17db599d60c63a26a5cb80b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/CPU/popup.swift:548-621 | Modules/Clock/popup.swift:88-112 | Modules/Disk/popup.swift:220-261 | Modules/Net/popup.swift:684-746 | Modules/RAM/popup.swift:302-362 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5821729d888845875506eda111014bbbb411ab7fceef5cb67765d4ef9d85291"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/CPU/widget.swift:64-119 | Modules/Disk/widget.swift:63-117 | Modules/GPU/widget.swift:63-120 | Modules/Net/widget.swift:72-139 | Modules/RAM/widget.swift:80-139 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/widget.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"77137ad32e3158e7fc0522c523972f6247fa6c6eb8ec57b3bfaec3bb0760a144"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Stats/Views/Setup.swift:184-217 | Stats/Views/Setup.swift:258-279 | Stats/Views/Setup.swift:439-460 | Stats/Views/Setup.swift:513-534 | Stats/Views/Setup.swift:597-658 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Setup.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e8f407ceeb25122cb61138d42dff37da20c939ea5473e6c96c2bcb8425fd84"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Kit/Widgets/BarChart.swift:30-101 | Kit/Widgets/Label.swift:38-58 | Kit/Widgets/LineChart.swift:62-135 | Kit/Widgets/NetworkChart.swift:56-107 \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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e74840a50338e61116c0f0d8f699ed7cb8de1e0ed7084fae1f44cd699f52fd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Kit/plugins/Charts.swift:267-300 | Kit/plugins/Charts.swift:1283-1298 | Kit/plugins/Charts.swift:1538-1551 | Kit/plugins/Charts.swift:1622-1630 \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":"Kit/plugins/Charts.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0490948f674253c4c52031b69117422cdd9499705d4a492de22283414c3379c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/Battery/settings.swift:87-116 | Modules/Disk/settings.swift:84-155 | Modules/Net/settings.swift:136-263 | Modules/RAM/settings.swift:86-131 \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":"Modules/Battery/settings.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"f16960a418b839fc4b743850c9d681f6634d2ea51be3a64a9b49ede0f51df939"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/Battery/settings.swift:118-133 | Modules/Disk/settings.swift:173-188 | Modules/Net/settings.swift:265-280 | Modules/RAM/settings.swift:133-148 \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":"Modules/Battery/settings.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c882d81a16c43635b7168f61add5911e86d571211bde056e0f57d00cd3c00ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/CPU/notifications.swift:37-132 | Modules/Disk/notifications.swift:21-41 | Modules/GPU/notifications.swift:21-42 | Modules/RAM/notifications.swift:37-106 \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":"Modules/CPU/notifications.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b1b7757edaa575a617c47d5fa60d2a7d32b422d068e9cc517d144dbe5b8cb6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/CPU/preview.swift:311-327 | Modules/Disk/preview.swift:316-334 | Modules/GPU/preview.swift:258-274 | Modules/Net/preview.swift:265-283 \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":"Modules/CPU/preview.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"11bc11664a1b6412c8f7c92001f1836ca98c3815add2407b4f194b10b64a0ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/CPU/settings.swift:130-135 | Modules/GPU/settings.swift:153-158 | Modules/RAM/settings.swift:150-155 | Modules/Sensors/settings.swift:170-175 \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":"Modules/CPU/settings.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7967f1ffd6f48ffd73c8d867713d97f6dfbe2f12bd29b6db0cc1fc7ba5b362"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): Modules/Remote/settings.swift:413-462 | Modules/Remote/settings.swift:464-512 \u2014 These two members are one piece of code written twice and then edited apart: 49 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":"Modules/Remote/settings.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"2532db945d33695cdafcd1a0bc896f5658b934003fec57633ac30571754e8d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Modules/CPU/popup.swift:322-338 | Modules/GPU/popup.swift:140-157 \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":"Modules/CPU/popup.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"87dcc40dcacaf3079f523a615281dcd268de7b497d415d1613091ad33849f022"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Modules/GPU/popup.swift:121-138 | Modules/RAM/popup.swift:186-203 \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":"Modules/GPU/popup.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe9c8f559d87c9355244717bb8e939e3f2d08ba468d8b28ed5b7d2b7b513394"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Stats/Views/Support.swift:20-45 | Stats/Views/Update.swift:20-44 \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":"Stats/Views/Support.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a40b05f12b67d2949633a7497d614b78adb2169ee454750cfec29f158af94b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Modules/CPU/popup.swift:691-701 | Modules/RAM/popup.swift:419-429 \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":"Modules/CPU/popup.swift"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"93342225a50371e79d0d0a76170bfa1ec8f66375b309f8139298878031237431"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Modules/CPU/popup.swift:682-690 | Modules/RAM/popup.swift:410-418 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/CPU/popup.swift"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a38a8f6ee543ce882b4b6735788bdb56a6e5af81e88e72f484bba513629338c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Kit/Widgets/BarChart.swift:303-314 | Kit/Widgets/LineChart.swift:329-340 \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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a27f2213c192a4db9e521ed09124f9f372194a58885e8f25b237ef0b342713"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Kit/Widgets/BarChart.swift:316-327 | Kit/Widgets/LineChart.swift:342-353 \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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"d686f24f3f7fdf578eed752e6369765fdfe79559fe93271d00b9646ddabda923"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Modules/Net/readers.swift:171-176 | Modules/Net/settings.swift:92-97 \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":"Modules/Net/readers.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3159e15b656c2aed10e3f3904dffb7a52148ae57439ffc1ed08c8a87c065b58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): Modules/CPU/popup.swift:184-197 | Modules/Disk/popup.swift:779-791 \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":"Modules/CPU/popup.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dd65332e3d25328dca1417713b39ae8ea30eeb1bbef29396258018d56710232"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Kit/Widgets/LineChart.swift:382-389 | Kit/Widgets/NetworkChart.swift:408-416 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf7e1b62736b53eed73b8064ca0789e27fd48fabe030fc1f7c2e03c354b790c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Kit/Widgets/Speed.swift:649-656 | Kit/Widgets/Speed.swift:712-719 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Kit/Widgets/Speed.swift"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"04bfe69448b5ec20f2765d36f5fddd8b4305bf519a85bf4ae8eb9a3282fdfcf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Modules/Disk/preview.swift:294-307 | Modules/Net/preview.swift:243-256 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/Disk/preview.swift"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b12151cef02c8bb2fffec7fe2a58b3922b4193302b2cc5b2c339d5c3c21a528"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Kit/module/widget.swift:372-381 | Kit/module/widget.swift:527-535 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Kit/module/widget.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"747f64c39289391a1269eb573b7762d6475aff1dabcb9c390f7770ce3e6d8064"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Kit/Widgets/Battery.swift:668-675 | Kit/Widgets/Stack.swift:300-307 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Kit/Widgets/Battery.swift"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"c774e53842b46328152dd353959af16b0dab037e10094d737ba9bfef45950695"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Modules/Battery/notifications.swift:82-86 | Modules/Battery/notifications.swift:87-91 \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":"Modules/Battery/notifications.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca878746f501a5ff6921980527497869130787670c8e429d2383e1d6e76dc2f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Modules/Net/popup.swift:776-781 | Modules/RAM/popup.swift:404-409 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/Net/popup.swift"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5d2e0d3052afdb199908fb653d33a37f38350944c7ac9368cf8312089cf71d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Modules/CPU/main.swift:97-104 | Modules/CPU/preview.swift:30-37 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/CPU/main.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"56abb0767404f958c13d7bb7791827aa05affdfa1ec2122fb9548c537548fd80"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Modules/CPU/main.swift:105-112 | Modules/CPU/preview.swift:38-45 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/CPU/main.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ad77575727046e200e249aa1b4a7cade8016e0c8b10e26496f48f66fc54d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Modules/CPU/main.swift:113-120 | Modules/CPU/preview.swift:46-53 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/CPU/main.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"8613fcf882aa50e79739e40d24f6398eea9096951248f9bf45c9a7714af64a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Kit/Widgets/Battery.swift:458-463 | Kit/Widgets/Speed.swift:612-617 \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":"Kit/Widgets/Battery.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eaccd337dd5ccde0e706fb54e7e7a28ecc83b9c403eaeb4d07dcdc7d39e8a95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Kit/helpers.swift:1142-1149 | Kit/helpers.swift:1151-1158 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Kit/helpers.swift"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"31b683524c122f39e2d3eeaf6ec66caf6a803f1475efb113923822dc479b5097"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Modules/Battery/settings.swift:142-147 | Modules/GPU/settings.swift:159-164 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Modules/Battery/settings.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9632c6ad5c4bc3d5e35bbfad7581f340682cfd8f7995d98d2b4eefce99131e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 2): Kit/module/window.swift:561-609 | Stats/Views/AppSettings.swift:653-701 \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 \u0060Kit/module/window.swift:561\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. 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Kit/module/window.swift:560\u0060 calls \u0060firstIndex\u0060 and \u0060Stats/Views/AppSettings.swift:652\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":"Kit/module/window.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e064776a4df52271ec7a4a49c9dd3bc36c33956fc194192673c41a012bac6d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Modules/CPU/popup.swift:592-616 | Modules/RAM/popup.swift:333-357 \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 \u0060Modules/CPU/popup.swift:592\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":"Modules/CPU/popup.swift"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9a1deccc0f62c90ea035118816b856b4efa419ab0be39bdfc5a41efbeb06e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 2): Modules/CPU/readers.swift:458-479 | Modules/Sensors/readers.swift:536-555 \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 \u0060Modules/CPU/readers.swift:458\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bd688c4b530cfe4ca7937cbbcd7a9e1a087c5f683de59f361db9e92f58b7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Modules/CPU/readers.swift:204-223 | Modules/RAM/readers.swift:146-165 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also 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":"Modules/CPU/readers.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b838f112a96cac36aa3305f08a91b66e0bdc0fb2aba3b26679c6392998530e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): Kit/Widgets/BarChart.swift:266-284 | Kit/Widgets/LineChart.swift:274-292 | Kit/Widgets/NetworkChart.swift:279-297 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/BarChart.swift:266\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Kit/Widgets/NetworkChart.swift:298\u0060 calls \u0060PreferencesRow\u0060, \u0060localizedString\u0060 and \u0060Kit/Widgets/LineChart.swift:293\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"572501b7e0e2e22edeb4418946380c5b9ce65222d8613da249f6a2a2b7698640"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Modules/Bluetooth/notifications.swift:36-53 | Modules/Bluetooth/settings.swift:44-61 \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 \u0060Modules/Bluetooth/notifications.swift:36\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":"Modules/Bluetooth/notifications.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f762b1dc095b455a1a94760ff8f7f4cbb148801ee6f4cdf27e3fcd6afaacb2fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Kit/Widgets/Stack.swift:456-472 | Modules/Clock/popup.swift:958-974 \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 \u0060Kit/Widgets/Stack.swift:456\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, \u0060Kit/Widgets/Stack.swift:455\u0060 calls \u0060getList\u0060 and \u0060Modules/Clock/popup.swift:956\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc097ea332e9a243b33bb866507dd01071f27b8cf5be80c800c7339965dd8acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Modules/CPU/preview.swift:112-128 | Modules/Disk/preview.swift:133-149 \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 \u0060Modules/CPU/preview.swift:112\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":"Modules/CPU/preview.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e9650f8019a1def5da43bd94a1152c79bfcb6d6ebc08b58517a81678a91ae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): Modules/CPU/widget.swift:104-119 | Modules/Disk/widget.swift:102-117 | Modules/GPU/widget.swift:105-120 | Modules/Net/widget.swift:124-139 | Modules/RAM/widget.swift:124-139 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/widget.swift:104\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":"Modules/CPU/widget.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"96cb496d88448412a05a0737c54a606cd85be638fafd9c94d68259f4a463789e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Kit/Widgets/Speed.swift:164-179 | Kit/Widgets/Speed.swift:184-199 \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 \u0060Kit/Widgets/Speed.swift:164\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":"Kit/Widgets/Speed.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16c9caff944ad82fb1e705bf08ecc82b82fc0975c56d388f4938580955ff698"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): Modules/Battery/settings.swift:119-133 | Modules/Disk/settings.swift:174-188 | Modules/Net/settings.swift:266-280 | Modules/RAM/settings.swift:134-148 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 45 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/Battery/settings.swift"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"098683384842d550dd699c787e3fc98f6dcd553b6ef8dcd55dbfb2ce56ea89e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): Modules/CPU/preview.swift:288-302 | Modules/GPU/preview.swift:235-249 | Modules/RAM/preview.swift:255-269 \u2014 \u0060Modules/CPU/preview.swift\u0060 and \u0060Modules/GPU/preview.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a53aa2d3983aa2c86254dab64dd278ab6b7979d9157d8d3fedcf51105794f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/LineChart.swift:307-321 | Kit/Widgets/NetworkChart.swift:313-327 \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 \u0060Kit/Widgets/LineChart.swift:307\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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d22b52a4d689f941e0d5d518769b917783c57f812b739cacf73bc84cedcf96a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/PieChart.swift:92-106 | Kit/Widgets/Tachometer.swift:74-88 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/PieChart.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c2456fb856675eac7e43bf715969c04b10fdf674b944c7e4a5efc05453b9dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/PieChart.swift:111-125 | Kit/Widgets/Tachometer.swift:93-107 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b3643a794e14a9a7216c110f7b87dd4ca1e596efdb07ae764b71284df16a3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/Stack.swift:348-362 | Modules/Clock/popup.swift:835-849 \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 \u0060Kit/Widgets/Stack.swift:348\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"3573247fd3a8661308bb73288700e430de7b743d8e81f4956ea95f8ecbf4f594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): Modules/CPU/popup.swift:123-135 | Stats/Views/Dashboard.swift:199-213 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"3270145615d3dcbe571a40674337a503d4d2aa1ab4eb060d12dd19ace0654512"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Modules/CPU/preview.swift:185-199 | Modules/RAM/preview.swift:167-181 \u2014 \u0060Modules/CPU/preview.swift\u0060 and \u0060Modules/RAM/preview.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 57 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7066934c52091984fc03033501509f7ae13e704ce310f2a8a979097d84fc87a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): Modules/Disk/popup.swift:873-901 | Modules/Disk/preview.swift:444-472 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/popup.swift"},"region":{"startLine":873}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab71ddff221cc3eab6c4910e7748f5653c1e5c0b5f3713dc57ba881d9f1612d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Modules/Disk/portal.swift:65-79 | Modules/Net/portal.swift:73-87 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/Disk/portal.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb2108453e135269ee5728a60422543c96457a52e7f84eac31e456ddb14e96d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Modules/Battery/readers.swift:284-297 | Modules/CPU/readers.swift:552-565 | Modules/CPU/readers.swift:600-613 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also 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":"Modules/Battery/readers.swift"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd5218f7f8f1743ff6733399a0c0185d4864a06470fa72b74f4e4d7ee385345d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Kit/Widgets/Battery.swift:283-303 | Kit/Widgets/Battery.swift:602-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4c240980e2e06c95973526c9f92dd0caa462307aa32bece648498bdef496a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201314 lines \u00D7 2): Kit/plugins/Charts.swift:1386-1399 | Kit/plugins/Charts.swift:1516-1524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"519831732aa932889ec6d580f7425ed19825246aa3db9a8a15aa29df001a47b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Modules/CPU/settings.swift:66-79 | Modules/RAM/settings.swift:89-102 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/settings.swift:66\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":"Modules/CPU/settings.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f72e29e375fdd02f2ade6692ca15830969152df29a2b543b4dfbd661896e51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Modules/Disk/readers.swift:54-74 | Modules/Disk/readers.swift:533-553 \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 \u0060Modules/Disk/readers.swift:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Modules/Disk/readers.swift:75\u0060 calls \u0060removeValue\u0060 and \u0060Modules/Disk/readers.swift:554\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc09f0f38213746a9f722ac20a5e1bf81251af3802a2b62ac342be09c266d13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Kit/Widgets/BarChart.swift:89-101 | Kit/Widgets/LineChart.swift:123-135 | Kit/Widgets/NetworkChart.swift:95-107 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/BarChart.swift:89\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"431d801cd872ac9bd426fdc564ef9f8ab5755d380e0db6a7e78fba8dc69ef266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Stats/Views/Setup.swift:267-279 | Stats/Views/Setup.swift:448-460 | Stats/Views/Setup.swift:522-534 \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 \u0060Stats/Views/Setup.swift:267\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Setup.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"1515c304268e264c8bcac366b73071f344c38851fff98330c10524541404f566"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/Battery.swift:267-281 | Kit/Widgets/Battery.swift:586-600 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"4caab486ae99c2d9a92ec79e28152076260ea256c03d6583b0a2ece9531a9672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Kit/helpers.swift:445-456 | Kit/helpers.swift:473-484 \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 \u0060Kit/helpers.swift:445\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":"Kit/helpers.swift"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f0ab641cb6bcf9637f561d43699efaad41cb1ca594ad637b7b873773c518255"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Kit/module/module.swift:337-349 | Stats/Views/CombinedView.swift:170-182 \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 \u0060Kit/module/module.swift:337\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":"Kit/module/module.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb5183a761ba878c4ef9878c458738f5efdcc95a764ac97c88685f91f3a1f759"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Modules/CPU/popup.swift:410-432 | Modules/CPU/portal.swift:117-139 \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":"Modules/CPU/popup.swift"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24a59ea602945d0dfa91debd9b652674b90371920f10aaf1ee20b8fdef4b350"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:433-444 | Modules/Remote/settings.swift:450-461 \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 \u0060Modules/Remote/settings.swift:433\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":"Modules/Remote/settings.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e42414196ae67944eea96ebf9310c4b61d04e09abfca91ef8689b264294c355"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:425-436 | Modules/Remote/settings.swift:476-487 \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 \u0060Modules/Remote/settings.swift:425\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":"Modules/Remote/settings.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"54646ae551f0a600b4c741e163b2acd318cdfb802678efccf73513b3dc1c236b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:484-495 | Modules/Remote/settings.swift:500-511 \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 \u0060Modules/Remote/settings.swift:484\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":"Modules/Remote/settings.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b7ab8c635426a375665b63f3b49643b288e10b154a50446b5197d4265b34611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Sensors/readers.swift:329-340 | Modules/Sensors/readers.swift:502-513 \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 \u0060Modules/Sensors/readers.swift:329\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":"Modules/Sensors/readers.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24b07b33996af48512e288664e3179a6840d879d6a23691de9fc5f4bd169f44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): Modules/CPU/popup.swift:548-558 | Modules/Clock/popup.swift:88-98 | Modules/Disk/popup.swift:220-230 | Modules/Net/popup.swift:684-694 | Modules/RAM/popup.swift:302-312 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/popup.swift:548\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":"Modules/CPU/popup.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"1869dabca0768118cfc30d19dcef0a7e0fd15ac46c58ea528070e752e0d23644"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): Stats/Views/Setup.swift:261-271 | Stats/Views/Setup.swift:442-452 | Stats/Views/Setup.swift:516-526 | Stats/Views/Setup.swift:600-610 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Setup.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff622968284c4009e71d2ebd90e9f74cc3979f9f1d4b814abb72a402d49172d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/Battery/popup.swift:299-309 | Modules/CPU/popup.swift:379-389 | Modules/GPU/popup.swift:172-182 \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 \u0060Modules/Battery/popup.swift:299\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"72753d8537f3578a5611a0ac4c45c390a619fa04530716a5b44788e9ebb44245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/Battery/popup.swift:414-424 | Modules/Disk/popup.swift:206-216 | Modules/Net/popup.swift:403-413 \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. 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":"Modules/Battery/popup.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc99f2a7910be2123599268c9efa8c14befe427b2a11a20cb9ac8c8c9bd452c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/CPU/preview.swift:108-118 | Modules/Disk/preview.swift:129-139 | Modules/RAM/preview.swift:91-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee971094d35e3d07ccbb049295d0f9969e596a3b17043f95c52eb67a0dd2f75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): Stats/Views/Settings.swift:444-466 | Stats/Views/Setup.swift:625-647 | Stats/Views/Support.swift:117-139 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Settings.swift"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af458324bcb8bdf7e0f1112e542bded0368116bc5219dc115d2020111debbbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/Widgets/LineChart.swift:260-270 | Kit/Widgets/Mini.swift:162-172 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"4888410db71141c9d570f0c868c416e230b3ebc815bcabb6925101ede24c507d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/Widgets/Stack.swift:375-385 | Modules/Clock/popup.swift:869-879 \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 \u0060Kit/Widgets/Stack.swift:375\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"5791615e6a7d01f4fa62b6be2218673b6004d9afd1b9b8536bd1500b0a3f2935"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/helpers.swift:389-399 | Kit/helpers.swift:2449-2459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/helpers.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f833d7077ffc20da7b4b67f627af11e559803c892a7efe5048c577bd036d36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/helpers.swift:703-713 | Kit/helpers.swift:718-728 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/helpers.swift"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"146175db4ce5d63518d09a25e15bca09ce8d7dfe4fea096ac4827c1b58f82e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/plugins/SystemStats.swift:781-791 | Kit/plugins/SystemStats.swift:806-816 \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 \u0060Kit/plugins/SystemStats.swift:781\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 \u0060completion\u0060 to \u0060@escaping (DeviceResponse?) -\u003E Void\u0060 in one and \u0060@escaping (Error?) -\u003E Void\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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80d10bac4d05f3d53e4671ee79ed100339145db9fcf832714516578d5adc321"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Modules/CPU/popup.swift:21-31 | Modules/CPU/popup.swift:37-47 \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 \u0060Modules/CPU/popup.swift:21\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ee5f0759bfda51ca943b9a8add4c7f56cb935275e9f3689ef896a9a2187123"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Modules/CPU/portal.swift:50-59 | Modules/Disk/portal.swift:50-60 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/portal.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"10007e6e42eb4c97df254e058f00192f0ac630794da5826214649b6b18033ca4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Modules/Disk/popup.swift:779-789 | Modules/Net/popup.swift:165-175 \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 \u0060Modules/Disk/popup.swift:779\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":"Modules/Disk/popup.swift"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f573ba0768e2a4d5ead93af79211efe2583f75d9ee6ccacee810f885014467"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SMC/smc.swift:209-219 | SMC/smc.swift:281-291 \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 \u0060SMC/smc.swift:209\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":"SMC/smc.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"70915308ae312fda82639c927874738fae021206a39a32991829b4d2f1b9ec25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): Modules/CPU/preview.swift:105-114 | Modules/Disk/preview.swift:126-135 | Modules/Net/preview.swift:120-129 | Modules/RAM/preview.swift:88-97 | Modules/RAM/preview.swift:186-195 | Modules/RAM/preview.swift:225-234 \u2014 there are 6 copies across 4 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 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25876296272ad7f9bd8a34db4e950442d0f462d9e30560d7ffff77dd5b767e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Kit/Widgets/Stack.swift:355-364 | Modules/Clock/popup.swift:842-851 | Modules/Clock/settings.swift:71-80 \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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction \u2014 check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Stack.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c068e44c3763ae40189c105e74c1a85e98e5bc378cca8a75ca16aadc7477ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Modules/CPU/portal.swift:70-79 | Modules/Disk/portal.swift:85-94 | Modules/RAM/portal.swift:46-55 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/portal.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a2c84a1eb24460797fb8987b8ddf7ff9785159ecc5c7d553c6e957a753d171"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Modules/Sensors/readers.swift:186-195 | Modules/Sensors/readers.swift:217-226 | Modules/Sensors/readers.swift:227-236 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Modules/Sensors/readers.swift:182\u0060 calls \u0060filter\u0060, \u0060hasPrefix\u0060 and \u0060Modules/Sensors/readers.swift:214\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":"Modules/Sensors/readers.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab68556bb3b4a54b35dcf26ef11f0b0fc0250de1fdd82d67ea591fbd0966f9e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/Widgets/BarChart.swift:280-289 | Kit/Widgets/Mini.swift:219-228 \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 \u0060Kit/Widgets/BarChart.swift:280\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"134e6e8ebd59eb48d9bb1235c8ac7d3166002c67cc1124a2601e456a665ba1e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/Widgets/Battery.swift:101-110 | Kit/Widgets/Battery.swift:113-122 \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 \u0060Kit/Widgets/Battery.swift:101\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"279974121b0a3b86a3954c9f4a767d6f94c8298f70513c3f0261cb5a97cd6814"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/plugins/Charts.swift:1001-1010 | Kit/plugins/Charts.swift:1122-1131 \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 \u0060Kit/plugins/Charts.swift:1001\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":"Kit/plugins/Charts.swift"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"49cdfa8599cbb3b217af8ac00a23d69a7c35a5dac79c81dc647663129f737233"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Battery/popup.swift:396-405 | Modules/RAM/popup.swift:283-292 \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 \u0060Modules/Battery/popup.swift:396\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":"Modules/Battery/popup.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef860c67f3f77c8927f957a14e2333382537dbf69467584e6c98c9d6c5b8754f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Disk/main.swift:318-327 | Modules/RAM/main.swift:199-208 \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 \u0060Modules/Disk/main.swift:318\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":"Modules/Disk/main.swift"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a599b1367305f46e4350a436e379105b6b9e6a3b07b26ab6bce402931f7d92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Disk/portal.swift:45-54 | Modules/Net/portal.swift:69-78 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/portal.swift:45\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":"Modules/Disk/portal.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cc15df81470769b1df8c418ed1a0dd4635344874c8ef3dbefe060a4aa98373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Modules/Disk/settings.swift:118-127 | Modules/Net/settings.swift:180-188 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Net/settings.swift:180\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"790989952b9d06cb8bedabe6c634f6ec2d5ad9868d71bda4d50d15f4ae85b456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Net/main.swift:336-345 | Modules/RAM/main.swift:234-243 \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 \u0060Modules/Net/main.swift:336\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, \u0060Modules/RAM/main.swift:245\u0060 calls \u0060setValue\u0060, \u0060pressureColor\u0060 and \u0060Modules/Net/main.swift:347\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":"Modules/Net/main.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5dd3cc187ee757a9ea788f26b09c66aa1b9c2fcb7111aa26b7847ac49bbcde6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Sensors/popup.swift:941-950 | Modules/Sensors/popup.swift:953-962 \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 \u0060Modules/Sensors/popup.swift:941\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":"Modules/Sensors/popup.swift"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4203804c7bb4620a98fd37ab7562ebeb861d5a2f50bb1b5204fb9b32c7d9777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Stats/Views/Support.swift:54-63 | Stats/Views/Update.swift:61-70 \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":"Stats/Views/Support.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"88427d9c14aa1763fd695a5a1f037ad3924bfa74b01620d52a5c44ccd0a9ddea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): Modules/Battery/main.swift:269-277 | Modules/Disk/main.swift:345-353 | Modules/GPU/main.swift:222-230 | Modules/Net/main.swift:338-346 | Modules/RAM/main.swift:236-244 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Battery/main.swift:269\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, \u0060Modules/RAM/main.swift:245\u0060 calls \u0060setValue\u0060, \u0060pressureColor\u0060 and \u0060Modules/Battery/main.swift:278\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":"Modules/Battery/main.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8c8960d4d6ef27ea6f79a39f3bb8913604caad6bef0673bc52d15e14f3695d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 6): Modules/Battery/popup.swift:297-305 | Modules/CPU/popup.swift:377-385 | Modules/Disk/popup.swift:92-93 | Modules/GPU/popup.swift:170-178 | Modules/Net/popup.swift:382-383 | Modules/RAM/popup.swift:232-240 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/popup.swift:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Modules/CPU/popup.swift:377\u0060 calls \u0060ProcessesView\u0060 and \u0060Modules/Disk/popup.swift:92\u0060 does not \u2014 after which the two agree again for 5 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":"Modules/Battery/popup.swift"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4b890eb7c13e0dd3d8103645d200bd9fb7c46cf2c352220814de5c7e52729d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Modules/Battery/popup.swift:397-405 | Modules/Net/popup.swift:660-668 | Modules/RAM/popup.swift:284-292 \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 \u0060Modules/Battery/popup.swift:397\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":"Modules/Battery/popup.swift"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"4338266a95f9034568846db6a5b53104b4935bd0b43fc859bb6074fa35caa4fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): Modules/CPU/settings.swift:63-70 | Modules/Disk/settings.swift:84-92 | Modules/RAM/settings.swift:86-93 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/settings.swift:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/settings.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"084f1ca1f6ae05628a9cfa0663b20ba46d3fb983fdf1117ce4adfb4cda49473a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/BarChart.swift:303-311 | Kit/Widgets/LineChart.swift:329-337 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/BarChart.swift:303\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e2880dac73cce2b4a0d731e216d66a1127ac77c1377c6979d5fe35f01ac7a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/BarChart.swift:316-324 | Kit/Widgets/LineChart.swift:342-350 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/BarChart.swift:316\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bcf1c935ddd378310158a5ed62959398eaeffe0fd0147315461bb126774298"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/helpers.swift:666-674 | Kit/helpers.swift:676-684 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/helpers.swift"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ff23dd129b77d1296c73024453dc46bdf19c8ca4a3bde4abf5d921dd1bfe19b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/module/popup.swift:258-266 | Kit/module/popup.swift:319-327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/popup.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b58c3e7cd6b741c7668d72ccb97a6442a4ad346fec6c3a45bac339a9edd547e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/CPU/popup.swift:189-197 | Modules/Net/popup.swift:170-178 \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 \u0060Modules/CPU/popup.swift:189\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":"Modules/CPU/popup.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ed2b8895b2aa4e8340a3ccf51494979120ab8067b7703b7439b6a0225724a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/CPU/popup.swift:482-490 | Modules/CPU/preview.swift:383-391 \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":"Modules/CPU/popup.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e22f92a238b820e7d4015e2a41044c8ebb0b564ef5695161163c0294f7889b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/CPU/preview.swift:311-319 | Modules/GPU/preview.swift:258-266 \u2014 \u0060Modules/CPU/preview.swift\u0060 and \u0060Modules/GPU/preview.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/preview.swift:311\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":"Modules/CPU/preview.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"29eaf390a272225ba37f4da52d5627a0c47660572a5c943fc521276c39a36ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Clock/popup.swift:344-352 | Modules/Clock/popup.swift:361-369 \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 \u0060Modules/Clock/popup.swift:344\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Clock/popup.swift"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b2d1088511ece75c907d1a01b1a840adfdf52a9eaeb1f6fe7bc25984bb8343"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Disk/popup.swift:442-450 | Modules/Disk/preview.swift:169-177 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Modules/Disk/popup.swift:440\u0060 calls \u0060localizedString\u0060 and \u0060Modules/Disk/preview.swift:167\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":"Modules/Disk/popup.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7f63fb30973edd5b87f2cf9fe955e28fc89ce5d0a57829b5fa9dd66398f3a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Disk/readers.swift:620-628 | Modules/Disk/readers.swift:684-692 \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 \u0060Modules/Disk/readers.swift:620\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. 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":"Modules/Disk/readers.swift"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"7362e750510ba384e815b3a0b7978edec869c5e587c4d3037d4b1fd04884762f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Disk/settings.swift:87-95 | Modules/Sensors/settings.swift:51-59 \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 \u0060Modules/Disk/settings.swift:87\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":"Modules/Disk/settings.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e5b5309dd98e4a997ebb92eaa3b8e6c9c1293bd31cc034bf3ef6c8245b6197"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Net/popup.swift:528-536 | Modules/Net/portal.swift:196-204 \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":"Modules/Net/popup.swift"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"094add6fb435ff99b9922e0e6df7158a59f86c9d26d047f1049c5634dc8e625c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): SMC/Helper/main.swift:169-180 | SMC/Helper/main.swift:183-194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/Helper/main.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e603665f3a97acc7640a41b172f6c360c8acd1babb7746a9b65c9de6550716"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): Modules/CPU/preview.swift:312-319 | Modules/Disk/preview.swift:317-324 | Modules/GPU/preview.swift:259-266 | Modules/Net/preview.swift:266-273 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/preview.swift:312\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":"Modules/CPU/preview.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3eec45d2a47facbfbc9855a75966b5295dec29c3eabca27434f60b141d71b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): Modules/CPU/widget.swift:81-89 | Modules/Disk/widget.swift:79-87 | Modules/GPU/widget.swift:79-87 | Modules/RAM/widget.swift:96-104 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/widget.swift:81\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, \u0060Modules/CPU/widget.swift:92\u0060 calls \u0060Rectangle\u0060, \u0060fill\u0060, \u0060frame\u0060 and \u0060Modules/GPU/widget.swift:90\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":"Modules/CPU/widget.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1d9a421303f6b24f5ebefd45d8b2bc79ae1bbdcab82199be4974f01483a1ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Kit/Widgets/Mini.swift:216-223 | Kit/Widgets/PieChart.swift:110-117 | Kit/Widgets/Tachometer.swift:92-99 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/Mini.swift:216\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":"Kit/Widgets/Mini.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de47235c8dd3204339e6f7041c7a542ffa9200a72f3477175c8ef49fa62b1ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Modules/CPU/main.swift:172-179 | Modules/GPU/main.swift:164-171 | Modules/Net/main.swift:206-213 \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. 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":"Modules/CPU/main.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b303b7cc21ce3bbab095b69075086b1fb29893ea53ea6c4a42fd2805495d40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20138 lines \u00D7 4): Modules/CPU/popup.swift:368-375 | Modules/Disk/popup.swift:84-91 | Modules/Net/popup.swift:374-381 | Modules/RAM/popup.swift:230-230 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/popup.swift:368\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, \u0060Modules/RAM/popup.swift:228\u0060 calls \u0060NSView\u0060, \u0060NSRect\u0060 and \u0060Modules/CPU/popup.swift:368\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca4b6ed182f9ac68783d8eba61842cf17e1fe57a0432fba6b461a3d05c656fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/BarChart.swift:66-73 | Kit/Widgets/Mini.swift:74-81 \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 \u0060Kit/Widgets/BarChart.swift:66\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Kit/Widgets/Mini.swift:82\u0060 calls \u0060fromString\u0060 and \u0060Kit/Widgets/BarChart.swift:74\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bbbabe36b321a66cad2d5b748eeb7b1f803366b3a6296f21fb0588ca924a573"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/Battery.swift:35-42 | Kit/Widgets/NetworkChart.swift:69-76 \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 \u0060Kit/Widgets/Battery.swift:35\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"640a017569254b25a7b5b73288366e7a67203bde098f37dce06d228ac9e6e622"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/Dot.swift:32-39 | Kit/Widgets/Label.swift:25-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/Dot.swift:32\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc745e06e05274581eb2bba54abdd1c72990c62434b8d903fa0cc0c9a72ef11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/Widgets/PieChart.swift:77-86 | Kit/Widgets/Tachometer.swift:59-68 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/PieChart.swift:77\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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3c66ab24645403552e6c2a7b93ebcafa2c363ddfd060dd8e9301f90ab605a86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Kit/extensions.swift:516-522 | Modules/GPU/settings.swift:132-139 \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 \u0060Kit/extensions.swift:516\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":"Kit/extensions.swift"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f1f5cff4d033e49516099695c6c2b690b636b12788bfc64d7a0218d823b8cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): Kit/plugins/SystemKit.swift:447-455 | Kit/plugins/SystemKit.swift:457-463 \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 \u0060Kit/plugins/SystemKit.swift:457\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d154412cd723a650e701016a7a82d2616d78357e5a925e1e3d8a2ab6bb40d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/main.swift:88-95 | Modules/RAM/main.swift:72-79 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"615fc52e7d099ec504e2d82c37bfe1d7fb1c5c575c26697123c93570514b2e7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Net/preview.swift:383-390 | Modules/Net/preview.swift:398-405 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/preview.swift"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4195200e8e2e02a5e29838b0e0249991f521f5719fe586a3b55c78f1dadafe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Remote/popup.swift:156-164 | Modules/Remote/settings.swift:421-429 \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":"Modules/Remote/popup.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94cac5737687e32df9953b592fecf85103c87f1973db4af35e996af6a964571"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Remote/popup.swift:165-173 | Modules/Remote/settings.swift:472-480 \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":"Modules/Remote/popup.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"7155654cf4f0f6cada4c91f500634935c1a73b068833751d57d58ccbb9338940"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): SMC/smc.swift:423-430 | SMC/smc.swift:492-499 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/smc.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"8490ade1cf9195586ff82f75f52291fe06315b5cd9e533bc3ef36b67cf56a07f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Stats/Views/AppSettings.swift:90-97 | Stats/Views/Dashboard.swift:220-227 \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":"Stats/Views/AppSettings.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8b6836b83438eb7e4ffab35d2f1554a2c8c5b67aee6d441838da453da9d127"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Stats/Views/AppSettings.swift:443-450 | Stats/Views/AppSettings.swift:576-583 \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 \u0060Stats/Views/AppSettings.swift:443\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d62b41c7ed8c0e8cc5b3370ea320109624a04f3762df71d542f00f26be5b297"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Stats/Views/Setup.swift:184-190 | Stats/Views/Setup.swift:258-264 | Stats/Views/Setup.swift:439-445 | Stats/Views/Setup.swift:513-519 | Stats/Views/Setup.swift:597-603 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Setup.swift:184\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":"Stats/Views/Setup.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e28071b5cc5850aff75801e28fe59fae229bfe626b4d34dec4299940a6493c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): Kit/Widgets/BarChart.swift:89-95 | Kit/Widgets/Label.swift:43-50 | Kit/Widgets/LineChart.swift:123-129 | Kit/Widgets/NetworkChart.swift:95-101 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"3353509c3d0ea5d580df6a3c510598c075cf35d2f9761fc6a54b69f66d3a0af0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): Modules/Battery/settings.swift:108-116 | Modules/Disk/settings.swift:147-155 | Modules/Net/settings.swift:255-263 | Modules/RAM/settings.swift:123-131 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 45 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Battery/settings.swift:108\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":"Modules/Battery/settings.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc276e2820983f940e27c97da50ba793d25a024b46a5a47da6a67d552203fabf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Kit/Widgets/BarChart.swift:68-74 | Kit/Widgets/LineChart.swift:91-97 | Kit/Widgets/NetworkChart.swift:71-77 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/BarChart.swift:68\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"760cb781fd010f2cb5dd15a33b9f14aa0f7d7dbb641125bfc07ab9dd8fb0928d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Kit/Widgets/Battery.swift:34-40 | Kit/Widgets/Battery.swift:500-506 | Kit/Widgets/NetworkChart.swift:68-74 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/Battery.swift:34\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffea5583653b86d2b87647aaae51835658336b377e09c5636f690d55da457b04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Modules/Battery/popup.swift:399-405 | Modules/CPU/popup.swift:498-504 | Modules/RAM/popup.swift:286-292 \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 \u0060Modules/Battery/popup.swift:399\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":"Modules/Battery/popup.swift"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eefa9f0220f169487d33fc9ee70812f5404e3d43f5e8054db13c80b650e4721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Kit/Widgets/Dot.swift:17-23 | Kit/Widgets/Memory.swift:24-30 \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 \u0060Kit/Widgets/Dot.swift:17\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2650e2aa3059c4d7302c96be21240ef25580401773f258f0bfe2534bfb88732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Kit/module/window.swift:544-550 | Kit/module/window.swift:612-619 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/window.swift"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d035fcd8c7dd886fc8d66ce59a81c568d71b71725358470cde249df16463c7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/popup.swift:691-698 | Modules/RAM/popup.swift:419-426 \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 \u0060Modules/CPU/popup.swift:691\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":"Modules/CPU/popup.swift"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6971e362216843e510dbb4393a86aa3ead83b4f8a6d809b6c4b1b6ee90629d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Clock/popup.swift:281-287 | Modules/Clock/popup.swift:293-299 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Clock/popup.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5c19e42bc3425befd50d9822e080e3fa735e78002e3a2f79cf414d13973342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Clock/settings.swift:221-227 | Modules/Clock/settings.swift:230-236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Clock/settings.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a7999f43b73f970da843c204c7705effa0e448eea239c5689265bf4c6721bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Disk/portal.swift:109-115 | Modules/Net/portal.swift:95-101 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/portal.swift:109\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":"Modules/Disk/portal.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"da371967074154fc7ac5eae971e509459b7abe0b63cc7dab24c53ebee162fa2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Disk/preview.swift:186-192 | Modules/Disk/preview.swift:193-199 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/preview.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f2d872bfc98534bd003e2ad250136ff5800d56217de591c7d34edebf6856aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20137 lines \u00D7 3): Modules/Battery/settings.swift:149-152 | Modules/Disk/settings.swift:246-252 | Modules/RAM/settings.swift:181-187 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 45 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Battery/settings.swift:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Modules/Battery/settings.swift:153\u0060 calls \u0060set\u0060, \u0060callback\u0060 and \u0060Modules/Disk/settings.swift:252\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":"Modules/Battery/settings.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"93787e4d42ff82ea05d2996f7690b5179cf91f9e1a79d55ec3e3c3bd337faea7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/readers.swift:435-441 | Modules/Net/readers.swift:857-863 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5bbd05c28a38cf54e6dc6cfb2d47ca90b7f0471380c42aff6c31052503cda6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Remote/popup.swift:435-441 | Modules/Remote/popup.swift:487-493 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/popup.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"0416f09fc22c2a18f66240371cee4e85d8e71f02420cf2c23346ffb1a0e92c6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Stats/Views/Dashboard.swift:152-158 | Stats/Views/Dashboard.swift:169-175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Dashboard.swift:152\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":"Stats/Views/Dashboard.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"247f4d47df4fd26f0ee8e42464fac7f687b5ccab9aaeeb2f0d5dc27d2be9136b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Kit/Widgets/Stack.swift:375-381 | Kit/extensions.swift:709-715 | Modules/Clock/popup.swift:869-875 \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 \u0060Kit/Widgets/Stack.swift:375\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"c352abdde7efa1c940aaed6cec36866f203ecbcb3cdf9aeab7a6777c18b013a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Modules/Disk/widget.swift:72-77 | Modules/GPU/widget.swift:72-77 | Modules/RAM/widget.swift:89-94 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 31 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/widget.swift:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/widget.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf38777f842c11942519742b97f909f46bbf3915acc7167eb94cd6b6e8c38065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 7): Modules/Battery/popup.swift:156-158 | Modules/Battery/popup.swift:173-175 | Modules/Battery/popup.swift:188-190 | Modules/Battery/popup.swift:276-278 | Modules/Net/popup.swift:255-260 | Modules/Net/popup.swift:286-291 | Modules/Net/popup.swift:337-342 \u2014 there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Net/popup.swift:255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"29fe8c69495e8a15164161e04cabc3181689dc938fdd8a55a68b8ece4cb2ffa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Battery.swift:196-201 | Kit/Widgets/Battery.swift:206-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"2033c4392969c9c383895d484024eb9b8f7b70b4a154c19bba4aa10ade0a65e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/LineChart.swift:293-298 | Kit/Widgets/Speed.swift:563-568 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4985b3641e7a54b67d518aa60a579c6f0ab7945fca3138dbd69b6cd83e7978"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/module/popup.swift:380-385 | Kit/module/popup.swift:406-411 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Kit/module/popup.swift:412\u0060 calls \u0060iconFromSymbol\u0060 and \u0060Kit/module/popup.swift:386\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":"Kit/module/popup.swift"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e40deb951808f282ecbd8add51130a6f9b310f1c69367f853063e57e20662b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/plugins/Updater.swift:217-222 | Kit/plugins/Updater.swift:246-251 \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 \u0060Kit/plugins/Updater.swift:217\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":"Kit/plugins/Updater.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"155136a7557ba387c8dedc50623d84f0034dc64a32eba37c33640dfa7168e160"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Battery/settings.swift:87-92 | Modules/Net/settings.swift:136-141 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 44 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Battery/settings.swift:87\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":"Modules/Battery/settings.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3f456fc71a8154fa02ac6ecbaa3eb4877dba06f3698ec906a6aca5c1ffcdf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Clock/settings.swift:150-155 | Modules/Clock/settings.swift:162-167 \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 \u0060Modules/Clock/settings.swift:150\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":"Modules/Clock/settings.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"b089e6a57c135ef0828e8c3ce46a5a79ee10117d2172eed7e435510f06576051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Disk/readers.swift:610-615 | Modules/Disk/readers.swift:674-679 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5c4711c36c6f5d30835fcba133b8a5ff3e08d05e7c89344e3ef6fe92687f7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Remote/popup.swift:143-152 | Modules/Remote/settings.swift:119-128 \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 \u0060Modules/Remote/popup.swift:143\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":"Modules/Remote/popup.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"b10d90cc30689077dc6bf104ff764182da3def632a3f8426cec3b54951fa4479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Remote/settings.swift:414-419 | Modules/Remote/settings.swift:465-470 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/settings.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d0157fbeb2aa59eae90d95abebf2f5f81b58c1c91fd3ef340fc7ac63c99538"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Sensors/main.swift:62-69 | Modules/Sensors/main.swift:73-80 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Sensors/main.swift:62\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":"Modules/Sensors/main.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e2b657aa860dfd8335768bf5261bebe98d6a8543ffaea36c3a4ff97fdbb9292"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Sensors/popup.swift:624-629 | Modules/Sensors/popup.swift:636-641 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Sensors/popup.swift:624\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":"Modules/Sensors/popup.swift"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a9f38384966b5fb38f77bc42c89956753272efd9a07d0eb8ddc81a47d84764"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Modules/Battery/settings.swift:90-96 | Modules/CPU/settings.swift:79-85 | Modules/Disk/settings.swift:95-101 | Modules/GPU/settings.swift:92-98 | Modules/Net/settings.swift:139-145 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 45 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/settings.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad73d3cedf2d0e9a87ea59c639bf7f2618e0b2022838be2833e28d757c21c8e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Kit/plugins/Charts.swift:290-299 | Kit/plugins/Charts.swift:1288-1297 | Kit/plugins/Charts.swift:1546-1550 | Kit/plugins/Charts.swift:1624-1628 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060frame\u0060 to \u0060NSRect = NSRect.zero\u0060 in one and \u0060NSRect = .zero\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":"Kit/plugins/Charts.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1244bdf75a762a5e489809870114e2e6ee51dab0b53f584172e9bc68faa7c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Modules/CPU/settings.swift:130-135 | Modules/GPU/settings.swift:153-158 | Modules/RAM/settings.swift:150-155 | Modules/Sensors/settings.swift:170-175 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/settings.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef78a937aa208babecdd9db218bdf5df0777b7ce5f8e164f10b6fe30b77d6cf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): Modules/Remote/popup.swift:143-148 | Modules/Remote/popup.swift:149-154 | Modules/Remote/settings.swift:119-124 | Modules/Remote/settings.swift:125-130 \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. 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":"Modules/Remote/popup.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c64a1723f00abb16277bbc64fe13975e21058d41f8d904259d051dee73ff07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Kit/Widgets/Dot.swift:32-36 | Kit/Widgets/Label.swift:25-29 | Kit/Widgets/Text.swift:20-24 \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 \u0060Kit/Widgets/Dot.swift:32\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4baff390de4b1403522ac92b3f0dc1b0ba9c4da559142b7bcae587f2b519c307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Modules/CPU/readers.swift:129-133 | Modules/CPU/readers.swift:135-139 | Modules/CPU/readers.swift:141-145 \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 \u0060Modules/CPU/readers.swift:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3877cff5ea3bb65dd280b855e88954a87b6c6e702dbfa025943fb1eb133752b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Modules/CPU/settings.swift:137-142 | Modules/GPU/settings.swift:165-170 | Modules/RAM/settings.swift:156-161 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/settings.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"8348e24b2a06c1a1701a75371449e7d0e11115a8e945c3c2c577887f7860bfe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/LineChart.swift:323-327 | Kit/Widgets/Mini.swift:246-250 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee02bb88aa3a2c36884c1685d52e09c553a081c58fc3a1aed7aba909de4f0ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/NetworkChart.swift:230-234 | Kit/Widgets/NetworkChart.swift:242-246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f08304705f7bea98b13434f8a05999d4ffbb1f29c956a518345ef6738a345d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/PieChart.swift:67-71 | Kit/Widgets/Tachometer.swift:49-53 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/PieChart.swift:67\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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"9924335e0dd73e6c141ed97162b54c02caf5824265421fd1c40b18ec20a301f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/Speed.swift:209-217 | Kit/Widgets/Speed.swift:229-237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Speed.swift"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"772252f46df9a5b95d48959cfd56193bcee26809d61d933ae88861e73f83411c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): Kit/plugins/Charts.swift:988-994 | Kit/plugins/Charts.swift:1106-1111 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":988}}}],"partialFingerprints":{"codehealthFindingId/v1":"048f0122951c2d180a53f471198b4b173b45aa53ebca27303b36c7e8e17cd12b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/plugins/SystemKit.swift:684-688 | Kit/plugins/SystemKit.swift:776-780 \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 \u0060Kit/plugins/SystemKit.swift:684\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7af8ebf49f6fba903de03aa6671c4cd8bc1846419437bcf068db69cc51eed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/types.swift:265-269 | Kit/types.swift:273-277 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/types.swift:265\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":"Kit/types.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"8996002873dc73de659fdbfef4be38ca26130d212682117f7bf63a32a4636973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Bluetooth/popup.swift:38-42 | Modules/Clock/popup.swift:82-86 \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 \u0060Modules/Bluetooth/popup.swift:38\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":"Modules/Bluetooth/popup.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"5adfeefe5741afa5385e575eec77dc2a1e083d0fd4e03531a2c65b29d80d38c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/preview.swift:101-105 | Modules/Net/preview.swift:95-99 \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":"Modules/Disk/preview.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d22b19bda0262925196957f6cb4a0ad2a15d98f955decb0fb64ffa2f66102be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Remote/popup.swift:443-447 | Modules/Remote/popup.swift:453-457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/popup.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3f1484edbe7ce366f13a9fb058ce999a1d4a70114d4469eba6744414540e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Modules/Sensors/values.swift:219-231 | Modules/Sensors/values.swift:236-248 \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 \u0060Modules/Sensors/values.swift:219\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":"Modules/Sensors/values.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee600d466cc91633da325777a073bbfceb5f72de23f49dd273c481082d5d90c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201321 lines \u00D7 16): Modules/CPU/notifications.swift:40-42 | Modules/CPU/notifications.swift:43-44 | Modules/CPU/notifications.swift:48-50 | Modules/CPU/notifications.swift:51-52 | Modules/CPU/notifications.swift:56-58 | Modules/CPU/notifications.swift:59-60 | Modules/CPU/notifications.swift:65-67 | Modules/CPU/notifications.swift:68-69 | Modules/CPU/notifications.swift:73-75 | Modules/CPU/notifications.swift:76-77 | Modules/Disk/notifications.swift:21-41 | Modules/GPU/notifications.swift:21-42 | Modules/RAM/notifications.swift:40-42 | Modules/RAM/notifications.swift:43-44 | Modules/RAM/notifications.swift:48-50 | Modules/RAM/notifications.swift:51-52 \u2014 there are 16 copies across 4 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 16 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/notifications.swift:40\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Modules/CPU/notifications.swift:42\u0060 calls \u0060Double\u0060, \u0060set\u0060 and \u0060Modules/CPU/notifications.swift:52\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/notifications.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e5b1d98ef5f67e13a10a121702c168847a034cdae88bec56ce32f2c9be341eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Kit/Widgets/LineChart.swift:41-54 | Kit/Widgets/NetworkChart.swift:27-40 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6006849ce562458f1ab5491752020417d2070d8e2e94d270b5c10193d82e81a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Mini.swift:33-38 | Kit/Widgets/Stack.swift:46-51 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Mini.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c1d7cb9e6417fe1a660ff2a0b585430259ce2727da60f634179d1ec421bce1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/Stack.swift:434-438 | Modules/Clock/popup.swift:937-941 \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":"Kit/Widgets/Stack.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefac3a9e832f752066594ae13bea52fdfbde21888843ab88c8ad2ba6b3af226"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Stack.swift:440-445 | Modules/Clock/popup.swift:943-948 \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":"Kit/Widgets/Stack.swift"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb8166d0175b8f5badd74d1f88bf670482087f5732399ca8cea1966fad850fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Battery/popup.swift:428-439 | Modules/GPU/popup.swift:260-271 \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":"Modules/Battery/popup.swift"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c057c0709a20d3678150f88d8893f50e848ad0de3dbbf384e2975183b3db82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Modules/Battery/settings.swift:135-141 | Modules/CPU/settings.swift:144-150 | Modules/Disk/settings.swift:190-196 | Modules/Net/settings.swift:295-301 | Modules/RAM/settings.swift:162-168 \u2014 \u0060Modules/Battery/settings.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 45 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/settings.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37fc5f2fa1bc8e92329acf04cd14e996c0749d8cf40c181e1537082dbae5335"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): Modules/CPU/preview.swift:304-309 | Modules/Disk/preview.swift:309-314 | Modules/GPU/preview.swift:251-256 | Modules/Net/preview.swift:258-263 | Modules/RAM/preview.swift:271-276 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf46920011d074ccd67e3d4f41474c9777f9e683e6f4368b26121e4ab8ff5c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Modules/CPU/readers.swift:189-193 | Modules/GPU/reader.swift:407-411 | Modules/RAM/readers.swift:127-131 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Modules/RAM/readers.swift:125\u0060 calls \u0060convention\u0060 and \u0060Modules/CPU/readers.swift:187\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":"Modules/CPU/readers.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"204b0469928923ff67b4c570c77e2907b8e2d77f3d3b9d86d2d6c6f5206c5f3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Modules/Disk/popup.swift:468-472 | Modules/Disk/preview.swift:511-515 | Modules/Disk/preview.swift:596-600 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/popup.swift"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"f058ad6a3555e5abe749fce84f3fca3b06237ca15419f1238c8194a9a272ba27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/settings.swift:224-228 | Modules/Net/settings.swift:372-376 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec01d423a8b8ee66ad7c77821d8d4db92499ff4fd44e5dbf85e32a118312b479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/GPU/portal.swift:24-30 | Modules/RAM/portal.swift:38-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/portal.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9c54b3abfb55d10467c5593444e934983b58a9156cf012ba57eefdb1240d0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/popup.swift:107-113 | Modules/Net/preview.swift:63-69 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"2893227a2a037ec5ff9020d35ed5704ca44e159f45fff73b30654573299b4921"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/popup.swift:115-121 | Modules/Net/preview.swift:71-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97e77859eae1117be3221b3c4bae5db3626c103f8de47e5c01295b57c44c047"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): Modules/Disk/settings.swift:203-207 | Modules/Disk/settings.swift:234-238 | Modules/Disk/settings.swift:239-243 | Modules/RAM/settings.swift:169-173 | Modules/RAM/settings.swift:174-178 | Modules/Sensors/settings.swift:176-180 | Modules/Sensors/settings.swift:181-185 | Modules/Sensors/settings.swift:190-194 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f64cabea3d5cdb20ccf169868cc1ceb5f93eaa78d55ce74dd4fcf4e7f26e2ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/PieChart.swift:127-135 | Kit/Widgets/Tachometer.swift:109-117 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/PieChart.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"83714e3f34282078a863b3b8028681bb15ffcd4433c519a2bd105f67f362edf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/module/window.swift:665-669 | Stats/Views/AppSettings.swift:735-739 \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":"Kit/module/window.swift"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"35983aeb7a8295226aec2567b2cb156fbafae870abeb991f83a7b413820d8ac0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Battery/readers.swift:308-312 | Modules/CPU/readers.swift:232-236 \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":"Modules/Battery/readers.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a5dfac4e3fa19cce485a5652661bd4f0feca37fce01173abded4b820c22e51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/popup.swift:199-206 | Modules/GPU/popup.swift:91-98 \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 \u0060Modules/CPU/popup.swift:199\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":"Modules/CPU/popup.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"651fdbca61f379dfc34fa5218b557b21a9b55b3f9058be214df26345d085dce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:239-243 | Modules/CPU/popup.swift:258-262 \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 \u0060Modules/CPU/popup.swift:239\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":"Modules/CPU/popup.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"0949d0f890754a5caa8ae4e025db1bb1a1b8b4662f18768c16f59f7b13fb6c5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:641-645 | Modules/RAM/popup.swift:396-400 \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 \u0060Modules/CPU/popup.swift:641\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":"Modules/CPU/popup.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"05362f3de57ae56c71f38b41dced1773fc95cd1d800463d221952f79eb583bfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:682-686 | Modules/RAM/popup.swift:410-414 \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 \u0060Modules/CPU/popup.swift:682\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":"Modules/CPU/popup.swift"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c4bfccfc6bde7c8e1e67381c6208c77d240f50d875624af6f34217a5c6dc27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/popup.swift:856-860 | Modules/Disk/preview.swift:505-509 \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 \u0060Modules/Disk/preview.swift:505\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":"Modules/Disk/popup.swift"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8100de6246b9e50cbd1cdbed469111841bebdded7b041f3be7f7b67edcbb5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/settings.swift:229-233 | Modules/Net/settings.swift:377-381 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 58 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87b118e707d22d7a33dd6e758d72f1780ab7a0504168ed7e0884eaa9faab60f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/widget.swift:88-92 | Modules/RAM/widget.swift:105-109 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/RAM/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 36 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/widget.swift:88\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":"Modules/Disk/widget.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a79ff836db7f9a0c531e69222e0d4e215038042ba32adafff2b98c0b98d8941"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/GPU/popup.swift:125-131 | Modules/RAM/popup.swift:189-195 \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":"Modules/GPU/popup.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"04483fb81b43d558e37add4e63c0e428d4963c3a00b6fc4b302ab9dc6b708e55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Stats/Views/Update.swift:187-191 | Stats/Views/Update.swift:261-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Update.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08de7bfd720bb492d7d91898ba23127fbb918cd0c82341a91d402aa35a8d932"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ApplicationSettings (LCOM4 29): ApplicationSettings\u0027s methods fall into 29 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 29 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":"Stats/Views/AppSettings.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9135088b6da4baff28f54d1fb9958d4fa9d3c8991ede41458a9bcd05d13b0e0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SystemKit (LCOM4 9): SystemKit\u0027s methods fall into 9 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 9 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da9647c6bb57eca2012bde925af56279501ba74233e8d5e963af3daba553b58"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SidebarView (LCOM4 8): SidebarView\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Settings.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf4fe9b430808a31ef41fac90ea0f1341d19796c0e43b537a23c6b09c314af2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 7): String\u0027s methods fall into 7 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 7 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":"Kit/extensions.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a6a45160764dfae3a3dfcdbc8c5cd3a65167511b0a12f64177e3b5ad9764f9"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: NSView (LCOM4 7): NSView\u0027s methods fall into 7 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 7 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":"Kit/extensions.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"3812d69673a2b541908d88a545c0fcec5d4fc91c3f2a7a5e9d4dfab31e23df1e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SettingsWindow (LCOM4 6): SettingsWindow\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Settings.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7756c4e85386a151a5b8bf6940ccc28096c68b798fbb3b3cf3afcb0f610f32"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HeaderView (LCOM4 4): HeaderView\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":"Kit/module/popup.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea950e3a910995037b27a6a12050f7c4f28746adbd3a5302605a310c3e97e8f5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CalendarItemView (LCOM4 4): CalendarItemView\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":"Modules/Clock/popup.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d14c1d9a1d1eced71d6e4a82037391036e20c461d044a86dfc5e3aca540d0a6"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: DetailsView (LCOM4 4): DetailsView\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":"Modules/Disk/popup.swift"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"eabbf47bec20f5f665cca6f659857dc0bd00ca2c2055cbd925bf9d76b7a3c6f8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Helper (LCOM4 4): Helper\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":"SMC/Helper/main.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d5bf3f71f0b51b96a616d662cf993b41015fb8e92c7a9fd774dd60a6f2862c1"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SetupWindow (LCOM4 4): SetupWindow\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":"Stats/Views/Setup.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f5f7eaea464209f0b82750d71cb2f94cc76894cd958490f758232f57ac949c"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testIntelAllTwoFanMaskTransitions: 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":"Tests/SMC.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cda900efdde06a499ac2828fbff6a7b8ed3115f2a98dcbf6e8676a0d94385f4"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testIntelMaskPreservesOtherBitsForEverySupportedFan: 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":"Tests/SMC.swift"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"748abf0db34562b6d110c0a17fd6ed01a375ac4247528c908f5151b2968d5a1b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/readers.swift: Modules/Net/readers.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in UsageReader.getDetails at line 481. 9 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/Net/readers.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":"Modules/Net/readers.swift"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"9266d5a8dd819c9fba9653d5259db0b51e7efebb9c72384941a5b38d522e28f2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/GPU/reader.swift: Modules/GPU/reader.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in InfoReader.read at line 102. 3 of those changes were fix/bug commits, and the other 5 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/GPU/reader.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":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe3635e213a94bc5bf09478fb4b19237a0ee17dda9859e5925ad31f8b793e45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/module/widget.swift: Kit/module/widget.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in widget_t.new at line 32. 1 of those changes was a fix/bug commit, 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Kit/module/widget.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":"Kit/module/widget.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74e1c9639e4a099c57ba1f886a4a76effc4181bb4d2042e4fddebe166248070"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Battery/readers.swift: Modules/Battery/readers.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in UsageReader.read at line 74. 5 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/Battery/readers.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":"Modules/Battery/readers.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc74960f209a0f0a4220388a1d32423551339b34a02a91c1c8981ac22329b06"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Disk/readers.swift: Modules/Disk/readers.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in SMARTReader.getATASMART at line 673. 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/Disk/readers.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":"Modules/Disk/readers.swift"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"728f647021fe221d38b1eda4bcb93d71f36153c44922cfba0b57358d6bd741d1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/GPU/main.swift: Modules/GPU/main.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in GPU.infoCallback at line 179. 1 of those changes was a fix/bug commit, 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/GPU/main.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":"Modules/GPU/main.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0dfd67e1fe2f2350bbd1a9edffd001d77f339e6b31610d80fc6b65c757cea19"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/CPU/readers.swift: Modules/CPU/readers.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in LoadReader.read at line 42. 4 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/CPU/readers.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":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"159db1d583bd794eed3d6516e13e753a6e11b900fb0488aef7defe31508a72fd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/RAM/main.swift: Modules/RAM/main.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in RAM.loadCallback at line 154. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/RAM/main.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":"Modules/RAM/main.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"8309f2dbef85f2888b8feec7a21da6842c2c295fd92daff6d1d0c22dd6e3ccd0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/plugins/SystemKit.swift: Kit/plugins/SystemKit.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SystemKit.getPlatform at line 802. 2 of those changes were fix/bug commits, and the other 3 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Kit/plugins/SystemKit.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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa189526731350058f93b9c3c67a5090f71a700347df88e6eea595430ff1641"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Bluetooth/readers.swift: Modules/Bluetooth/readers.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DevicesReader.read at line 111. 2 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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/Bluetooth/readers.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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89931cb17f74b1ed7e08da301652d87182b034a778fd45b1f35272ff19f7954"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/plugins/Charts.swift: Kit/plugins/Charts.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in LineChartView.addValue at line 580. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Kit/plugins/Charts.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":"Kit/plugins/Charts.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b36de50006a17cce90e56326c890db50f141e1b5c7abf7d6568f1dc22ee49d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/notifications.swift: Modules/Net/notifications.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in Notifications.usageCallback at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/Net/notifications.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":"Modules/Net/notifications.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"c415a12e7cf75350b98b43fdfa935ee106af02577edac0a1cd337ba4448590ca"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Stats/Views/CombinedView.swift: Stats/Views/CombinedView.swift changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is CombinedView.togglePopup at line 159), 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: moved popup from NSWindow to NSPanel to prevent window flickering when switching between popups (#3619)\u201D; \u201Cfix: fixed duplicated items in the menu bar when enabled combined modules with single icon and pause the app\u201D; \u201Cfix: another try to fix feft-aligned sensors view in the Combined modules (#3652)\u201D; \u201Cfix: fixed white block in the menu bar when combined modules separator is enabled (#3564)\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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Stats/Views/CombinedView.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":"Stats/Views/CombinedView.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f286fdc4b040b498f3fb5a06547ea42d124f667b1c6983df23f494d886ff6d2"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Modules/RAM/readers.swift: Modules/RAM/readers.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is ProcessReader.parseProcess at line 238), 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: fixed Stack widget width jitter and Speed widget clipping with fixed units (#3708)\u201D; \u201Cfix: fixed RAM process list freezing on truncated UTF-8 process names (#3730)\u201D; \u201Cfix: fixed oversized host_statistics64 count in RAM on older macOS versions (#3688)\u201D; \u201Cfix: fixed mach port leaks in the CPU/RAM readers and the Sensors HID reader\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-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-12 18:02:16 \u002B01:00\u0027 --until=\u00272026-11-10 18:02:16 \u002B01:00\u0027 --full-history --no-merges -- Modules/RAM/readers.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":"Modules/RAM/readers.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"30916af5599d02ae43d35873c19a838ed62695f2b2bc2a647c2d69127dad175b"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"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":"077cd6c75bdfdff7f09eb06b1402cf28960a49bc12db6c26d7a45395f1f957c4"},"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":"eb014e9a9c8f494a8bf527605f8981321c798cab46abec930a09d43bf9ae48c6"},"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":"354b87e304ef66d3e0ed05bc3370cb466aa2e948eec0a7aafbcc3049dea58972"},"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":"ecbaa07e26b85bbd5db3d6ca877d8a7c75033ada2b78b77f3ac392f458943cfa"},"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":"e1f5c24aff521a93b0b1af811253a614b645a49a10ae4c00477dee205425b12c"},"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":"61d787411f9308f7ffa105fc6952b6f916616fabeb8e725d7efbfd9e28fe027d"},"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":"4c4dfada5144b4b5edc296f7ac1ecf4c40a4493de3d493140c8afd4c7109b5d3"},"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":"42a5c0f5d750ec300aa94c34750e7c4278dd680776157cc89a8f3832640293b9"},"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":"74f900a079fdb25cff2229937a800c5d141766f8bd9891237ba6e3304aeda9d7"},"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":"c4c6a9237f24010e2557421cb1fded508604b6f8d0bf17e3cbe53ec613498b55"},"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":"fe047495161232088e2b3c8508442bda1fadcde4fe28f23ec3e60deb2e2deebc"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"4471787f480e185979efd03cb8eb9f4442b68378d3242b947c867eb689748ce2"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"b089e1f3fc9371d43aacceff95282a490ff7e390c639e5af751290b9dd9fb93a"},"taxa":[{"id":"CWE-214","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"6beb5f80b3afd65a6b44c9dcf6cc40369623ece95c1fb3baf730fc6d0cf8f62d"},"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":"3483f19cdadb6d9e6449c4b80524ffb261a3c078c4809873407e2f40fed941da"},"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":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: main.swift \u2194 main.swift: \u0060Modules/CPU/main.swift\u0060 (context CPU) and \u0060Modules/RAM/main.swift\u0060 (context RAM) sit in DIFFERENT parts of the tree yet change together 59% of the time (34 of the 58 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 34 shared commits counted here, the most recent 3 are \u0060a0b1c12e\u0060 feat: added Sensors module support for System Stats and reduced Remot\u2026; \u00605808bf92\u0060 feat: added a top process to all previews (#3480); \u0060810c0528\u0060 feat: batched desktop widget updates and skipped redundant writes and\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"40977cb47421719259bbae8ce89ba9c4eddf707d0b825361a609b8590a24f38c"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: main.swift \u2194 main.swift: \u0060Modules/CPU/main.swift\u0060 (context CPU) and \u0060Modules/GPU/main.swift\u0060 (context GPU) sit in DIFFERENT parts of the tree yet change together 51% of the time (24 of the 47 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 24 shared commits counted here, the most recent 3 are \u0060a0b1c12e\u0060 feat: added Sensors module support for System Stats and reduced Remot\u2026; \u0060810c0528\u0060 feat: batched desktop widget updates and skipped redundant writes and\u2026; \u00601c6bac47\u0060 feat: removed segment_color and moved to the ColorValue \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42323141d8fe3d7e0d08129baeacff5773002b524026e9d1531c6c113166e0b7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: BarChart.swift \u2194 LineChart.swift: \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 change together 53% of the time (16 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are \u00600b847238\u0060 feat: small improvements in the widgets; \u0060a69627f1\u0060 fix: fixed race condition crashes in Chart and Stack widgets (#2944); \u0060a9f72cda\u0060 fix: fixed line and bar charts title labels \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac2526ab93046b9fa9ee18717bb79af20923cb2f4302b68ab8d032f358ce8b5"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: readers.swift \u2194 settings.swift: \u0060Modules/Disk/readers.swift\u0060 and \u0060Modules/Disk/settings.swift\u0060 change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are \u0060053f265b\u0060 fix: fixed Disk activity reader that tries to read IO when disk is ej\u2026; \u006006155bea\u0060 feat: added option to disable SMART reads (#2294); \u0060d810915e\u0060 fix: removed the old way to read the disk capacity because of the ver\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e93ae2b3ead47a3d96ab0febaf918cbec64c9ed335111dd671471cc878c0b2"}},{"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":"9739ac06004000f598da4fd175a92f0d9f5c718b41d35f1b1657c1cae478bb8b"},"taxa":[{"id":"CICD-SEC-6","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":"54b4dd811633186da3d0a073b8e9d0d478c82c3e584ab4fb8a7e40878edc59a9"},"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":"92455338a91920af89dfc4cfdb1b95862934409f20166331786a57fd54c06044"},"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":"0fcfb06257a647509652743d297a1a984a65af88cd3e23ed6b94bc1b85904360"},"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":"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":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"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 6 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.yaml"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"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":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!list.isEmpty \u0026\u0026 !self.emptyView.isHidden\u0060 appears character-identically in 2 files \u2014 Modules/Bluetooth/notifications.swift, Modules/Bluetooth/settings.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":"Modules/Bluetooth/notifications.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"69bda76e687c4e1c8186e6b992ea0e521c1521fa72cf46df0f97fae55e7d09bc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.key.contains(\u0022tap\u0022) || $0.key.contains(\u0022tun\u0022) || $0.key.contains(\u0022ppp\u0022) || $0.key.contains(\u0022ipsec\u0022) || $0.key.contains(\u0022ipsec0\u0022)\u0060 appears character-identically in 2 files \u2014 Modules/Net/readers.swift, Modules/Net/settings.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":"Modules/Net/readers.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6ec0a4f66daaa46e71d07811cf2f3695e74f9cd3e1cd759b38506a10bee7e5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060Provider().systemWidgetsUpdatesState || entry.isPreview\u0060 appears character-identically in 5 files \u2014 Modules/CPU/widget.swift, Modules/Disk/widget.swift, Modules/GPU/widget.swift, Modules/Net/widget.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":"Modules/CPU/widget.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bb04aa110bbd9a4b8395a7dc1c5d3334590e49bfe51cdaa0e5f4f14daeb616"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060command.contains(\u0022com.apple.Virtua\u0022) \u0026\u0026 name.contains(\u0022Docker\u0022)\u0060 appears character-identically in 2 files \u2014 Modules/CPU/readers.swift, Modules/RAM/readers.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":"Modules/CPU/readers.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0420f5ee8ec38cc9ab3794c9fe3fa6cd95e3653717da61af727cc86d9c7ef71"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error is RemoteAuthError || error is CancellationError\u0060 appears character-identically in 2 files \u2014 Kit/plugins/SystemStats.swift, Modules/Remote/main.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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f610a5f2450567110a44f486a105f9343d93a47b07b9efbe9462336378bf8cd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060firstMax == secondMax \u0026\u0026 firstMin != secondMin\u0060 appears character-identically in 2 files \u2014 Modules/Disk/readers.swift, Modules/Net/readers.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":"Modules/Disk/readers.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"b206b9fd05d8c77f2c8ab9cf29aa2f89e2c6f066f6715c8ae25f28a590f26af4"}},{"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":"SMC/Helper/main.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee780eea6ca961e453948470ae919538a90775ecc86837dd8ff7e5a4e8124b3"}},{"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":"Modules/Disk/readers.swift"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8f7b8fb78871dc38f99f13126ead4c4f53f2163988350b80ef9f9e9048a58ee"}},{"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":"Modules/CPU/readers.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2151cab67577289bd18f6d9c04648f07ffc16f841ed383fb4a542ceb05f0f75"}},{"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":"Kit/helpers.swift"},"region":{"startLine":2130}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e217500204bbeef621af7cc4e20360d8fffabd103d7e4b47708d67a992ee8f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060except Exception\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":"Kit/scripts/i18n.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"81d24ef97f817932ac398ac33de2d16fe6beeb06806eaa4f123d029f22632c22"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e7e1a0e5f0575d852ca8fd18fee2581291e9a27272d734c2d4b6b31a2254a8"}}],"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-214","guid":"b10ad120-fb22-1351-9348-aa23b453e815","name":"CWE-214","shortDescription":{"text":"CWE-214"},"helpUri":"https://cwe.mitre.org/data/definitions/214.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-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-532","guid":"1cd8877a-76e8-ce54-b40b-779af23364a0","name":"Insertion of Sensitive Information into Log File","shortDescription":{"text":"Insertion of Sensitive Information into Log File"},"helpUri":"https://cwe.mitre.org/data/definitions/532.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.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":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"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/"},{"id":"A09:2025","guid":"78892bc9-3c98-495d-881c-8af1390d643c","name":"Security Logging \u0026 Alerting Failures","shortDescription":{"text":"Security Logging \u0026 Alerting Failures"},"helpUri":"https://top10.owasp.org/2025/A09_2025-Security_Logging_and_Alerting_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-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":23,"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."]}]}