{"$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":"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":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D22","name":"Internal API Consistency","shortDescription":{"text":"Internal API Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D22"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"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":"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":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"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":"YPLibraryVC.selectedMedia (cyclomatic 24): YPLibraryVC.selectedMedia 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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b49257e26e2c087c2a9863dae0db4ff3a04748cb0f38daecbda20208e82a9c8"}},{"ruleId":"D1","level":"warning","message":{"text":"PanGestureHelper.panned (cyclomatic 22): PanGestureHelper.panned 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":"Source/Pages/Gallery/YPLibraryVC\u002BPanGesture.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb0b676a8d2f4b999f955f2417e4aa4660a19883f72718e5823db26e4e4ba24"}},{"ruleId":"D1","level":"warning","message":{"text":"YPPickerVC.viewDidLoad (cyclomatic 17): YPPickerVC.viewDidLoad 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":"Source/YPPickerVC.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"23e93c2ae71b82c586b9bfa103d2b1566ad403fd1db14f84ec297c7c54233fd8"}},{"ruleId":"D2","level":"warning","message":{"text":"YPLibraryVC.selectedMedia (cognitive 46): YPLibraryVC.selectedMedia has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (30 pts), match/switch 4 (9 pts), loops 3 (6 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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca81e6e0156323ad16250f53e3e18222baf80dabea4cd8fdb4acbe473e131038"}},{"ruleId":"D2","level":"warning","message":{"text":"PanGestureHelper.panned (cognitive 33): PanGestureHelper.panned has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 6, match/switch 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). 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":"Source/Pages/Gallery/YPLibraryVC\u002BPanGesture.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6b38398853d3e93d6fa1b0b709071d949eca4b7cd7e69ca7649c511f1d2e87"}},{"ruleId":"D2","level":"warning","message":{"text":"YPImagePicker.viewDidLoad (cognitive 28): YPImagePicker.viewDidLoad has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 2 (3 pts), boolean chains 2 (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":"Source/YPImagePicker.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"99291bad8cf1f0380176641736dfb67f68346eb6c6961d6f9308b032f8cb645a"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryMediaManager.fetchVideoUrlAndCropWithDuration (cognitive 27): LibraryMediaManager.fetchVideoUrlAndCropWithDuration has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (2 pts), error handling 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":"Source/Pages/Gallery/LibraryMediaManager.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ff6d1f75e5d9a2450965333a23d5cb595cd1d81d62cbd123d1d04c20628abc"}},{"ruleId":"D2","level":"warning","message":{"text":"YPPickerVC.viewDidLoad (cognitive 20): YPPickerVC.viewDidLoad has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Source/YPPickerVC.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"62891894ec402748446937ac24a3d99f54c1ba4a96f7ce78cf93ae3eff468650"}},{"ruleId":"D2","level":"warning","message":{"text":"YPPhotoCaptureHelper.photoCaptureSettings (cognitive 19): YPPhotoCaptureHelper.photoCaptureSettings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (3 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":"Source/Pages/Photo/YPPhotoCaptureHelper.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d50a6fc97934b76602b4f08da63b8dc2a8487282f9d67bda69779c34792a9a4"}},{"ruleId":"D2","level":"warning","message":{"text":"YPVideoCaptureHelper.setupCaptureSession (cognitive 16): YPVideoCaptureHelper.setupCaptureSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 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":"Source/Pages/Video/YPVideoCaptureHelper.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ecc3ee1a4024f0b1fdcb07b16eaa1721ea5d35a9b5d2816e5078f25df76662a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: YPLibraryVC.isLimitExceeded: MethodTooLong \u2014 isLimitExceeded runs 381 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 281 over it, 3.81\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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"f953bc6fe3a42ece5c397550822a7dc20376ace17caa1bb6945abc59dbe72f9b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: YPLibraryVC: TooManyMethods \u2014 48 methods. The bar is 30 methods; this is 18 over it, 1.60\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b020546cd054aa3c3f197e35a5d6a5c131dc7e8b7dd3e9b56e3905bb0f56cff"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: YPLibraryVC.selectedMedia: MethodTooLong \u2014 selectedMedia runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a64f7f7a117944e76f1adb2138e73dafacfc1c5db6d4d35305b7ca0b1f23682"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): Source/Pages/Photo/YPPhotoCaptureHelper.swift:82-103 | Source/Pages/Video/YPVideoCaptureHelper.swift:124-145 \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 \u0060Source/Pages/Photo/YPPhotoCaptureHelper.swift:82\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"Source/Pages/Photo/YPPhotoCaptureHelper.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"91eedba917c88ccd70a5c2f2bc93fa1fb3d72fd671be487325a3c97397fda61e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Source/Pages/Photo/YPPhotoCaptureHelper.swift:226-241 | Source/Pages/Video/YPVideoCaptureHelper.swift:60-75 \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 \u0060Source/Pages/Photo/YPPhotoCaptureHelper.swift:226\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":"Source/Pages/Photo/YPPhotoCaptureHelper.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb87dba7d0f49a9487eb35a29a14fcecfa3d5e405f9f6566f6ddc4d7c011e240"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Source/Helpers/YPAlerts.swift:15-28 | Source/Helpers/YPAlerts.swift:33-46 \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 \u0060Source/Helpers/YPAlerts.swift:15\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":"Source/Helpers/YPAlerts.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a577a76d0371ba198e83fba878e78ee602b54248afc6703a06057fadff01f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Source/Filters/Photo/YPPhotoFiltersVC.swift:105-112 | Source/Filters/Video/YPVideoFiltersVC.swift:142-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Source/Filters/Video/YPVideoFiltersVC.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"d917f56c3130615871a177ab0832911e88906e7fe051422b1533d9d87e3d8e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Source/Helpers/Extensions/PHCachingImageManager\u002BExtensions.swift:37-42 | Source/Pages/Gallery/YPLibraryVC.swift:411-416 \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":"Source/Helpers/Extensions/PHCachingImageManager\u002BExtensions.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd15b7b72e955a1b2bf68534d48eb8a87093621e92d736cddbb837f06b0b94f"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: YPAssetViewContainer (LCOM4 6): YPAssetViewContainer\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":"Source/Pages/Gallery/YPAssetViewContainer.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"16e955c6e37d101d280a0ff4e28f149a38816b81f7402a86830847b425c256d0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: YPPhotoCaptureHelper (LCOM4 5): YPPhotoCaptureHelper\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":"Source/Pages/Photo/YPPhotoCaptureHelper.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77dbdf1b1b13e8448d2f98f7e8cb74158aa6f31df01d23a4ca185922aee7c37"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: YPAssetZoomableView (LCOM4 4): YPAssetZoomableView\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":"Source/Pages/Gallery/YPAssetZoomableView.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60c217a6a9f4d5ad7a9dfb30f9a982ebc66a6790f6b9e96d7688ebcc14087f0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: YPLibraryVC (LCOM4 4): YPLibraryVC\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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"32e2704c1a6aee3f08445d4390090b62077723cf0a365603f30432e7b4c2c12e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: YPPickerVC (LCOM4 4): YPPickerVC\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":"Source/YPPickerVC.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"74edde0321bf436f30f2cb996938196b4c3e96771dcf388d1a4352eeb49cb48e"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D9","level":"note","message":{"text":"No tests found: No test suite could be collected \u2014 no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (XCTest or Swift Testing) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9bf64cbb5a4ae13d6bcd01fa3bc8d2879d860c73bc67f176ee3c2cecb8adce3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Source/Pages/Gallery/YPLibraryVC.swift: Source/Pages/Gallery/YPLibraryVC.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in YPLibraryVC.selectedMedia at line 446. 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-04-29..2026-07-28, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-04-29 18:57:15 \u002B03:00\u0027 --until=\u00272026-07-28 18:57:15 \u002B03:00\u0027 --full-history --no-merges -- Source/Pages/Gallery/YPLibraryVC.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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"52dd0bd0fbab04d346fad71efb5cd3623cfdc87b262657d21ad3d78a0af882ce"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: Source/Pages/Gallery/YPLibraryVC\u002BCollectionView.swift, Source/Pages/Photo/YPPhotoCaptureHelper.swift, Source/YPImagePicker.swift, Source/Pages/Photo/YPCameraVC.swift, Source/Pages/Gallery/Album/YPAlbumVC.swift, Source/Helpers/YPPhotoSaver.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"58527f154a20b0f7cf9bebc0d79c4a8b6c74da6d0d55dc0fe239c040c8c56a38"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO remove to enable changing selection while loading but needs cancelling previous image requests. \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":"Source/YPPickerVC.swift"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30957b6ba3641013f4aeaea2a5ab6ac7b09dc366455db481480f1bbe6654b33"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Zoom where the fingers are (more user friendly) \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":"Source/Filters/Crop/YPCropVC.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"7689ccb8c8767b96d9b598723769c6e6f7efe8a64671a686cb91161a00a7ec6d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Now the trimmer framework doesn\u0027t support an easy way to do this. \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":"Source/Filters/Video/YPVideoFiltersVC.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f62a98e0b093588da97d91c6d83328fb73c10eb2ffdb4a9c8b260e5c47857b56"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: sort the array based on the initial order of the assets in selectedAssets \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":"Source/Pages/Gallery/YPLibraryVC.swift"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1fd1e3a9dc2f1b25b52cadcb7251edbb1203f70dc4f1204194cbdebec926c09"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Add tap gesture to play/pause. Add double tap gesture to square/unsquare \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":"Source/Pages/Gallery/YPAssetViewContainer.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee9505f1e9ac4df772f8306768b732b36a8f72ebd7b8ab240f9845ebabc7b5f"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D22","level":"warning","message":{"text":"Duplicate configuration properties with inconsistent naming conventions (US vs UK spelling) and scope. The color is defined both in the global \u0060YPColors\u0060 struct (as \u0060bottomMenuItemSelectedTextColor\u0060) and redundantly in the main \u0060YPImagePickerConfiguration\u0060 struct (as \u0060bottomMenuItemSelectedTextColour\u0060).: Remove the properties from \u0060YPImagePickerConfiguration\u0060. Rely solely on \u0060YPColors.bottomMenuItemSelectedTextColor\u0060 for theming consistency. If specific override is needed, ensure the naming convention matches the rest of the codebase (preferably \u0060Color\u0060 for consistency with other \u0060UIColor\u0060 properties). (signatures: YPImagePickerConfiguration.bottomMenuItemSelectedTextColour: UIColor | YPImageConfiguration.bottomMenuItemSelectedTextColor: UIColor)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3c14a39a2eea22843d118cdf596bdb2ca739d88eec3fb51ad8ec1c3f936171be"}},{"ruleId":"D22","level":"warning","message":{"text":"Duplicate configuration properties with inconsistent naming conventions (US vs UK spelling) and scope. The color is defined both in the global \u0060YPColors\u0060 struct (as \u0060bottomMenuItemUnselectedTextColor\u0060) and redundantly in the main \u0060YPImagePickerConfiguration\u0060 struct (as \u0060bottomMenuItemUnSelectedTextColour\u0060).: Remove the properties from \u0060YPImagePickerConfiguration\u0060. Rely solely on \u0060YPColors.bottomMenuItemUnselectedTextColor\u0060 for theming consistency. Ensure naming uses \u0027Unselected\u0027 (US spelling) to match \u0060YPColors\u0060. (signatures: YPImagePickerConfiguration.bottomMenuItemUnSelectedTextColour: UIColor | YPImageConfiguration.bottomMenuItemUnselectedTextColor: UIColor)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b5ad88d6129afc3ade62256d4eee8a2aba353a8b0d2c29252eab56f4d411c47e"}},{"ruleId":"D22","level":"warning","message":{"text":"Confusingly similar boolean flags with overlapping intent. \u0060onlySquare\u0060 and \u0060isSquareByDefault\u0060 exist in library config, while \u0060onlySquareImagesFromCamera\u0060 exists in the root config. It is unclear if \u0060onlySquare\u0060 applies to camera or library, or if they are mutually exclusive. The naming \u0060onlySquare\u0060 vs \u0060onlySquareImagesFromCamera\u0060 is inconsistent.: Clarify the scope of square constraints. If \u0060onlySquare\u0060 applies to the library, rename it to \u0060libraryOnlySquare\u0060. If \u0060onlySquareImagesFromCamera\u0060 is the camera-specific constraint, ensure the library config doesn\u0027t have a conflicting or ambiguous \u0060onlySquare\u0060 property. Consider unifying under a \u0060CropConfiguration\u0060 or similar struct. (signatures: YPConfigLibrary.onlySquare: Bool | YPConfigLibrary.isSquareByDefault: Bool | YPImagePickerConfiguration.onlySquareImagesFromCamera: Bool)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"862a7641ec129751a8b36dc1bcd84a3e0905824fb8110dcd54058103b97221be"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (7336 LoC, 37 public types across 11 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 9 of 38 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 38 of the 84 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: Source/YPPickerVC.swift, Source/Pages/Video/YPVideoCaptureVC.swift, Source/Filters/Crop/YPCropVC.swift, Source/Filters/Crop/YPCropView.swift, Source/Helpers/Extensions/UIImage\u002BExtensions.swift, Source/SelectionsGallery/YPSelectionsGalleryView.swift, Source/Pages/Gallery/YPLibraryViewCell.swift, Source/Helpers/YPDeviceOrientationHelper.swift (and 1 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"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":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-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}}}]}