{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"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":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"PluginMetadata.genereteMetadataString (cyclomatic 39): PluginMetadata.genereteMetadataString has cyclomatic complexity 39 (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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: SwiftBar/Plugin/PluginMetadata.swift holds 2 of the 14 methods over the threshold \u2014 including the worst \u2014 and 41 of the 117 points over it (35%), 2.9\u00D7 the next-largest file (SwiftBar/MenuBar/MenuBarItem.swift at 14). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/Plugin/PluginMetadata.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0feb34199b41512ec4a6c0d01ce876cebde9984938c949dc803813d916aeb13"}},{"ruleId":"D1","level":"warning","message":{"text":"PluginMetadata.parser (cyclomatic 32): PluginMetadata.parser 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: SwiftBar/Plugin/PluginMetadata.swift holds 2 of the 14 methods over the threshold \u2014 including the worst \u2014 and 41 of the 117 points over it (35%), 2.9\u00D7 the next-largest file (SwiftBar/MenuBar/MenuBarItem.swift at 14). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/Plugin/PluginMetadata.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef626c39b41cfaa5bb48dec0af07b2f609d4e705f369d392a15b719928cb221"}},{"ruleId":"D1","level":"warning","message":{"text":"PluginManager.getPluginList (cyclomatic 28): PluginManager.getPluginList 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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"a103d714e5ebf32c2dcb36962c08e8b72510dc8706aff654693ace728ce17945"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.application (cyclomatic 26): AppDelegate.application 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":"SwiftBar/AppDelegate.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"810c658465f6c017873554f3ebc4d265598ce35e80054b656f6f775341765c86"}},{"ruleId":"D1","level":"warning","message":{"text":"AboutPluginView.body (cyclomatic 25): AboutPluginView.body 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":"SwiftBar/UI/AboutPluginView.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae23d29d4cf3fc63bc0bb27ede00b0bfdb7015dbf81201f7f054adaaf93963b"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuLineParameters.getParams (cyclomatic 23): MenuLineParameters.getParams has cyclomatic complexity 23 (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":"SwiftBar/MenuBar/MenuLineParameters.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"199737a9e4318ebd080053bb05ff6e2ec343f6b68d61917bab0763ab01a0c8a0"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuDiff.swift.buildChanges (cyclomatic 22): MenuDiff.swift.buildChanges 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":"SwiftBar/MenuBar/MenuDiff.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea989cbadc0c6f5a69ae181003a67129fea63f2d09832e8697ff8e4068800a51"}},{"ruleId":"D1","level":"warning","message":{"text":"MenubarItem.updateFoldChildren (cyclomatic 21): MenubarItem.updateFoldChildren 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"2267c65339f1c9a7794ecae6f8f08b5f02a4744d5149f88a4b7a208200a125fe"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamablePlugin.invoke (cyclomatic 20): StreamablePlugin.invoke 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":"SwiftBar/Plugin/StreamablePlugin.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b21927892533e288f349d98d29cf842d92cf5eb30b3b5c6074dfde9b5980b3"}},{"ruleId":"D1","level":"warning","message":{"text":"MenubarItem.atributedTitle (cyclomatic 19): MenubarItem.atributedTitle has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1750}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1dcc0a3754ac1c6f3e24c2e939b167b57167867cef5a8c7198587c73591ada6"}},{"ruleId":"D1","level":"warning","message":{"text":"MenubarItem.performItemAction (cyclomatic 19): MenubarItem.performItemAction 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":2016}}}],"partialFingerprints":{"codehealthFindingId/v1":"5811d6dbae5f1ef6d553e076d2d0d0a4556f5fc4cd98bfac386548d4ac7e9a09"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuLineParameters.getImage (cyclomatic 19): MenuLineParameters.getImage 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":"SwiftBar/MenuBar/MenuLineParameters.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c70fc41007d6353b9c057282a197d5b29d3a88d8d4354c72174e38754566f8a"}},{"ruleId":"D1","level":"warning","message":{"text":"[NSAttributedString.Key: Any].attributesForANSICodes (cyclomatic 18): [NSAttributedString.Key: Any].attributesForANSICodes 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":"SwiftBar/Utility/String\u002BANSIColor.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07463babb4b420d6b184afa3bea91faa7e4f977dbc3f89004f57bc61ebf3652"}},{"ruleId":"D1","level":"warning","message":{"text":"RunPluginOperation.main (cyclomatic 16): RunPluginOperation.main has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/Utility/PluginUtilities.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"9957336987c3b6a0ca08c4055e6862c7b34e867bb47f9737e96f662539f379ce"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginMetadata.parser (cognitive 50): PluginMetadata.parser has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 10, ternaries 5 (6 pts), loops 3 (5 pts), error handling 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":"SwiftBar/Plugin/PluginMetadata.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"689260719a19faeae0013a59a7ef3f003edf0ff4f463b95516794e92a0209218"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginManager.getPluginList (cognitive 45): PluginManager.getPluginList has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 5 (6 pts), boolean chains 5 (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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b5961b4e860f4f7a5cc198d35f74e1a881970c002e4dc2eb6762f50e8ce269"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginMetadata.genereteMetadataString (cognitive 44): PluginMetadata.genereteMetadataString has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 13 (39 pts), if/else 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 28). 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":"SwiftBar/Plugin/PluginMetadata.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e1f49a39fa2e30e1f2fe2bd89d89dd28ec50287b1baa3f5b0eaf69c375e963"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.application (cognitive 38): AppDelegate.application has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/AppDelegate.swift"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"394f4d095c89a5394d9cbc01e398ee92507a8f0a4a00395f672f50afd1ce2127"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuDiff.swift.buildChanges (cognitive 38): MenuDiff.swift.buildChanges has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 7 (9 pts), boolean chains 2, 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":"SwiftBar/MenuBar/MenuDiff.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5873c954d285a0c66c7524233188a6d7145ad4d07bb837e6a11372cb95db1b72"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuLineParameters.getParams (cognitive 37): MenuLineParameters.getParams has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 6 (13 pts), boolean chains 10 (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":"SwiftBar/MenuBar/MenuLineParameters.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d550b7123f02bdb7f92fc2d576551e28c09d248fbdae54c20da5480a77ac260"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamablePlugin.invoke (cognitive 37): StreamablePlugin.invoke has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 6, loops 1 (3 pts), error handling 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":"SwiftBar/Plugin/StreamablePlugin.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"610b13f98f6f6b130e41f80ad085ad0f9f9cc7b65e667ea296530e84b5e91faf"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuLineParameters.getImage (cognitive 36): MenuLineParameters.getImage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 5 (13 pts), boolean chains 4, match/switch 1 (4 pts) (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":"SwiftBar/MenuBar/MenuLineParameters.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1ce46a8a721b5d5e7e89e8383a581f256dc6d71f2bd8d7172f26bb87596564c"}},{"ruleId":"D2","level":"warning","message":{"text":"[NSAttributedString.Key: Any].attributesForANSICodes (cognitive 36): [NSAttributedString.Key: Any].attributesForANSICodes has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 2 (7 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":"SwiftBar/Utility/String\u002BANSIColor.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1cf9ad6ff78b356915d00d936e6e2b55ef501d6a0f36009277c9c47baa4c18"}},{"ruleId":"D2","level":"warning","message":{"text":"AboutPluginView.body (cognitive 34): AboutPluginView.body has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 4 (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":"SwiftBar/UI/AboutPluginView.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77971e417c4623f5e0f84ea31b953f16916901478b9f11047449498360a2ebf"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.updateFoldChildren (cognitive 32): MenubarItem.updateFoldChildren has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 5, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a0318a1a2ae36379c95d078cd6db5a020472676899f24f16b4e3bb2fa121b8"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.applyUpdate (cognitive 31): MenubarItem.applyUpdate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 2 (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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":861}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eeda1dcbc4c06ff4b6f7eb2b510a187897f77c98d14457424514188c1878d66"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.applyRemovals (cognitive 27): MenubarItem.applyRemovals has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 2 (5 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ea34fc2a5b0557a7389e77f1e09e5d09de9d15bf3f5a2876ceb45af808fb37"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.performItemAction (cognitive 27): MenubarItem.performItemAction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, error handling 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":2016}}}],"partialFingerprints":{"codehealthFindingId/v1":"17d5d5c577e830377e16d002019b81008c1b49942c82b372d2c6d9290c97d42f"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.buildStandardMenu (cognitive 24): MenubarItem.buildStandardMenu has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"4732393706eeac38adb2d4156b022e6330ee804358e65b87ce821ee7621c251d"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.incrementalUpdateMenu (cognitive 20): MenubarItem.incrementalUpdateMenu has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0ad82e32164d9d65679a0ae2d264f78b658cf0e8a70ebeb7686510d99a0b10"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginManager.currentSystemReport (cognitive 20): PluginManager.currentSystemReport has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 4). 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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"b843eab278337d58d2040c4dc9621be78deddd25d4ca9f1ce9ab95c5aa770805"}},{"ruleId":"D2","level":"warning","message":{"text":"ModernLaunchAtLogin.isEnabled (cognitive 19): ModernLaunchAtLogin.isEnabled has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (6 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":"SwiftBar/Utility/LaunchAtLogin.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b897b888795f59a0e1b27e8b0b7d8941ca23d885a6d9e45e5fa5d591a57570b"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.atributedTitle (cognitive 18): MenubarItem.atributedTitle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 3, loops 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1750}}}],"partialFingerprints":{"codehealthFindingId/v1":"3857c5cc1ae8d1a4d21b7f265b20aeadd57c63b042dd09fcfaa02ca7b8bb9a68"}},{"ruleId":"D2","level":"warning","message":{"text":"Plugin.createSupportDirectory (cognitive 18): Plugin.createSupportDirectory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (4 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":"SwiftBar/Plugin/Plugin.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d24a3fd7b5d1db7a5e8cb9061639291884e4eec7028d92ff0d3023b8a4096bb"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.collectFoldExpansionTransfers (cognitive 17): MenubarItem.collectFoldExpansionTransfers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (5 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1146}}}],"partialFingerprints":{"codehealthFindingId/v1":"360c8084b68c57cb474266a5999f91edebd072077bf4fc8c28a5c32e4aa22a0e"}},{"ruleId":"D2","level":"warning","message":{"text":"MenubarItem.buildFoldChildren (cognitive 17): MenubarItem.buildFoldChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1, 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f712389a80138d4cf2d1522bf0cf8a370658621e850586ab8cb2a87ec7bfbe"}},{"ruleId":"D2","level":"warning","message":{"text":"Process.launchScript (cognitive 17): Process.launchScript has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"SwiftBar/Utility/RunScript.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2243eeeece8afaec7980e75f2c4c2b8071f7cdcfdc740ed2ad33de8a08962d9"}},{"ruleId":"D2","level":"warning","message":{"text":"PaneIdentifier.image (cognitive 17): PaneIdentifier.image has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). 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":"SwiftBar/UI/Preferences/PreferencesView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"8682f82b0378443324ded3ab1ada52244eaf6b98276831317fc5087453abada6"}},{"ruleId":"D2","level":"warning","message":{"text":"RunPluginOperation.main (cognitive 16): RunPluginOperation.main has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). 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":"SwiftBar/Utility/PluginUtilities.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ded22698e4aed59e6f4701f8fd2b80735271d782c63b1f33f3599e28ff5469"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginEntryModalView.body (cognitive 16): PluginEntryModalView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/UI/Plugin Repository/PluginEntryView.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7dea4cbc6a03a6b43dca9c2b3dfc73e5acbcd2b571aeaea0f7f29262d2350e8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MenubarItem: TooManyMethods \u2014 105 methods. The bar is 30 methods; this is 75 over it, 3.50\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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"540ffa7ceb07435a98d35ce2f1ee710f30dc2c5e588ca9c6496fc9e7e660bd9a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBar/MenuBarItem.swift: FileTooLong \u2014 1257 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 757 over it, 2.51\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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b6549b6036b0e291f451ad22ddd0d9ae2e6d2a93514eeec423e901a99543a1e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Plugin/PluginManger.swift: FileTooLong \u2014 777 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 277 over it, 1.55\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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"340c783811530150f7f8eb1bdff5ac83f940809a7d23f1785bd2b7af592b610a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PluginManager: TooManyMethods \u2014 43 methods. The bar is 30 methods; this is 13 over it, 1.43\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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"247f9869058ea0845451cee7f3e7ed617d6aa9436cc9f93404672d7f9d14db91"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PluginManager.currentSystemReport: MethodTooLong \u2014 currentSystemReport runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd11c5e1cb2da928ebeb3258e54ac4b7f649d5d86443107b50c7d14f9fdf5a3a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PluginDetailsView.detailsScrollView: MethodTooLong \u2014 detailsScrollView runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\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":"SwiftBar/UI/Preferences/PluginDetailsView.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"945a2d0004144ebc87716781285e5e07ba360bfa63c446ef7ff868f7eca49fbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201327 lines \u00D7 2): SwiftBar/Plugin/ExecutablePlugin.swift:122-148 | SwiftBar/Plugin/PackagedPlugin.swift:211-229 \u2014 before extracting anything, compare \u0060SwiftBar/Plugin/ExecutablePlugin.swift\u0060 and \u0060SwiftBar/Plugin/PackagedPlugin.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bfc4b098050407a1ebbf0c333b67aed551829662612ba0812e36c79ccf5d8bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201324 lines \u00D7 2): SwiftBar/Plugin/PackagedPlugin.swift:296-316 | SwiftBar/Plugin/Plugin.swift:331-354 \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 \u0060SwiftBar/Plugin/PackagedPlugin.swift:296\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":"SwiftBar/Plugin/PackagedPlugin.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"2624c601fd3ac998a04adffdd75cb12357dfa75ad17710ea67985b8f17abb806"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): SwiftBar/UI/Plugin Repository/PluginRepositoryView.swift:45-60 | SwiftBar/UI/Plugin Repository/PluginRepositoryView.swift:91-107 \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 \u0060SwiftBar/UI/Plugin Repository/PluginRepositoryView.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. 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":"SwiftBar/UI/Plugin Repository/PluginRepositoryView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"917047561c976ede5de0dd7a7a7d146ab0492853a81536979f6f3bb08063ebe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): SwiftBar/Plugin/ExecutablePlugin.swift:80-94 | SwiftBar/Plugin/PackagedPlugin.swift:166-180 \u2014 before extracting anything, compare \u0060SwiftBar/Plugin/ExecutablePlugin.swift\u0060 and \u0060SwiftBar/Plugin/PackagedPlugin.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 \u0060SwiftBar/Plugin/ExecutablePlugin.swift:80\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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"3509be614e24f7ca64e57502e7e89d2167e850f8ce2e894495886a8c4bdbbd99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): SwiftBar/Plugin/ExecutablePlugin.swift:150-162 | SwiftBar/Plugin/PackagedPlugin.swift:231-243 | SwiftBar/Plugin/ShortcutPlugin.swift:106-118 \u2014 before extracting anything, compare \u0060SwiftBar/Plugin/ExecutablePlugin.swift\u0060 and \u0060SwiftBar/Plugin/PackagedPlugin.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 \u0060SwiftBar/Plugin/ExecutablePlugin.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060SwiftBar/Plugin/ExecutablePlugin.swift:164\u0060 calls \u0060refreshPluginMetadata\u0060 and \u0060SwiftBar/Plugin/ShortcutPlugin.swift:120\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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"060f309c42106d4b727c036f9b1b2eaed5a37d19e6a5534a138850f64ec9a99f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): SwiftBar/Plugin/ExecutablePlugin.swift:69-77 | SwiftBar/Plugin/PackagedPlugin.swift:99-110 \u2014 before extracting anything, compare \u0060SwiftBar/Plugin/ExecutablePlugin.swift\u0060 and \u0060SwiftBar/Plugin/PackagedPlugin.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 \u0060SwiftBar/Plugin/ExecutablePlugin.swift:69\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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef72fa30b864aa500443c3aefa1d4ab4cdd76ad1ea92216e8ed8f268796ec7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): SwiftBar/Utility/RunScript.swift:171-181 | SwiftBar/Utility/RunScript.swift:217-228 \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 \u0060SwiftBar/Utility/RunScript.swift:171\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":"SwiftBar/Utility/RunScript.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"2161728b3f44a3a0e648aaf9ceefe843cc22f43c6c864069ab3778a7fd6d3174"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): SwiftBar/UI/Plugin Repository/PluginEntryView.swift:16-26 | SwiftBar/UI/Plugin Repository/PluginEntryView.swift:117-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/UI/Plugin Repository/PluginEntryView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a748bb3bcdc72085d256d888107b093051b2bae571fb1bd96aaf0c3f1c1da72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): SwiftBar/UI/Plugin Repository/PluginEntryView.swift:44-52 | SwiftBar/UI/Plugin Repository/PluginEntryView.swift:166-174 | SwiftBar/UI/Plugin Repository/PluginEntryView.swift:179-187 \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 \u0060SwiftBar/UI/Plugin Repository/PluginEntryView.swift:44\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":"SwiftBar/UI/Plugin Repository/PluginEntryView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4240300af7e9b97b11881e32d34362f9639f1a63f1bb7fe8d64ee5629dc710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftBar/Plugin/ExecutablePlugin.swift:178-183 | SwiftBar/Plugin/PackagedPlugin.swift:261-266 \u2014 before extracting anything, compare \u0060SwiftBar/Plugin/ExecutablePlugin.swift\u0060 and \u0060SwiftBar/Plugin/PackagedPlugin.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f8262dedc913acc585f1ce11536e40c0c0b8330435515d3a2ef65192c71165"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): SwiftBar/Plugin/PackagedPlugin.swift:288-293 | SwiftBar/Plugin/Plugin.swift:324-329 \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 \u0060SwiftBar/Plugin/PackagedPlugin.swift:288\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":"SwiftBar/Plugin/PackagedPlugin.swift"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a73bdc65975480ac24b139026466c5e238f9ff01d9388825f7c47f75b13d6b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): SwiftBar/MenuBar/MenuBarItem.swift:1248-1253 | SwiftBar/MenuBar/MenuBarItem.swift:1815-1819 \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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3410809343dfefcb9d98ad975940db79d9221679aa6b84a23ea64d8efd22b5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MenubarItem (LCOM4 18): MenubarItem\u0027s methods fall into 18 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 18 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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb367da7695486e4b3cf0e8f788ab7a7f0aa4542003b51ea65cea394894747b0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 8): String\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":"SwiftBar/Plugin/PluginMetadata.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2b3f4afc04ce998229b61b0dd5e27d474723f621866f2b65a8d2f510133b8b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 6): AppDelegate\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/AppDelegate.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"d351d469b311fb333204f26832df6f831f1448479c8f848ad381e075365e61bf"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PluginManager (LCOM4 5): PluginManager\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"4699ee2267652fa862c1f16620007302edb1e998b510b265103ef4b336123eda"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppMenu (LCOM4 4): AppMenu\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":"SwiftBar/AppDelegate\u002BMenu.swift"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f34ddc6d84eb9dd4eac87dbc5e5c40f66c2521ba3c540faa986842975e00cf"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ShortcutsManager (LCOM4 4): ShortcutsManager\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":"SwiftBar/Utility/ShortcutsManager.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ee3b75316d0a8aa3acd1b0b167a43e43e5ced25dd7817b7a093668b065af1e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: URL (LCOM4 4): URL\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":"SwiftBar/Plugin/PluginManger.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"34cfd5380a5bf92dd726a4a08e3db8c715ea6b55349239ec5dfe1f4cb69af7eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: SwiftBar/MenuBar/MenuBarItem.swift: SwiftBar/MenuBar/MenuBarItem.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in MenubarItem.applyUpdate at line 861. 13 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/MenuBar/MenuBarItem.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":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":861}}}],"partialFingerprints":{"codehealthFindingId/v1":"525b72614b47f5ce7962908b86218776716eb0cbdf02fb44f93f9820b6243354"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: SwiftBar/UI/AboutPluginView.swift: SwiftBar/UI/AboutPluginView.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in AboutPluginView.body at line 6. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/UI/AboutPluginView.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":"SwiftBar/UI/AboutPluginView.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b1aa07d0dfcf2f91bca194ab43c04ab64d506af0663e54fe90d6ccc6309381"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: SwiftBar/MenuBar/MenuLineParameters.swift: SwiftBar/MenuBar/MenuLineParameters.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MenuLineParameters.getImage at line 320. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/MenuBar/MenuLineParameters.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":"SwiftBar/MenuBar/MenuLineParameters.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"70c0ddcbc980d6c424a9aa99bd0687599946649d8754e7ee9283ec6518f43078"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: SwiftBar/Utility/PluginUtilities.swift: SwiftBar/Utility/PluginUtilities.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in RunPluginOperation.main at line 81. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/Utility/PluginUtilities.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":"SwiftBar/Utility/PluginUtilities.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"7acff424d616ca71e12e6c73bf2d279c634a83e15f32991a3d4667bd4cca86db"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: SwiftBar/Plugin/PackagedPlugin.swift: SwiftBar/Plugin/PackagedPlugin.swift changed 5 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 PackagedPlugin.findMainExecutable at line 115), 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(plugin): retry wake-triggered runs that race the resuming network (#573)\u201D; \u201Cfix(plugins): restore filename URL lookup compatibility (#528)\u201D; \u201Cfix(plugins): restore support directory compatibility (#524)\u201D; \u201Cfix(plugins): re-arm refresh timers after cancellation (#489)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/Plugin/PackagedPlugin.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":"SwiftBar/Plugin/PackagedPlugin.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39f99f329da40f8eb31ec2a15bd61d22db119134abdbd7ee0c8832ba444c267"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: SwiftBar/Plugin/Plugin.swift: SwiftBar/Plugin/Plugin.swift changed 5 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 9 (its worst body is Plugin.createSupportDirectory at line 269), 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(plugin): retry wake-triggered runs that race the resuming network (#573)\u201D; \u201Cfix(plugin): exclude sleep time from staleness checks (#561)\u201D; \u201Cfix(plugins): restore filename URL lookup compatibility (#528)\u201D; \u201Cfix(plugins): restore support directory compatibility (#524)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/Plugin/Plugin.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":"SwiftBar/Plugin/Plugin.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3dfb9662dbc74e65ca02d68cd09c50026137e4965a3bd6345aaece146b24924"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: SwiftBar/Plugin/ExecutablePlugin.swift: SwiftBar/Plugin/ExecutablePlugin.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is ExecutablePlugin.start at line 122), 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(plugin): retry wake-triggered runs that race the resuming network (#573)\u201D; \u201Cfix(plugins): restore support directory compatibility (#524)\u201D; \u201Cfix(plugins): re-arm refresh timers after cancellation (#489)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-01 12:59:18 -04:00\u0027 --until=\u00272026-09-29 12:59:18 -04:00\u0027 --full-history --no-merges -- SwiftBar/Plugin/ExecutablePlugin.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":"SwiftBar/Plugin/ExecutablePlugin.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fd761269e62ac59ca3d5eb8827cc185aed1d6703f86b4262338481fee5dfbc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Preferences should be shown as a standalone window. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/MenuBar/MenuBarItem.swift"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"4782b656bafa22407fa3b039167908dc01522cfbd1f1187259dfc1aed55c094d"}},{"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":"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":"M3","level":"note","message":{"text":"No src/ separation: Production code isn\u0027t grouped under a src/ folder \u2014 it\u0027s spread across several top-level directories, so there\u0027s no one place that says \u0027this is the product\u0027."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README advertises a RAG / ML engine, but no ML/RAG code or dependency exists \u2014 searched for: \u0060rag\u0060, \u0060langchain\u0060, \u0060llamaindex\u0060, \u0060pinecone\u0060, \u0060weaviate\u0060, \u0060qdrant\u0060, \u0060embeddings\u0060. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README\u0027s own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read \u2014 a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"343bbbd51ceb8de7a9ff88d79f7c797abf9b5921f8727b67b4d0f4f8a22c5e49"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060shellPath.hasSuffix(\u0022tcsh\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060shellPath.hasSuffix(\u0022tcsh\u0022)\u0060 also satisfies \u0060shellPath.hasSuffix(\u0022csh\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SwiftBar/AppShared.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1f73ea07007c93db0c4aff9d4dcca035137c6a2e0ce48e714269b2725cf362"}}],"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-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-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":0,"secretScannerRunsExcluded":0}}}]}