{"$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":"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":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"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":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"]}},{"id":"D33","name":"JS/npm Dependency Vulnerabilities","shortDescription":{"text":"JS/npm Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D33","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}},{"id":"D40","name":"Network Egress Confinement","shortDescription":{"text":"Network Egress Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D40"},{"id":"D41","name":"Kernel \u0026 Syscall Confinement","shortDescription":{"text":"Kernel \u0026 Syscall Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D41"},{"id":"D42","name":"Runtime Threat Enforcement","shortDescription":{"text":"Runtime Threat Enforcement"},"helpUri":"https://codehealth.canine.dev/dimensions/D42"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"appStateManager.CompareAppState (cyclomatic 95): appStateManager.CompareAppState has cyclomatic complexity 95 (threshold 15). Of this number, 94 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"8171b5af8c2a1db6a06e5a2ad6916a21bf6a07e96ea916e0d53f76a5415d5581"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationSyncCommand (cyclomatic 69): commands.NewApplicationSyncCommand has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 1 of the 69 points is its own statement and the rest belongs to one function literal inside it that branches (line 1763). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"4079001ca310a72fd03a4aa289634347b116ebe445fa3203beaebc139ba63eda"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.NewImportCommand (cyclomatic 65): admin.NewImportCommand has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 1 of the 65 points is its own statement and the rest belongs to one function literal inside it that branches (line 175). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4d664cfc2a4ed38cfb1b2f4880a09c0d4f18a9ba261b9e7dac34ed08ac1005"}},{"ruleId":"D1","level":"warning","message":{"text":"syncContext.Sync (cyclomatic 59): syncContext.Sync has cyclomatic complexity 59 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 16 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"7607e1a07977d6d4802e6a4dc9e7e20b105b29566ed90a461fb4e7e1e0482cfa"}},{"ruleId":"D1","level":"warning","message":{"text":"kustomize.Build (cyclomatic 58): kustomize.Build has cyclomatic complexity 58 (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":"util/kustomize/kustomize.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"8240797dc82fd346c44fdadc6098b8cc70c087f343e8e774e2e8402135ed3e84"}},{"ruleId":"D1","level":"warning","message":{"text":"util.ConstructSource (cyclomatic 54): util.ConstructSource has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to one function literal inside it that branches (line 680). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/util/app.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6973fd031aead57d15cba49cfa1b3524b2f5a78cabc75bda9ed3aebd3585fa2"}},{"ruleId":"D1","level":"warning","message":{"text":"appStateManager.SyncAppState (cyclomatic 51): appStateManager.SyncAppState has cyclomatic complexity 51 (threshold 15). Of this number, 44 points are the body\u0027s own statements and 7 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sync.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e9dccf2b3721cdc1b1a4e994fb63926ef07527649499d6ff5b90447bdda8183"}},{"ruleId":"D1","level":"warning","message":{"text":"Handler.ServeHTTP (cyclomatic 51): Handler.ServeHTTP has cyclomatic complexity 51 (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":"server/badge/badge.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d936ca868ab2bcb0f9ead152dd4a8eee83b94688eb16f81aa9c2927e2c7c20a"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationSetReconciler.Reconcile (cyclomatic 50): ApplicationSetReconciler.Reconcile has cyclomatic complexity 50 (threshold 15). Of this number, 48 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5d1c604f560eb5e7734f8bf136c4029ec9b21e16fb1dda2faadce349c6efe3"}},{"ruleId":"D1","level":"warning","message":{"text":"syncContext.getSyncTasks (cyclomatic 47): syncContext.getSyncTasks has cyclomatic complexity 47 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c7ec130382f307ede140b281989d056cceb29353d6c2180524bf3cd78026efc"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.populatePodInfo (cyclomatic 46): cache.populatePodInfo has cyclomatic complexity 46 (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":"controller/cache/info.go"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"828ed8c00f191d1addf0cf8d708725b6efc789eee39d1a6794af841d48b863c4"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.ServerSideDiff (cyclomatic 46): Server.ServerSideDiff has cyclomatic complexity 46 (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":"server/application/application.go"},"region":{"startLine":2983}}}],"partialFingerprints":{"codehealthFindingId/v1":"426e0d48edd8c2ac508951337dde130800f472786f2f7b387b5efc42966ae2db"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.unset (cyclomatic 44): commands.unset has cyclomatic complexity 44 (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":"cmd/argocd/commands/app.go"},"region":{"startLine":1063}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e511f218224dd2b3dc2bb3ba4bd549b437ad0d3415596d98e3571f87f3b6d96"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.finalizeApplicationDeletion (cyclomatic 44): ApplicationController.finalizeApplicationDeletion has cyclomatic complexity 44 (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":"controller/appcontroller.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0678dbb689516dc7c07de789b6ef34bf40b4cac85dec508eebacffa042ed6c"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.processRequestedAppOperation (cyclomatic 43): ApplicationController.processRequestedAppOperation has cyclomatic complexity 43 (threshold 15). Of this number, 28 points are the body\u0027s own statements and 15 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1518}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea74968964323ff2532d4ae79b4e3ccfd174369d29e195d3f5a505cfd804220"}},{"ruleId":"D1","level":"warning","message":{"text":"apiclient.NewClient (cyclomatic 43): apiclient.NewClient has cyclomatic complexity 43 (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":"pkg/apiclient/apiclient.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bcd2b5c04c102486d394006b583ba0bf68f3864fa02f431330fbf15484895ea"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cyclomatic 42): commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 1 of the 42 points is its own statement and the rest belongs to one function literal inside it that branches (line 378). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e551340bb7121556a49dc3ed4d43177a77411522f930d044eb72a9cbc705952"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.runRepoOperation (cyclomatic 42): Service.runRepoOperation has cyclomatic complexity 42 (threshold 15). Of this number, 37 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a6ea098786742ec16d89a76bf065fb337714e6f8ec078fe302a21bf3c4f013"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.processAppRefreshQueueItem (cyclomatic 41): ApplicationController.processAppRefreshQueueItem has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6d3d96aa8080892f4408b77a919a4cfff36f5ec0ea508c2b0cb7f7facfafbe"}},{"ruleId":"D1","level":"warning","message":{"text":"util.SetAppSpecOptions (cyclomatic 39): util.SetAppSpecOptions has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 207). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/util/app.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"93da48424e01c4aa84309acdedc90b146f8ae1720c8e39f7373753b99c2dc51b"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.populateIngressInfo (cyclomatic 39): cache.populateIngressInfo 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/info.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02cc9327471343cc8346394548d71f282d32670eb6f3aa66123bda321e05250"}},{"ruleId":"D1","level":"warning","message":{"text":"AppProject.ValidateProject (cyclomatic 39): AppProject.ValidateProject 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/app_project_types.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb96ef10bfbf042dc1904821dc78a342023c0ae836b0c42145321b837fb27f71"}},{"ruleId":"D1","level":"warning","message":{"text":"db.CreateRepoCertificate (cyclomatic 39): db.CreateRepoCertificate 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/certificate.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"75b9b0ad76bc2e3472cec9f36cbabe0429379542c0b0220f0a3c24d6fa8d15ed"}},{"ruleId":"D1","level":"warning","message":{"text":"Render.deeplyReplaceWithFilter (cyclomatic 38): Render.deeplyReplaceWithFilter has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/utils/utils.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"21362b067d74910f6030f195b681c7137eaee981b8c94a9629136bdba2bcaa15"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.waitOnApplicationStatus (cyclomatic 37): commands.waitOnApplicationStatus has cyclomatic complexity 37 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 13 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2357}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9be7692f8bb8157e80ddd1775d51bfb3e11b3fae33bdc21706ae2da6628b7f"}},{"ruleId":"D1","level":"warning","message":{"text":"appStateManager.GetRepoObjs (cyclomatic 37): appStateManager.GetRepoObjs has cyclomatic complexity 37 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"55348340e9884c01950d5aa76006c12660a0fa1e7ec53bb8de49010265e1c741"}},{"ruleId":"D1","level":"warning","message":{"text":"SCMProviderGenerator.GenerateParams (cyclomatic 35): SCMProviderGenerator.GenerateParams has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/scm_provider.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b98be48d7fc06cb890b48422fbad0a5f4d4622e64095218d3386af8c2ad84c53"}},{"ruleId":"D1","level":"warning","message":{"text":"WebhookHandler.shouldRefreshMatrixGenerator (cyclomatic 34): WebhookHandler.shouldRefreshMatrixGenerator has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/webhook/webhook.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb591296377099359b4c4554e7c81f620f8e073d6e4e3ba47d1c89982b66e1d"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.PodLogs (cyclomatic 34): Server.PodLogs has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1856}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc4538384858c1982b98d9e303475b3b5a181b5a525ecf4f454b445c5ce1547"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDWebhookHandler.HandleEvent (cyclomatic 33): ArgoCDWebhookHandler.HandleEvent has cyclomatic complexity 33 (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":"util/webhook/webhook.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb8f1f85c65ba7e1418c459d99ee6faeec4c29492008e49c0deb1ae7a97c08c"}},{"ruleId":"D1","level":"warning","message":{"text":"controller.setApplicationHealth (cyclomatic 32): controller.setApplicationHealth has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/health.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef26ba3867ab1d20dab5f2668198293f615bf1eeeb0f558014e248764a397639"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.hideSecretData (cyclomatic 32): ApplicationController.hideSecretData has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"b81c00822486603ea3bd17127d17202bd12b03f29c980f83032aeec1e56380b8"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.helmTemplate (cyclomatic 32): repository.helmTemplate has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"53358867702a344e01fb9e783baee99ff519856cfa7828be462af4ba15fbb37b"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.GetManifests (cyclomatic 32): Server.GetManifests has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 506). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c0303975b32540ec0319e9a98a93b3aa220991829c2ed288d7a136a90b5bd7"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationDiffCommand (cyclomatic 31): commands.NewApplicationDiffCommand has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 649). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e5613a149e193fb4da52054eb2ec4d1024088b3d893e6ff0f01671f77eb760"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.runManifestGenAsync (cyclomatic 31): Service.runManifestGenAsync has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"933797eaca511a87289b7335d07e5d3b3d1c92b58958c2070aa80f9c0fde0c70"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDWebhookHandler.affectedRevisionInfo (cyclomatic 31): ArgoCDWebhookHandler.affectedRevisionInfo has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/webhook/webhook.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d32c4321519bb724c7ed2716ac5a8c2b4995bba578979234254aa320193f66c"}},{"ruleId":"D1","level":"warning","message":{"text":"health.getCorev1PodHealth (cyclomatic 30): health.getCorev1PodHealth has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/health/health_pod.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f69000f5206f1ad015de741c3f41c434608ef6bafc082f5e9e38b7453659b4b"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.autoSync (cyclomatic 30): ApplicationController.autoSync has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":2519}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9dce2c2516795f3b709ba0c42ccce2f9ef12ba62a9f7d815b799b815eb1620"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.UpdateRevisionForPaths (cyclomatic 30): Service.UpdateRevisionForPaths has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":3452}}}],"partialFingerprints":{"codehealthFindingId/v1":"345505c2b407602dbe80a91e88794423c909f5b99fd6ce69f27a26984ed22cfc"}},{"ruleId":"D1","level":"warning","message":{"text":"terminalHandler.ServeHTTP (cyclomatic 30): terminalHandler.ServeHTTP has cyclomatic complexity 30 (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":"server/application/terminal.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3782982e5ed2d7cad2f7414edf26d8fc9c825fb7b88456542706f052812153"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.UpdateApplicationSetApplicationStatus (cyclomatic 29): Manager.UpdateApplicationSetApplicationStatus has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"67723380bcb4a9592594c55cebdd7b27f4a75d0fef7662ba483e2d5d0e132c11"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.getAppHosts (cyclomatic 29): ApplicationController.getAppHosts has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. 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":"controller/appcontroller.go"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a93f059d1aa363d75c7f34cb7da1f0aebcd1c0631fdb604586f665046da4bf"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.executeHooks (cyclomatic 29): ApplicationController.executeHooks has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/hook.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"12aa5273c8266a047877fc32a0935d7386fcad4667a2d9ad10ba1c89a4628f01"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.populateGatewayAPIRouteInfo (cyclomatic 29): cache.populateGatewayAPIRouteInfo has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/info.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"714d651a82d8ef34fe85963bcf16ca97971663d230f80639451024690f1adb2e"}},{"ruleId":"D1","level":"warning","message":{"text":"application.mergeLogStreams (cyclomatic 29): application.mergeLogStreams has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 107, 81, 168, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/logs.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"a02e021041a1b25a8444d3337db5ab9718b76ef5bbc107aa305e61d10e9b5a3e"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Update (cyclomatic 29): Server.Update has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/project/project.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb30c817e74c7ed55afb98b3b4288ab66688854b757d53cb872c5675e7553fbd"}},{"ruleId":"D1","level":"warning","message":{"text":"syncContext.runTasks (cyclomatic 28): syncContext.runTasks has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 11 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"82da63313d55760236377a08e00cf03e728e070bb8b8e4ce0d2c0c14dc1e0dd1"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Sync (cyclomatic 28): Server.Sync has cyclomatic complexity 28 (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":"server/application/application.go"},"region":{"startLine":2085}}}],"partialFingerprints":{"codehealthFindingId/v1":"6277b95ace3fa18f4ebb5942a31e6990a47d00fa8d6a7a2b2a61a5ba22f4483d"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationSetReconciler.setApplicationSetStatusCondition (cyclomatic 27): ApplicationSetReconciler.setApplicationSetStatusCondition has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"0016e9bb5676e51c9c41bfd511b2379b141cd023301407d370667768aee15f49"}},{"ruleId":"D1","level":"warning","message":{"text":"liveStateCache.getCluster (cyclomatic 27): liveStateCache.getCluster has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 593, 555). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/cache.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b2483a8a525b746c867297a23ed5f6ed58a39796726e0aca3f8745df982e7c"}},{"ruleId":"D1","level":"warning","message":{"text":"SyncWindows.Matches (cyclomatic 27): SyncWindows.Matches has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3099}}}],"partialFingerprints":{"codehealthFindingId/v1":"120874fa812e5d17739bfacd7494a75985ddcf837abe8bacdf5f2a5949ab6aac"}},{"ruleId":"D1","level":"warning","message":{"text":"clusterCache.watchEvents (cyclomatic 26): clusterCache.watchEvents has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 793). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"3764c4822b53d66e405a350cb492b29ccebcd93afa510efe23e6cb9e934403f0"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.printAppSummaryTable (cyclomatic 26): commands.printAppSummaryTable 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":"cmd/argocd/commands/app.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d156d2946418bba1580b5dd823577577b385ed9d4c661ff489ad933caff85cb"}},{"ruleId":"D1","level":"warning","message":{"text":"headless.MaybeStartLocalServer (cyclomatic 26): headless.MaybeStartLocalServer has cyclomatic complexity 26 (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":"cmd/argocd/commands/headless/headless.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"db56ed737152a8f3651dda977a5e56655e4c71db4436fde250a4acddd14fc6b7"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.generateGatewayURLs (cyclomatic 26): cache.generateGatewayURLs 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":"controller/cache/info.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"8190f8c874fa02e4b150930257c9c45ece68b18ce97e68c64134a0ee3113a073"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.GenerateManifests (cyclomatic 26): repository.GenerateManifests has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1741}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3a22f475d6e8fc9849ad59845b719ea0f63d649624af4f0b8f1d540ff394ad"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.populateHelmAppDetails (cyclomatic 26): Service.populateHelmAppDetails 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":"reposerver/repository/repository.go"},"region":{"startLine":2502}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b8f9e2fea1ca0d91e166f870eabdb5c055501398d942bdcd1a8102122d1addb"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.getResourceTree (cyclomatic 25): ApplicationController.getResourceTree has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5febf49aa228e786216e36ec3e895c596a3e11f6f742dd35e93f3072d71c5d2"}},{"ruleId":"D1","level":"warning","message":{"text":"cache.populateNodeInfo (cyclomatic 25): cache.populateNodeInfo 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":"controller/cache/info.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc68d91bed83974555ae32dfe7b32eeb16afa97cf954cad38690b5b8b10e89a4"}},{"ruleId":"D1","level":"warning","message":{"text":"dex.GenerateDexConfigYAML (cyclomatic 25): dex.GenerateDexConfigYAML 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":"util/dex/config.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"aefa38a596aa817d93cc88a9c25290973d0db3244bca42b4d52fbdabe8ed410a"}},{"ruleId":"D1","level":"warning","message":{"text":"clusterCache.GetManagedLiveObjs (cyclomatic 24): clusterCache.GetManagedLiveObjs has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1554}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab2bef721a2a6b18579fa3663cc5a16d5f6b1c05f934062bf4883e4e689bf24"}},{"ruleId":"D1","level":"warning","message":{"text":"diff.HideSecretData (cyclomatic 24): diff.HideSecretData 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":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"15ed14a87b96466fbd424166849c57945fda1f8c6caf6217e2efc7be5cc4a07d"}},{"ruleId":"D1","level":"warning","message":{"text":"DuckTypeGenerator.GenerateParams (cyclomatic 24): DuckTypeGenerator.GenerateParams has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/duck_type.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdea63dd0433dd2ce97990ac4a16a73a847f3844685f92751a810a4cf0facac0"}},{"ruleId":"D1","level":"warning","message":{"text":"PullRequestGenerator.selectServiceProvider (cyclomatic 24): PullRequestGenerator.selectServiceProvider 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":"applicationset/generators/pull_request.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"49b2bf96b3817e02fe09ae9f00c43e4f9883317234e5d1d131d8554b18b73c9d"}},{"ruleId":"D1","level":"warning","message":{"text":"application.init (cyclomatic 24): application.init has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 321, 281, 314). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/application/forwarder_overwrite.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b2a9f6d6c8b22a3c06090cf6417d818a562b567a58fd1ad533554ccab644cac"}},{"ruleId":"D1","level":"warning","message":{"text":"tgz.tgzFile (cyclomatic 24): tgz.tgzFile has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/io/files/tar.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc4689dd94e2f36fbc97512d8c760fb0d6230ea8c9f1146a76644c020d66732"}},{"ruleId":"D1","level":"warning","message":{"text":"syncContext.applyObject (cyclomatic 23): syncContext.applyObject has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e360325f3e774614d06f276e32606e43856e1fdff7357a204f37286fba5aa5"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.GetManifestsWithFiles (cyclomatic 23): Server.GetManifestsWithFiles has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. 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":"server/application/application.go"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f7c4e3c831f8b41e30e224ba17711f35b5d1aa9921b13e7d83973f2362790f3"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.resolveSourceRevisions (cyclomatic 23): Server.resolveSourceRevisions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":2201}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c52a16b53aa8c05e3bdbf810467a14ccf2852a1ec666ccb0f63d367dbcdb2f1"}},{"ruleId":"D1","level":"warning","message":{"text":"nativeHelmChart.ExtractChart (cyclomatic 23): nativeHelmChart.ExtractChart has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/client.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fd7becc7db416e9f349eccdb9088f1c1b0cf86e9693c40c1f628bcaf026acd1"}},{"ruleId":"D1","level":"warning","message":{"text":"health.GetHealthCheckFunc (cyclomatic 22): health.GetHealthCheckFunc has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/health/health.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e8785b32f90172a3a74a8d45c7ae30bdac791a96fd26473dc038beba118cd4"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationSetReconciler.createOrUpdateInCluster (cyclomatic 22): ApplicationSetReconciler.createOrUpdateInCluster has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 718). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4913a22681dd269e5b12452ea43f426c42fe399d088650101076a9efdf9fb6"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationGetCommand (cyclomatic 22): commands.NewApplicationGetCommand has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 380). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea7f1eedf26d69dae9c8fef5e61802f5c2653861cc68a845431fca2ab112f95"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationManifestsCommand (cyclomatic 22): commands.NewApplicationManifestsCommand has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 2824). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2797}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a2e333093ed12fd42832bd6634f205706e07ae463c3dccb1946b7dd5038001"}},{"ruleId":"D1","level":"warning","message":{"text":"util.setHelmOpt (cyclomatic 22): util.setHelmOpt has cyclomatic complexity 22 (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":"cmd/util/app.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"2682a2d7a7aa1b500a89da237aa5f7a5bf9f26ccd025f2efe0546ff34a90925d"}},{"ruleId":"D1","level":"warning","message":{"text":"Cluster.RawRestConfig (cyclomatic 22): Cluster.RawRestConfig 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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3964}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f01bf41bf304ec5ee8702a5efa2c4aed99ce4a28fbddc4f8d065f0dcd25667"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.getResolvedValueFiles (cyclomatic 22): repository.getResolvedValueFiles has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d19ef6226561dd98ea54bab2a4ea0b165927c1fc955dec7a2c6e9fed455bea5"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Get (cyclomatic 22): Server.Get has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4af53a3337ac3f447ff29b246e42ee8705039e896b60231eab0b78f818ac6ba"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDServer.Run (cyclomatic 22): ArgoCDServer.Run has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. 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":"server/server.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"48941d4855413490a4f9bde7d2d41da04f2e233042da6d1f56394c1eac37f970"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Get (cyclomatic 22): Server.Get has cyclomatic complexity 22 (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":"server/settings/settings.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bf18af0dcead5284365194dfc7517e504992e9383277bf75d8297420e5df63e"}},{"ruleId":"D1","level":"warning","message":{"text":"files.untar (cyclomatic 22): files.untar 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":"util/io/files/tar.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d727f952b915f7e18f0c4542b0f6f5a63fbb120ee0a39951cd463342ea8b1a"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionManager.Parse (cyclomatic 22): SessionManager.Parse has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/session/sessionmanager.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"364beebb2625c96f9b0757517f52a916e18f65a4ff10d60dad969b75811576a6"}},{"ruleId":"D1","level":"warning","message":{"text":"settings.parseAccounts (cyclomatic 22): settings.parseAccounts 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":"util/settings/accounts.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5f75a1faa529e44ab8c02266a4c31e85c006f5eca2b901e664aad499886c84"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.UpdateApplicationSetApplicationStatusProgress (cyclomatic 21): Manager.UpdateApplicationSetApplicationStatusProgress 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":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1429ddbc2ece408a45197fa5280701ca01f838fc86b30016087807adf056b6"}},{"ruleId":"D1","level":"warning","message":{"text":"command.NewCommand (cyclomatic 21): command.NewCommand has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-applicationset-controller/commands/applicationset_controller.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b38aed980904ed4e4d2e047eb185a2745085bc1ad8b79ceb90ec1a22078970f"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewCommand (cyclomatic 21): commands.NewCommand has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-server/commands/argocd_server.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fdfb90eeb412bdf9c8d6d8609284d6ac6bc365c1539e9c8adebbc700739e607"}},{"ruleId":"D1","level":"warning","message":{"text":"controller.NewApplicationController (cyclomatic 21): controller.NewApplicationController has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e8fa67465691ff91737402e65b5b74c3699d924cbb75f62f8241b529098de14"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.applicationEventHandlerFuncs (cyclomatic 21): ApplicationController.applicationEventHandlerFuncs has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 2913, 2948, 2900). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":2898}}}],"partialFingerprints":{"codehealthFindingId/v1":"365ab571b6322001a9ad09920f75d0f738bbaad7df1f18c9394ea026e0548dd9"}},{"ruleId":"D1","level":"warning","message":{"text":"appStateManager.evaluateRevisionChanges (cyclomatic 21): appStateManager.evaluateRevisionChanges 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":"controller/state.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc6dc616717f7ca2e75e9260844405c8f8a41543788465cf3c79374efe9a9efe"}},{"ruleId":"D1","level":"warning","message":{"text":"SyncWindows.CanSync (cyclomatic 21): SyncWindows.CanSync 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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3179}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf723c0dfeaa7ca02ba4225072b7a8a33808ca1d94790f66c575fa6aa8aa8976"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.RunResourceActionV2 (cyclomatic 21): Server.RunResourceActionV2 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":"server/application/application.go"},"region":{"startLine":2663}}}],"partialFingerprints":{"codehealthFindingId/v1":"a07a00e9a8495a77741a9012cae227233a5198c6339fcdea990ee6372ba99934"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDServer.watchSettings (cyclomatic 21): ArgoCDServer.watchSettings 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":"server/server.go"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8355738f84ca9cc5759fa2432a90d040e1c0589250c225496695f8dc6d0e3c9"}},{"ruleId":"D1","level":"warning","message":{"text":"db.ListRepoCertificates (cyclomatic 21): db.ListRepoCertificates 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":"util/db/certificate.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb8b78b0b426919a395b5c68667e48385fc4ced569704a65b9557313592d7c46"}},{"ruleId":"D1","level":"warning","message":{"text":"db.RemoveRepoCertificates (cyclomatic 21): db.RemoveRepoCertificates 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":"util/db/certificate.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"579780fcdc218c600b79d0d1b101885af96106a1730e6c4a0236605667be465c"}},{"ruleId":"D1","level":"warning","message":{"text":"ClientApp.GetUserInfo (cyclomatic 21): ClientApp.GetUserInfo 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":"util/oidc/oidc.go"},"region":{"startLine":973}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa8a6e52f817c707034f53293095666f402171016fd413a0638ed77905c7cd43"}},{"ruleId":"D1","level":"warning","message":{"text":"sourceintegrity.SyncKeyRingFromDirectory (cyclomatic 21): sourceintegrity.SyncKeyRingFromDirectory has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/gpg.go"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab2ee0a06dda4e70c1038f0fc91e9630d49be440255c760e7ce8b4cec7cf1ad"}},{"ruleId":"D1","level":"warning","message":{"text":"clusterCache.sync (cyclomatic 20): clusterCache.sync has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f0badca5b7ea00c3cb762bdcefd1ba514ba0ba1309b10f5a83a816677360b4"}},{"ruleId":"D1","level":"warning","message":{"text":"progressivesync.buildAppDependencyList (cyclomatic 20): progressivesync.buildAppDependencyList 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":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bda99294cc214926436f0572ca50bdf2158a89092d7896d8c7ab565a0cf494d"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewClusterAddCommand (cyclomatic 20): commands.NewClusterAddCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/cluster.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"46b4cfb2b1f253ec2dd1fad10f5b502509ca06c83f121bd92e4a644a821c5005"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewRepoAddCommand (cyclomatic 20): commands.NewRepoAddCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 117). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/repo.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"609dd63bcba80db953d6cce559a465e00bd87c818cdf5e50daf6c3bbe115cdb2"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.cleanupHooks (cyclomatic 20): ApplicationController.cleanupHooks 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":"controller/hook.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d112ba183eb72be377385115affd033cb01c0dad160a13a00e1696cd1b2adb"}},{"ruleId":"D1","level":"warning","message":{"text":"Hydrator.hydrate (cyclomatic 20): Hydrator.hydrate has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. 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":"controller/hydrator/hydrator.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c84bda678968cca9e2e2c5ef4ac30ec99fc61d47121345812fe8e5235718a9"}},{"ruleId":"D1","level":"warning","message":{"text":"Repository.CopyCredentialsFrom (cyclomatic 20): Repository.CopyCredentialsFrom 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":"pkg/apis/application/v1alpha1/repository_types.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d4b8d913b555cbc25e8cef4e984daf60d94a97bc3dec69db2d542181baafd7"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.GenerateManifest (cyclomatic 20): Service.GenerateManifest has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. 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":"reposerver/repository/repository.go"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c35fcfd1a286e82a8cc4fd27e613d0fcca12e57aad20b7bae716aaec7bb568"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Create (cyclomatic 20): Server.Create has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4932c82822de124d01a4e9132bbd0e9ed09f4260f1f2a4a288bf821df9bcbc6"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.validateAndNormalizeApp (cyclomatic 20): Server.validateAndNormalizeApp 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":"server/application/application.go"},"region":{"startLine":1322}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23387bb54f250ebd620370861ad22f6a3584f1cfcbdeaea6fe43d044f7a0610"}},{"ruleId":"D1","level":"warning","message":{"text":"exec.RunCommandExt (cyclomatic 20): exec.RunCommandExt 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":"util/exec/exec.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e410fcfc7607b27b929524ac3b45afb0c8d3026a382286654ed3eaae85b839e"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.SetAppInstanceLabel (cyclomatic 20): kube.SetAppInstanceLabel 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":"util/kube/kube.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb71d0235237f6b281df793f2196826be0566d2d300337447f1b1d44270f4c31"}},{"ruleId":"D1","level":"warning","message":{"text":"ClientApp.HandleCallback (cyclomatic 20): ClientApp.HandleCallback has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc.go"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7cdc59e323721d79b0a8f54f1a924c808781adb297347c6ba717266bace9f9e"}},{"ruleId":"D1","level":"warning","message":{"text":"webhook.shouldRefreshPRGenerator (cyclomatic 19): webhook.shouldRefreshPRGenerator 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":"applicationset/webhook/webhook.go"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f4c1ce0c82d0afca376db127bae76e54f91f4157363e154ace15758681ec57"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewCommand (cyclomatic 19): commands.NewCommand has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-notification/commands/argocd_notification.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8625a2ae88f142491766329f5dd85e97a54f296b6121f2a96124993ff16259d2"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewLoginCommand (cyclomatic 19): commands.NewLoginCommand has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 62). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/login.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aba74e233bf2c55c996dcdd2b403012665387cb2d3217ef1a2fff0eac00179a"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.NewExportCommand (cyclomatic 19): admin.NewExportCommand has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"75570ec2878ea9e4406ff85607966ad9d68ee26f125fa7d01515ab9bc4ea93c8"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.loadClusters (cyclomatic 19): admin.loadClusters has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24352575a7a05a45639164f3053498f6d4b9118a02488675db77fc3a10d3814"}},{"ruleId":"D1","level":"warning","message":{"text":"util.setKustomizeOpt (cyclomatic 19): util.setKustomizeOpt 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":"cmd/util/app.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"342dc00d7de41238ea5c00e0bb0a9fd369fce18c86f5c0326b8198b340fc3233"}},{"ruleId":"D1","level":"warning","message":{"text":"reposerver.StartGPGWatcher (cyclomatic 19): reposerver.StartGPGWatcher has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 32, 25). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/gpgwatcher.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b93f6cb742b3d73a4630ff5a796087157b88e31a103bca3e0638443fe32725"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.getHelmRepos (cyclomatic 19): repository.getHelmRepos 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":"reposerver/repository/repository.go"},"region":{"startLine":1136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4244071ee8526de5fcf5d00dcb3353ac61ea553731157c738fd4579f2a5de6"}},{"ruleId":"D1","level":"warning","message":{"text":"server.bug21955WorkaroundInterceptor (cyclomatic 19): server.bug21955WorkaroundInterceptor 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":"server/server.go"},"region":{"startLine":1728}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ef4f25d26b50f36bc318589fb13cfe7a7dfb79d37d8c8ae7c259e06deb08ddd"}},{"ruleId":"D1","level":"warning","message":{"text":"git.DiscoverGitHubAppInstallationID (cyclomatic 19): git.DiscoverGitHubAppInstallationID 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":"util/git/creds.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"904155fb206d970df2069fc20217689797a1842e45f4332b59b72eb5559da7e8"}},{"ruleId":"D1","level":"warning","message":{"text":"nativeHelmChart.GetTags (cyclomatic 19): nativeHelmChart.GetTags has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/client.go"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"7026e1f6a52a719daae44a0be4df4f53520a377477c5cb9895f77f8eea32cad2"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsManager.InitializeSettings (cyclomatic 19): SettingsManager.InitializeSettings has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":2440}}}],"partialFingerprints":{"codehealthFindingId/v1":"a973a5edafff35dc77e86ade9ee5ea343bf9960790409d90e665e8dd31838638"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.printResources (cyclomatic 18): commands.printResources 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":"cmd/argocd/commands/app_resources.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb67bd109bd9d7b7ce94053c0486b87163a9c59e370b38f68238a7a206b479c9"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.NewRBACCanCommand (cyclomatic 18): admin.NewRBACCanCommand has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 164). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/settings_rbac.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c187e3f5eb2d114a5dcb438e1f548c97bf61b4602759dc4b3935ba0e593f5b74"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.handleCommitRequest (cyclomatic 18): Service.handleCommitRequest has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commitserver/commit/commit.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"33004ffea4aa4f18c3db6e59b866a469e5ea94405042bfed925388ece0162796"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.handleObjectUpdated (cyclomatic 18): ApplicationController.handleObjectUpdated 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":"controller/appcontroller.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ef14bb30a6485fc6fdec92a473cd1688f70692c5c52e06d66d1d1929645b69"}},{"ruleId":"D1","level":"warning","message":{"text":"application.streamApplicationListJSON (cyclomatic 18): application.streamApplicationListJSON 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":"pkg/apiclient/application/forwarder_overwrite.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc628dc6ae1d5b1b938941e6269c929fa0c628cd68827af1308aa960bf7d07e"}},{"ruleId":"D1","level":"warning","message":{"text":"application.isTheSelectedOne (cyclomatic 18): application.isTheSelectedOne has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"3870439fc56073347e165af2a9af704a02c793702475368fc2102796725ee5e8"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Create (cyclomatic 18): Server.Create has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/applicationset/applicationset.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c2f8aac8f08a93dfdfeca954153cbce0ea4ffb897995afed5ca1d335690f9e"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.RotateAuth (cyclomatic 18): Server.RotateAuth 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":"server/cluster/cluster.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b7a2f5b5d7a933d926abcf03218ebac250c692e5eccf7038a0fbd3089f87e8"}},{"ruleId":"D1","level":"warning","message":{"text":"Handler.ServeHTTP (cyclomatic 18): Handler.ServeHTTP has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/logout/logout.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b147c981679a05b53c15d583e8e5ca87773eb4252c4116acd01d45cba3d344e"}},{"ruleId":"D1","level":"warning","message":{"text":"nativeOCIClient.extract (cyclomatic 18): nativeOCIClient.extract 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":"util/oci/client.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae53d180028e6175a4aed64a3e551b6e2369db603dda93e514dce1fc68cd457a"}},{"ruleId":"D1","level":"warning","message":{"text":"compressedLayerExtracterStore.Push (cyclomatic 18): compressedLayerExtracterStore.Push has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oci/client.go"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4437225b10102c7fb091b49d8a554c11ab74fc724757e6b7d98e8cb558e319e"}},{"ruleId":"D1","level":"warning","message":{"text":"sourceintegrity.parseGitCommitVerification (cyclomatic 18): sourceintegrity.parseGitCommitVerification 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":"util/sourceintegrity/gpg.go"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b2566dde636c95ebea12704a5279f504f07f63d69d293e54f948fc8d20cc6aa"}},{"ruleId":"D1","level":"warning","message":{"text":"tls.generate (cyclomatic 18): tls.generate has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/tls/tls.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb299b693625d61c784b1ef1782c6e1f5e0510498b14f39f020e58e7f86a22d"}},{"ruleId":"D1","level":"warning","message":{"text":"syncContext.terminateHooksPreemptively (cyclomatic 17): syncContext.terminateHooksPreemptively 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":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"244a7c3e0696a017f2f3b980e7c035ae01823ed7846f19753ae8454df31a16bb"}},{"ruleId":"D1","level":"warning","message":{"text":"kubectlResourceOperations.newApplyOptions (cyclomatic 17): kubectlResourceOperations.newApplyOptions has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/utils/kube/resource_ops.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed7f07eee7dcc8b90fd4783c2f3626d3dfc22f697a7f991f3ad18b575d762b0"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.checkResourceStatus (cyclomatic 17): commands.checkResourceStatus has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2242}}}],"partialFingerprints":{"codehealthFindingId/v1":"92cbf4f55a0250527752ccd215a85c0243ae002f478c5bf27365aa1dccff50be"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewLogoutCommand (cyclomatic 17): commands.NewLogoutCommand has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/logout.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"880428866aff1de2c4c052ec90a9f95fce6101524b15d72e9b4f4188b0970d52"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.printProject (cyclomatic 17): commands.printProject has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project.go"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e3094d5efcc5fb7b638ae1b47546df4b59e096a326120a5454a484c8d9b191"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewRepoCredsAddCommand (cyclomatic 17): commands.NewRepoCredsAddCommand has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/repocreds.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"758eb48f7c906f8d416b5bedb9c03929caced2241e4971845260ec65c2cc9e1a"}},{"ruleId":"D1","level":"warning","message":{"text":"admin.updateProjects (cyclomatic 17): admin.updateProjects 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":"cmd/argocd/commands/admin/project.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d2c125889e4dd0ad3964ce000a143a9f0db04256d52ead90f5ab11d416e32e"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 17): main.main has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/main.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"e98bb0eef6aba17ab67889ff7a7a1868414f7908f9b9e9711a77e5afd52d4fc8"}},{"ruleId":"D1","level":"warning","message":{"text":"controller.isKnownOrphanedResourceExclusion (cyclomatic 17): controller.isKnownOrphanedResourceExclusion 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":"controller/appcontroller.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"35248dce56ee0815fb4aff715eaad69d6a39e87dadc386ea43753fd59a622d2d"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationController.setOperationState (cyclomatic 17): ApplicationController.setOperationState has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d876467d3cc94c27610253503c1cfa1f44607bc141e80b095cf1fdc68c250d0"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplicationSetStatus.SetConditions (cyclomatic 17): ApplicationSetStatus.SetConditions has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/applicationset_types.go"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4cf37536a265fecc602f769c9f6ab0ada79f4b673ce95cf1b4aa57c6e8be239"}},{"ruleId":"D1","level":"warning","message":{"text":"Repository.CopyCredentialsFromRepo (cyclomatic 17): Repository.CopyCredentialsFromRepo 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":"pkg/apis/application/v1alpha1/repository_types.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ccf5cb35467e0301be29beaa7beca336ea6036a4776a95be922a5d0642bd07"}},{"ruleId":"D1","level":"warning","message":{"text":"repository.getPotentiallyValidManifestFile (cyclomatic 17): repository.getPotentiallyValidManifestFile 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":"reposerver/repository/repository.go"},"region":{"startLine":2143}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af5da171837d9c664b7c0e36fed0aabe874a9113b5a378db82362196bc776c3"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.GetGitDirectories (cyclomatic 17): Service.GetGitDirectories has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. 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":"reposerver/repository/repository.go"},"region":{"startLine":3281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d57ba07bf7896db47ef80bf550926d8c82e218c11fcbbd5bf522cc4c43790b"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.UpdatePassword (cyclomatic 17): Server.UpdatePassword has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/account/account.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd95c7ecfba742cb79ba1e662a281d49d128b0f7a1e73e524f3a8fa59295761e"}},{"ruleId":"D1","level":"warning","message":{"text":"extension.validateConfigs (cyclomatic 17): extension.validateConfigs 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":"server/extension/extension.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3f7e179043476940c1012693706c9ce60fbfd3e41407bdff00d67dcd40b27f"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.GetAppDetails (cyclomatic 17): Server.GetAppDetails has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/repository/repository.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"915b781010d2e02e008de01bac45217c66ba9247c80f02369db734990490e768"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDServer.getClaims (cyclomatic 17): ArgoCDServer.getClaims 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":"server/server.go"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"99de5378af74c9613185ce292c8fc52433142d7f143fe5052debdc2c1e57c1c6"}},{"ruleId":"D1","level":"warning","message":{"text":"argo.ValidateRepo (cyclomatic 17): argo.ValidateRepo has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/argo.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac77dccc91e265850a96febe929573d38807e33e41734ca1e115ec7f4651f1cf"}},{"ruleId":"D1","level":"warning","message":{"text":"nativeGitClient.getRefs (cyclomatic 17): nativeGitClient.getRefs has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef8a8b63dc5eab49e5d032cbf231f308e4d7d29cc958f44b96ce0af47890463e"}},{"ruleId":"D1","level":"warning","message":{"text":"legacyConfig.merge (cyclomatic 17): legacyConfig.merge 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":"util/notification/settings/legacy.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b424653840fc660ba669689eac45d333c28f598886b57d064d0d089c24a17c"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsManager.appendResourceOverridesFromSplitKeys (cyclomatic 17): SettingsManager.appendResourceOverridesFromSplitKeys 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":"util/settings/settings.go"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"be46ed1d965f5d7a8cd524f475d5bd401d33c6644eebe75e30edb9c55b495320"}},{"ruleId":"D1","level":"warning","message":{"text":"tls.CreateServerTLSConfig (cyclomatic 17): tls.CreateServerTLSConfig 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":"util/tls/tls.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa7f286bb8b8ca7537c4c5aa6bc4aa413ae0ad31883197cd3fda7eec0ac7e435"}},{"ruleId":"D1","level":"warning","message":{"text":"diff.NormalizeSecret (cyclomatic 16): diff.NormalizeSecret has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f8a4f754732d918becc98c00e4e7b32c3b3687bf6174b87e3bbd52b55ad7544"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.PerformReverseDeletion (cyclomatic 16): Manager.PerformReverseDeletion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d26ccda8aae57047c47257cde0938e7835dc47ffc91317b04dbc60c9917d1e"}},{"ruleId":"D1","level":"warning","message":{"text":"Requirement.Matches (cyclomatic 16): Requirement.Matches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/utils/selector.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77324e307b641ccb3ad26149543c2e346dd7ae18182b21197096aa9f9751f40"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationDeleteCommand (cyclomatic 16): commands.NewApplicationDeleteCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 1286). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c548dbff3a8f991d8555c47d5878767aba904f58324ec833aa191315c0e9f4"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.newServerSideDiffStrategy (cyclomatic 16): commands.newServerSideDiffStrategy has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 222). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aa25be541ba536bec69a764db9f3c62da65f78d86e3045d5c319183002e7c08"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewApplicationSetCreateCommand (cyclomatic 16): commands.NewApplicationSetCreateCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c1cb0e08cd80e34cd212539fbd9cb96080f16a80ece3c401eaeb84364e29600"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.oauth2Login (cyclomatic 16): commands.oauth2Login has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 256, 344). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/login.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc4dd3eee526535e84f7c6685ea29450e35e4b927f329251dc5d5c37503c6db"}},{"ruleId":"D1","level":"warning","message":{"text":"commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cyclomatic 16): commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c2dcb657194a81431c4ec4a26e82a7e80bcaaa3a09fa6adb3beb6527002035d"}},{"ruleId":"D1","level":"warning","message":{"text":"Server.Delete (cyclomatic 16): Server.Delete has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"efcb3628f0c4f096e5666aa482b9d358a2cf6948e48a2ad55372efd9033476aa"}},{"ruleId":"D1","level":"warning","message":{"text":"ArgoCDServer.newStaticAssetsHandler (cyclomatic 16): ArgoCDServer.newStaticAssetsHandler has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 1476). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/server.go"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c7b2bb8abfb9a3f29e11e420e950f66b9af855bd1992f2cd51dec249108b1e"}},{"ruleId":"D1","level":"warning","message":{"text":"argo.ValidatePermissions (cyclomatic 16): argo.ValidatePermissions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/argo.go"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96fb41e5efb7d5bb5b5d8806bb854abc8768324ce5c674a552484473094193f"}},{"ruleId":"D1","level":"warning","message":{"text":"git.newAuth (cyclomatic 16): git.newAuth has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59ac1c5c10143c224e3f2e917fd636869be974a892ab4fc6acd8075e044b60b"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.PortForward (cyclomatic 16): kube.PortForward has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. 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":"util/kube/portforwarder.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"6724605850e6e51fc11dfa41632880d1dbf55011bbd8b1da71564e1114637361"}},{"ruleId":"D1","level":"warning","message":{"text":"sourceintegrity.GetInstalledPGPKeys (cyclomatic 16): sourceintegrity.GetInstalledPGPKeys has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/gpg.go"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"e284bf104bfcf2004b63ac57f043fb6d305ae469925be381ccd3fc8c4498dcd4"}},{"ruleId":"D2","level":"warning","message":{"text":"appStateManager.CompareAppState (cognitive 163): appStateManager.CompareAppState has cognitive complexity 163 (threshold 15). Drivers by points: if/else 121, loops 21, boolean chains 19, match/switch 2 (nesting depth added 65). Of this number, 161 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"f407f50170bacc3fca79031a3b9ce82272e0d7ce0772d9b3e6376b478b36100d"}},{"ruleId":"D2","level":"warning","message":{"text":"kustomize.Build (cognitive 153): kustomize.Build has cognitive complexity 153 (threshold 15). Drivers by points: if/else 126, loops 22, match/switch 3, boolean chains 2 (nesting depth added 93). 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":"util/kustomize/kustomize.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f783406361c068d3a65a91f8bba14c5d6b568e385a405d6781821ade405e29"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewImportCommand (cognitive 135): admin.NewImportCommand has cognitive complexity 135 (threshold 15). Drivers by points: if/else 112, boolean chains 8, loops 8, match/switch 7 (nesting depth added 72). Most of this is not in the body itself: 0 of the 135 points are its own statements and the rest belongs to one function literal inside it that branches (line 175). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"50e44558489e4a93f5eaf4bb08f4377d8c6cc022725b8cdc54896e6e77d4b815"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationSyncCommand (cognitive 123): commands.NewApplicationSyncCommand has cognitive complexity 123 (threshold 15). Drivers by points: if/else 91, boolean chains 17, loops 13, match/switch 2 (nesting depth added 58). Most of this is not in the body itself: 0 of the 123 points are its own statements and the rest belongs to one function literal inside it that branches (line 1763). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3629edefb17d1b4929b5e2fb825bce32e365475f70a57ee71d3cea9576d2c3c"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.runManifestGenAsync (cognitive 117): Service.runManifestGenAsync has cognitive complexity 117 (threshold 15). Drivers by points: if/else 98, loops 16, boolean chains 3 (nesting depth added 86). Of this number, 111 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"013b69530ecef719ef577d7a4e5018ed3213e9ded2408f3f02095ef5896f5d22"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.populateIngressInfo (cognitive 116): cache.populateIngressInfo has cognitive complexity 116 (threshold 15). Drivers by points: if/else 82, loops 25, boolean chains 9 (nesting depth added 78). 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":"controller/cache/info.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ee3f0fa1331189477b3df39fa32283bd06b838c4f601ee9976f05051da9846"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.Sync (cognitive 98): syncContext.Sync has cognitive complexity 98 (threshold 15). Drivers by points: if/else 70, boolean chains 16, loops 6, match/switch 6 (nesting depth added 41). Of this number, 86 points are the body\u0027s own statements and 12 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"058b8de170d15fa173b8883d3c2203dfbeef3199a713e83d74f3eac39878b18b"}},{"ruleId":"D2","level":"warning","message":{"text":"db.CreateRepoCertificate (cognitive 97): db.CreateRepoCertificate has cognitive complexity 97 (threshold 15). Drivers by points: if/else 76, loops 14, boolean chains 5, match/switch 2 (nesting depth added 59). 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":"util/db/certificate.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab988cb423d67d1019a5abcf22e0f1fb250db2e86c0d20671ec76232c37f08c1"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.hideSecretData (cognitive 96): ApplicationController.hideSecretData has cognitive complexity 96 (threshold 15). Drivers by points: if/else 91, boolean chains 4, loops 1 (nesting depth added 65). 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":"controller/appcontroller.go"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"205b6578fdb9c547361ee91514083799904af5eb5881f22a1798381597cd4524"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.ServerSideDiff (cognitive 87): Server.ServerSideDiff has cognitive complexity 87 (threshold 15). Drivers by points: if/else 73, boolean chains 6, loops 6, match/switch 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":2983}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1a8cb162463db8dbeb5ba9bf932918be35d5a2602f7f2125768e30df4ff2d4"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.getSyncTasks (cognitive 85): syncContext.getSyncTasks has cognitive complexity 85 (threshold 15). Drivers by points: if/else 54, loops 21, boolean chains 7, match/switch 3 (nesting depth added 36). Of this number, 80 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"1207ba733a6fe20efb9e5dbe7a4d411a57eadb01347f15a336894be263075340"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.Reconcile (cognitive 85): ApplicationSetReconciler.Reconcile has cognitive complexity 85 (threshold 15). Drivers by points: if/else 78, loops 5, boolean chains 2 (nesting depth added 34). Of this number, 82 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"05892e8967caf692faad5194347c427e20fd6f0879a5ce477723df6c844844d1"}},{"ruleId":"D2","level":"warning","message":{"text":"Render.deeplyReplaceWithFilter (cognitive 84): Render.deeplyReplaceWithFilter has cognitive complexity 84 (threshold 15). Drivers by points: if/else 75, loops 6, boolean chains 2, match/switch 1 (nesting depth added 48). 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":"applicationset/utils/utils.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e7f588314526cb64326efbe5813cfa6bdcbb960772a2f4f819a078f43eb77a"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.unset (cognitive 80): commands.unset has cognitive complexity 80 (threshold 15). Drivers by points: if/else 48, loops 22, boolean chains 10 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1063}}}],"partialFingerprints":{"codehealthFindingId/v1":"13495632dce9c98189c3f206dc5794578dd2afc064ec9e59891f8b5d6d19e6a5"}},{"ruleId":"D2","level":"warning","message":{"text":"Handler.ServeHTTP (cognitive 80): Handler.ServeHTTP has cognitive complexity 80 (threshold 15). Drivers by points: if/else 61, boolean chains 14, loops 5 (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":"server/badge/badge.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9b093523fd32f8cde405507a914eb337aa79e6b1b371c21438d8b92e8120b8"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDWebhookHandler.HandleEvent (cognitive 75): ArgoCDWebhookHandler.HandleEvent has cognitive complexity 75 (threshold 15). Drivers by points: if/else 62, loops 8, boolean chains 5 (nesting depth added 43). 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":"util/webhook/webhook.go"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e03a219c12cac3238a4213b8cb7f8a258ea33171189b309986f9dcbb0081e9"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.finalizeApplicationDeletion (cognitive 74): ApplicationController.finalizeApplicationDeletion has cognitive complexity 74 (threshold 15). Drivers by points: if/else 68, loops 4, boolean chains 2 (nesting depth added 33). 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":"controller/appcontroller.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feac52dc2549a7e843ff262cad45efd10efad6c09525362d43bb12f307017b7"}},{"ruleId":"D2","level":"warning","message":{"text":"apiclient.NewClient (cognitive 74): apiclient.NewClient has cognitive complexity 74 (threshold 15). Drivers by points: if/else 69, boolean chains 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/apiclient.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cde4313be0b87f0a60c504e7abbedc8ccfa3aa056d11e0441b9765087015ed0"}},{"ruleId":"D2","level":"warning","message":{"text":"AppProject.ValidateProject (cognitive 74): AppProject.ValidateProject has cognitive complexity 74 (threshold 15). Drivers by points: if/else 60, loops 11, boolean chains 3 (nesting depth added 37). 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":"pkg/apis/application/v1alpha1/app_project_types.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"874c7a9e39c08b47662191553f97ac1061ad62d2d24f33ecee45bb85fddb6d7d"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.processRequestedAppOperation (cognitive 72): ApplicationController.processRequestedAppOperation has cognitive complexity 72 (threshold 15). Drivers by points: if/else 58, boolean chains 10, match/switch 3, loops 1 (nesting depth added 26). Of this number, 50 points are the body\u0027s own statements and 22 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1518}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b85ad062769fb0b15016ac878da872fe0b9eba0cea93218f7e345d7cc455188"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.runRepoOperation (cognitive 72): Service.runRepoOperation has cognitive complexity 72 (threshold 15). Drivers by points: if/else 68, boolean chains 3, match/switch 1 (nesting depth added 29). Of this number, 65 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3bb67633f2a52a80dc26d4bfbf62818db8733b214e9d1f2dc47949001860663"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.processAppRefreshQueueItem (cognitive 66): ApplicationController.processAppRefreshQueueItem has cognitive complexity 66 (threshold 15). Drivers by points: if/else 56, boolean chains 6, loops 4 (nesting depth added 20). Of this number, 63 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1825}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb346b0353c4d067d765aeb054c72526dfccd174a78db96b9b7fe67cb5c8930"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.helmTemplate (cognitive 66): repository.helmTemplate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 55, loops 9, boolean chains 2 (nesting depth added 33). Of this number, 63 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"de395cdfbd1c354bbc6180427cf0d710ff3e24eb075e36f5b40b38f783e6d693"}},{"ruleId":"D2","level":"warning","message":{"text":"appStateManager.SyncAppState (cognitive 64): appStateManager.SyncAppState has cognitive complexity 64 (threshold 15). Drivers by points: if/else 55, boolean chains 6, loops 2, match/switch 1 (nesting depth added 16). Of this number, 56 points are the body\u0027s own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sync.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a36bc22c18fad0834ef0aa4e5d36ba98c18344c1e7c38e50b083402ff61a9356"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.watchEvents (cognitive 63): clusterCache.watchEvents has cognitive complexity 63 (threshold 15). Drivers by points: if/else 44, loops 16, match/switch 2, boolean chains 1 (nesting depth added 40). Most of this is not in the body itself: 0 of the 63 points are its own statements and the rest belongs to one function literal inside it that branches (line 793). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"6004c4318e64db1b6b3b49d21299774f78062027e46ff29fff398f74336afe11"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.UpdateApplicationSetApplicationStatus (cognitive 63): Manager.UpdateApplicationSetApplicationStatus has cognitive complexity 63 (threshold 15). Drivers by points: if/else 46, match/switch 9, boolean chains 6, loops 2 (nesting depth added 33). 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":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"9efdf819fb08f7f9e677cec80a56ae12ef0d79fed342e4a8ac502d2c26cc97d2"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.populateGatewayAPIRouteInfo (cognitive 60): cache.populateGatewayAPIRouteInfo has cognitive complexity 60 (threshold 15). Drivers by points: if/else 44, boolean chains 8, loops 8 (nesting depth added 32). 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":"controller/cache/info.go"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"632718a4483db5f6a9558e1b82e583bd23cb715779567992a6f83f56e8d0ac8c"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncWindows.Matches (cognitive 59): SyncWindows.Matches has cognitive complexity 59 (threshold 15). Drivers by points: if/else 38, loops 14, boolean chains 7 (nesting depth added 35). 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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3099}}}],"partialFingerprints":{"codehealthFindingId/v1":"99814ffa6782694dd395121e5a29787334b002086f2112ec4d582d6923a7173b"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDWebhookHandler.affectedRevisionInfo (cognitive 59): ArgoCDWebhookHandler.affectedRevisionInfo has cognitive complexity 59 (threshold 15). Drivers by points: if/else 40, loops 16, boolean chains 2, match/switch 1 (nesting depth added 36). 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":"util/webhook/webhook.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fc39d45520b773df0898ee129cd7ab28406b273cbe0f8629f7301aad6965bbd"}},{"ruleId":"D2","level":"warning","message":{"text":"util.SetAppSpecOptions (cognitive 58): util.SetAppSpecOptions has cognitive complexity 58 (threshold 15). Drivers by points: if/else 47, match/switch 8, loops 2, boolean chains 1 (nesting depth added 28). Of this number, 23 points are the body\u0027s own statements and 35 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/util/app.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"8066dfebd044f7cf65a68b3e555041b591ac2a8323201a39ab0846bb45c64b0d"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.UpdateApplicationSetApplicationStatusProgress (cognitive 57): Manager.UpdateApplicationSetApplicationStatusProgress has cognitive complexity 57 (threshold 15). Drivers by points: if/else 44, loops 10, boolean chains 3 (nesting depth added 39). 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":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"25e6b38102c43269c4afdbff92d855ab71702e6281893d8ea86240b088f472f5"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.populatePodInfo (cognitive 57): cache.populatePodInfo has cognitive complexity 57 (threshold 15). Drivers by points: if/else 32, boolean chains 12, loops 8, match/switch 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":"controller/cache/info.go"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac85b14f711711c124beb4f7b38fa31fcff0ba220c8e46fc5df69efa9472a6ae"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand (cognitive 56): commands.NewProjectSourceIntegrityGitPoliciesUpdateCommand has cognitive complexity 56 (threshold 15). Drivers by points: if/else 36, loops 12, boolean chains 8 (nesting depth added 16). Most of this is not in the body itself: 0 of the 56 points are its own statements and the rest belongs to one function literal inside it that branches (line 378). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dae0ba5b412050d4099ae23e07295e0c7672ba845f28e66fb6dfb01ed2a44a7"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.GetManifests (cognitive 55): Server.GetManifests has cognitive complexity 55 (threshold 15). Drivers by points: if/else 45, loops 6, boolean chains 4 (nesting depth added 22). Of this number, 23 points are the body\u0027s own statements and 32 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"4714585eadef4de1f847e360c80091ac6ca8cf37e09142e6586dee0218f54eb8"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.getResolvedValueFiles (cognitive 54): repository.getResolvedValueFiles has cognitive complexity 54 (threshold 15). Drivers by points: if/else 48, loops 5, boolean chains 1 (nesting depth added 31). Of this number, 53 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"93520e67d475944158855987135a9862f99578c7aa07c5a56165e80c132224a0"}},{"ruleId":"D2","level":"warning","message":{"text":"application.mergeLogStreams (cognitive 53): application.mergeLogStreams has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27, loops 13, match/switch 9, boolean chains 3, jumps 1 (nesting depth added 27). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 107, 81, 168, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/logs.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"9575100a53fe5e8dcb5d0e4cacede3ddc14b8ee8de1e2b5c3b1a5a54e5f00a32"}},{"ruleId":"D2","level":"warning","message":{"text":"appStateManager.GetRepoObjs (cognitive 51): appStateManager.GetRepoObjs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 47, boolean chains 2, loops 2 (nesting depth added 15). Of this number, 29 points are the body\u0027s own statements and 22 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5df5dc130be08659d758362729f87c0bec8f11ff31b3624c4018711acf3218"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.waitOnApplicationStatus (cognitive 50): commands.waitOnApplicationStatus has cognitive complexity 50 (threshold 15). Drivers by points: if/else 36, boolean chains 10, loops 3, match/switch 1 (nesting depth added 18). Of this number, 34 points are the body\u0027s own statements and 16 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2357}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d90a14479314c1267e64679ecc7995d27c6e8dab7f5f29fa0bc06fffecd22e"}},{"ruleId":"D2","level":"warning","message":{"text":"reposerver.StartGPGWatcher (cognitive 50): reposerver.StartGPGWatcher has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, loops 6, boolean chains 3, match/switch 2 (nesting depth added 32). Most of this is not in the body itself: 2 of the 50 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 32, 25). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/gpgwatcher.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa23ff9dbe69a59177040e4d13574fe2dd6772064c5c4500170c5d25da4cd386"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.GetManagedLiveObjs (cognitive 49): clusterCache.GetManagedLiveObjs has cognitive complexity 49 (threshold 15). Drivers by points: if/else 44, boolean chains 3, loops 2 (nesting depth added 25). Most of this is not in the body itself: 14 of the 49 points are its own statements and the rest belongs to one function literal inside it that branches (line 1577). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1554}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0fe16c03c48fb7dafcbf4a5091faf4c1d0fc1adf12f5ee3da1661542596f123"}},{"ruleId":"D2","level":"warning","message":{"text":"SCMProviderGenerator.GenerateParams (cognitive 49): SCMProviderGenerator.GenerateParams has cognitive complexity 49 (threshold 15). Drivers by points: if/else 45, match/switch 3, loops 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":"applicationset/generators/scm_provider.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"48fb1e1d31f0b22e3821bfe70b46b197d155ecda432e2e223a8b8ad5c7612d54"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.getManifestCacheEntry (cognitive 49): Service.getManifestCacheEntry has cognitive complexity 49 (threshold 15). Drivers by points: if/else 47, boolean chains 2 (nesting depth added 34). 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":"reposerver/repository/repository.go"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fffe918a6b490fbb5a035b1e251c80b0c232dee7c1e1ca732fca2a4991dc497"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.createOrUpdateInCluster (cognitive 48): ApplicationSetReconciler.createOrUpdateInCluster has cognitive complexity 48 (threshold 15). Drivers by points: if/else 36, loops 10, boolean chains 2 (nesting depth added 26). Most of this is not in the body itself: 4 of the 48 points are its own statements and the rest belongs to one function literal inside it that branches (line 718). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"670ffbe3c6c68b599fb5cc3ef9d2c038d4628a80ba7876b2c13d4093ac055378"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.runTasks (cognitive 47): syncContext.runTasks has cognitive complexity 47 (threshold 15). Drivers by points: if/else 36, loops 7, boolean chains 4 (nesting depth added 19). Of this number, 22 points are the body\u0027s own statements and 25 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c9a9406344a54cd4a8f757a1aa390d0afc75e9ae86d0d047c194a9c4d4ad71"}},{"ruleId":"D2","level":"warning","message":{"text":"progressivesync.buildAppDependencyList (cognitive 47): progressivesync.buildAppDependencyList has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, loops 8, boolean chains 2 (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":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb201b0f9addbe885003966182cdc7e27087cb0a6a9b0a246672096cdbaada7"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.getAppHosts (cognitive 47): ApplicationController.getAppHosts has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22, loops 19, boolean chains 5, match/switch 1 (nesting depth added 22). Of this number, 40 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc3cf3f8a14e4d9d0d9db657e7c8b680d12bfe1e1a21f19b3c41bb0490bb193"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.PodLogs (cognitive 47): Server.PodLogs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, boolean chains 4, match/switch 4, loops 2 (nesting depth added 14). Of this number, 21 points are the body\u0027s own statements and 26 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1856}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac21700a1c7ace2e4bd668c5dd062ba0a4e73378af828dbd5902efa59f0b8539"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.UpdateRevisionForPaths (cognitive 46): Service.UpdateRevisionForPaths has cognitive complexity 46 (threshold 15). Drivers by points: if/else 38, boolean chains 4, loops 4 (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":"reposerver/repository/repository.go"},"region":{"startLine":3452}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3ffc17f0669b73d0d30707a5e4335bde33f18bca3ee8d033f5fd379b3542e0"}},{"ruleId":"D2","level":"warning","message":{"text":"WebhookHandler.shouldRefreshMatrixGenerator (cognitive 45): WebhookHandler.shouldRefreshMatrixGenerator has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, boolean chains 4, loops 3 (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":"applicationset/webhook/webhook.go"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4c3b49b48286a8b6a3f8f4e77320525659b1a8241c7872679208d365bf7eab"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.NewApplicationController (cognitive 45): controller.NewApplicationController has cognitive complexity 45 (threshold 15). Drivers by points: if/else 40, loops 4, boolean chains 1 (nesting depth added 25). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3e0538ea90bd0117a7fcfc5957138568190d60684e1e63234b9c572bc16fd7"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.setApplicationHealth (cognitive 45): controller.setApplicationHealth has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33, boolean chains 11, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/health.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"045720893e715f4443e560fefdfd2d14ac757b467d64c3ec4436b47b2eba3a95"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.autoSync (cognitive 45): ApplicationController.autoSync has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33, loops 7, boolean chains 5 (nesting depth added 16). Of this number, 44 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":2519}}}],"partialFingerprints":{"codehealthFindingId/v1":"44db3416ba6f7b9ef16196de36395941ae76c732e308cdcf71c05887c247cc32"}},{"ruleId":"D2","level":"warning","message":{"text":"application.init (cognitive 45): application.init has cognitive complexity 45 (threshold 15). Drivers by points: if/else 29, loops 15, boolean chains 1 (nesting depth added 21). Most of this is not in the body itself: 0 of the 45 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 321, 281, 314). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/application/forwarder_overwrite.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"566e4abe82e6f5dc066d964394912a4aafc2b0c5a9b437dc21c3edd82b3d1644"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.populateHelmAppDetails (cognitive 45): Service.populateHelmAppDetails has cognitive complexity 45 (threshold 15). Drivers by points: if/else 37, loops 6, boolean chains 2 (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":"reposerver/repository/repository.go"},"region":{"startLine":2502}}}],"partialFingerprints":{"codehealthFindingId/v1":"684ddd2375ee94024b3fdbd0a1bb3b6798e00055fa74ba94955bd1a57746d2f0"}},{"ruleId":"D2","level":"warning","message":{"text":"files.untar (cognitive 44): files.untar has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, match/switch 2, boolean chains 1, loops 1 (nesting depth added 26). 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":"util/io/files/tar.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2e79d30a414f26f12e70fc17ab18e97abb92fb37fb2bc06c5df1522ad48e2e"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.SetAppInstanceLabel (cognitive 44): kube.SetAppInstanceLabel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, match/switch 6, boolean chains 2 (nesting depth added 26). 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":"util/kube/kube.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"394b8762f013965331ce4860ab042d88dc27b25d2e544c22ce158c6014df1723"}},{"ruleId":"D2","level":"warning","message":{"text":"health.getCorev1PodHealth (cognitive 43): health.getCorev1PodHealth has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25, boolean chains 8, loops 7, match/switch 3 (nesting depth added 19). Of this number, 36 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/health/health_pod.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5ec40a476e857b03ebb9932de8b8b316641f9814fc489fdd09734ac6c4e75e6"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewLogoutCommand (cognitive 43): commands.NewLogoutCommand has cognitive complexity 43 (threshold 15). Drivers by points: if/else 42, boolean chains 1 (nesting depth added 23). Most of this is not in the body itself: 0 of the 43 points are its own statements and the rest belongs to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/logout.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"20bf28e5e82be4cbfceb62e05fad846d549740057bf59f93e4ca17f2bb558f56"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.generateGatewayURLs (cognitive 43): cache.generateGatewayURLs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27, loops 7, boolean chains 6, match/switch 3 (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":"controller/cache/info.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"635035cdaa70e7858de8871b1dde531eb3989d5990a7da751269c0311eda0521"}},{"ruleId":"D2","level":"warning","message":{"text":"extension.validateConfigs (cognitive 43): extension.validateConfigs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 34, loops 7, boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/extension/extension.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"285955610c4e519c52f7b27b8cf3be5442241fc2e4a6ecc54388037bf6860402"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.parseAccounts (cognitive 43): settings.parseAccounts has cognitive complexity 43 (threshold 15). Drivers by points: if/else 30, match/switch 8, loops 5 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/accounts.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"91fb7e8be2eea05f51ee49c7b996e1d036261f744529f080a67b5655f114803d"}},{"ruleId":"D2","level":"warning","message":{"text":"sourceintegrity.parseGitCommitVerification (cognitive 43): sourceintegrity.parseGitCommitVerification has cognitive complexity 43 (threshold 15). Drivers by points: if/else 33, loops 4, match/switch 4, boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/gpg.go"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"d81dd419e752324adc1b82d2ab3945a18fa472119e03e0a45e347e47dc91ebbf"}},{"ruleId":"D2","level":"warning","message":{"text":"PullRequestGenerator.selectServiceProvider (cognitive 42): PullRequestGenerator.selectServiceProvider has cognitive complexity 42 (threshold 15). Drivers by points: if/else 42 (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":"applicationset/generators/pull_request.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"427a5fd8d517b4d43694862c04ae1fc9e129f3ad7f2b9994ff9adc8f627e2f9b"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.resolveSourceRevisions (cognitive 42): Server.resolveSourceRevisions has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, boolean chains 5, loops 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":2201}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2676716940f651554f189d097179ffcc7e904fb1c5539adc9231a1d25bf3e5d"}},{"ruleId":"D2","level":"warning","message":{"text":"dex.GenerateDexConfigYAML (cognitive 42): dex.GenerateDexConfigYAML has cognitive complexity 42 (threshold 15). Drivers by points: if/else 38, loops 3, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/dex/config.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"219e3445706862d45e7351b57482e7720bf48d3e649b5482a15e88ad8841323d"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeHelmChart.ExtractChart (cognitive 42): nativeHelmChart.ExtractChart has cognitive complexity 42 (threshold 15). Drivers by points: if/else 40, boolean chains 2 (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":"util/helm/client.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbf9f3357eb41dd5fe2f9fd20210cc6e0d48e11e7f00580c67d37cfc18b140c"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Update (cognitive 41): Server.Update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 34, loops 5, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/project/project.go"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d778772926efe722c920440d04a4c9ebf7eede73b724aba1baa8c3a85185e0"}},{"ruleId":"D2","level":"warning","message":{"text":"ListGenerator.GenerateParams (cognitive 40): ListGenerator.GenerateParams has cognitive complexity 40 (threshold 15). Drivers by points: if/else 31, loops 9 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/list.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bfa905609af7913817589de86ea22954d77f054e5734f8f49de698f258c1cd1"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printAppSummaryTable (cognitive 40): commands.printAppSummaryTable has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26, boolean chains 7, loops 6, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"0836345f6b671f72824053ea6704282a6a89b2dcdec2b3b18ed4eae9b5904ac8"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.executeHooks (cognitive 40): ApplicationController.executeHooks has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, loops 7, match/switch 2, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/hook.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d18c36c41601d06ec97dfb6a3c0c0f29aa20349563c6827639caa8d3b1be0ba"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.GenerateManifests (cognitive 40): repository.GenerateManifests has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, loops 3, match/switch 3, boolean chains 1 (nesting depth added 20). Of this number, 37 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1741}}}],"partialFingerprints":{"codehealthFindingId/v1":"8882face89af7978820159b602a557e8b9c385276bc13fdb9e212a3bd5703ca4"}},{"ruleId":"D2","level":"warning","message":{"text":"tgz.tgzFile (cognitive 40): tgz.tgzFile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 4, boolean chains 1 (nesting depth added 18). Of this number, 38 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/io/files/tar.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a4764355734a8660fc98f4b7f3b2f411f1f91c28417febee28feb8c5e86756"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.buildGraph (cognitive 39): cache.buildGraph has cognitive complexity 39 (threshold 15). Drivers by points: if/else 31, loops 8 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1479}}}],"partialFingerprints":{"codehealthFindingId/v1":"949afa94c13520cad33c9aafff197c7116fdb1e27ef65a924711e8952eaaf2b1"}},{"ruleId":"D2","level":"warning","message":{"text":"db.RemoveRepoCertificates (cognitive 39): db.RemoveRepoCertificates has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28, loops 9, boolean chains 2 (nesting depth added 20). 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":"util/db/certificate.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fa4ecf23e4cabf75f9584f8818a6ee6ca2795715b02dd623772fd862bbfbbc"}},{"ruleId":"D2","level":"warning","message":{"text":"template.GenerateApplications (cognitive 38): template.GenerateApplications has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, loops 6 (nesting depth added 26). 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":"applicationset/controllers/template/template.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60da3749d1d24e757044d8c4bec6f35827e888f4ebeadc4e90fcfee687feed5"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.PerformReverseDeletion (cognitive 38): Manager.PerformReverseDeletion has cognitive complexity 38 (threshold 15). Drivers by points: if/else 25, match/switch 10, loops 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb033917df2b7569290957236ae807ac6a6e996676fe4703b326c97d8ebd612"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDServer.watchSettings (cognitive 38): ArgoCDServer.watchSettings has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/server.go"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"b03025532da59f88c1ed99e83dd42699461db7bebf93422f96042ef7fa415db1"}},{"ruleId":"D2","level":"warning","message":{"text":"compressedLayerExtracterStore.Push (cognitive 38): compressedLayerExtracterStore.Push has cognitive complexity 38 (threshold 15). Drivers by points: if/else 35, boolean chains 3 (nesting depth added 20). Of this number, 23 points are the body\u0027s own statements and 15 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oci/client.go"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"257ed10ea7aed84f8f2dc50ea3803c3cc0aaef4790f66c73c0c866b1c0256e52"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.HideSecretData (cognitive 37): diff.HideSecretData has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26, boolean chains 7, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd0802a89871535e064a21e1d3822a1e340c3389de9096a962336f8548c347b"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.generateProjectAllowList (cognitive 37): admin.generateProjectAllowList has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24, loops 13 (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":"cmd/argocd/commands/admin/project_allowlist.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"983ae965afd3bcc93e52e80036d191f56945d05a328aa3912ecd870caef76c94"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.CopyCredentialsFrom (cognitive 37): Repository.CopyCredentialsFrom has cognitive complexity 37 (threshold 15). Drivers by points: if/else 37 (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":"pkg/apis/application/v1alpha1/repository_types.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b440f5069da80c6396bbec98f2004143e847d28e80b1a31a80f2b91496f9871"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.setApplicationSetStatusCondition (cognitive 36): ApplicationSetReconciler.setApplicationSetStatusCondition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, loops 4, boolean chains 2, match/switch 2 (nesting depth added 15). Of this number, 32 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8ee5deed666b1017252b5dd3efb0991e0d504821b468709c5d715f16ac40f8"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewLoginCommand (cognitive 36): commands.NewLoginCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 34, boolean chains 1, match/switch 1 (nesting depth added 19). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 62). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/login.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4262bc99c6cde7e762abef838e686e76f11bd6af6c71818fbf2d6282858228be"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationDiffCommand (cognitive 35): commands.NewApplicationDiffCommand has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21, boolean chains 8, loops 5, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 0 of the 35 points are its own statements and the rest belongs to one function literal inside it that branches (line 649). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"196bf62ff41f675d490ba8b1ff4cf81528b8670b3aed2ec712f5ff5d475b9d7a"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.cleanupHooks (cognitive 35): ApplicationController.cleanupHooks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 5, boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/hook.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"1267709b38cbb07ca18fb309dc66c823cd10cac64ef8f1febbda20a8d512869a"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizers.normalize (cognitive 35): normalizers.normalize has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, loops 4, boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/normalizers/knowntypes_normalizer.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a0769bf329983d344f951b262e9b6854b6f88b988c3116c3c8803db3f6a8ded"}},{"ruleId":"D2","level":"warning","message":{"text":"db.ListRepoCertificates (cognitive 35): db.ListRepoCertificates has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23, loops 8, boolean chains 4 (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":"util/db/certificate.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"37028fa59a33f5e6fc0b125c60c398a5bd95411d558f5143e8a8b95f44125a3d"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeOCIClient.extract (cognitive 35): nativeOCIClient.extract has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, loops 2 (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":"util/oci/client.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"b17e3bb70445ad2bf023f76ba2312ae54bc58d1e79fd6c700794ca8635a06d95"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterSecretEventHandler.queueRelatedAppGenerators (cognitive 34): clusterSecretEventHandler.queueRelatedAppGenerators has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, loops 3 (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":"applicationset/controllers/clustereventhandler.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7cdd22bec62bb593c19060b4a9b3f775561c5383bebfd97f5159015d1c24f0"}},{"ruleId":"D2","level":"warning","message":{"text":"generators.Transform (cognitive 34): generators.Transform has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 3, boolean chains 1 (nesting depth added 20). 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":"applicationset/generators/generator_spec_processor.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b65ddbc694a746d37bdea4b093b1a3026fa661ae836943807570e3feea73379"}},{"ruleId":"D2","level":"warning","message":{"text":"Cluster.RawRestConfig (cognitive 34): Cluster.RawRestConfig has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, loops 4, boolean chains 3, match/switch 3 (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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3964}}}],"partialFingerprints":{"codehealthFindingId/v1":"616e68118ac1d07b885346df6940a7fe7ee1d27743b6ce6254e5d9b762abce89"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.getHelmRepos (cognitive 34): repository.getHelmRepos has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, boolean chains 7, loops 6 (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":"reposerver/repository/repository.go"},"region":{"startLine":1136}}}],"partialFingerprints":{"codehealthFindingId/v1":"44dc696a9cc7a0e5cb45a413e73c7b353bc01c44e116403a2eae1d1e36f7679a"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Get (cognitive 34): Server.Get has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, boolean chains 2, match/switch 2, loops 1 (nesting depth added 13). Of this number, 27 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da1e4a7eb06f8a916ce1b4f8ce17fe3c9452507b2fb5885df91343cf52a125a"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeHelmChart.GetTags (cognitive 34): nativeHelmChart.GetTags has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, boolean chains 3, loops 2 (nesting depth added 15). Of this number, 32 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/client.go"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"4baf8071b4bde222d91161d58eaed02cde031274cb746987dbf9ac4b74555ec4"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.setNode (cognitive 33): clusterCache.setNode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 3, loops 2 (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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"6688aac9e6e35a6f4ddd75c4db4da7c8715294426d4fe0d3445a83f3f1a7201e"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.applyObject (cognitive 33): syncContext.applyObject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, boolean chains 7 (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":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"897f32a0784abbe3096195759942ff7f62de902474e17b6504fb5307f4202d33"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.setAppSetApplicationStatus (cognitive 33): ApplicationSetReconciler.setAppSetApplicationStatus has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, loops 2, boolean chains 1 (nesting depth added 19). Of this number, 26 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c065ee49dba1edba7be5e8ce2a255f9e7bbd01eef9ba504dad6e30cb7ffb0e"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.RotateAuth (cognitive 33): Server.RotateAuth has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/cluster/cluster.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"4231b75c56eabc15b743157148f82dfb72e382818f38fa47fa0b25243a276cc0"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.onNodeRemoved (cognitive 32): clusterCache.onNodeRemoved has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23, loops 8, boolean chains 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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1725}}}],"partialFingerprints":{"codehealthFindingId/v1":"427a7c1fee0d704ff66967650cafdb63c53d1cb9368e1e27d3747bcf4333e3ba"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.loadClusters (cognitive 32): admin.loadClusters has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, loops 4, boolean chains 1 (nesting depth added 12). Of this number, 25 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b93ffba7b35522e0cf1f6d8574a4156c17deb7bfa6f51e76fbf7ca5ee8bdd30"}},{"ruleId":"D2","level":"warning","message":{"text":"liveStateCache.getCluster (cognitive 32): liveStateCache.getCluster has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25, boolean chains 6, loops 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 593, 555). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/cache.go"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc9a46597799ff947de1346f2c1e9a6c2a2d14c0b9f82b2e71a2f88919c2371"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Sync (cognitive 32): Server.Sync has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, boolean chains 3, loops 2 (nesting depth added 5). 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":"server/application/application.go"},"region":{"startLine":2085}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed82f808058a5dd19d097fdc2ad857ed4f6cdf6a6c484a3e75b0c6ee22961f9"}},{"ruleId":"D2","level":"warning","message":{"text":"kustomize.getImages (cognitive 32): kustomize.getImages has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20, loops 9, match/switch 2, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/kustomize/kustomize.go"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"8793cb937c90b26d211a448efa8642c77cde1f551d6d02bd38dea686c277ca72"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsManager.InitializeSettings (cognitive 32): SettingsManager.InitializeSettings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, boolean chains 3, loops 3 (nesting depth added 13). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 2442). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":2440}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1604c9af2d80336562c8e44ca5c7913947ad1205241b0eb38c3a148979246f6"}},{"ruleId":"D2","level":"warning","message":{"text":"tls.CreateServerTLSConfig (cognitive 32): tls.CreateServerTLSConfig has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/tls/tls.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa7580e04344c5a612d1d4e438f5588c5fb209dc9079adff2acadaf083dd4ba"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.hide (cognitive 31): diff.hide has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, loops 3 (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":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":1172}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8b016ea6ec3b797be89bba71e97d973075cc9a81bf855428eedf6a577ebb80"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationSetDeleteCommand (cognitive 31): commands.NewApplicationSetDeleteCommand has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20, loops 6, boolean chains 5 (nesting depth added 16). Most of this is not in the body itself: 0 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 391). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e5d4f65ea5f072986fd28fe6ac02596ee410253329bafb74712f39706435e5"}},{"ruleId":"D2","level":"warning","message":{"text":"headless.MaybeStartLocalServer (cognitive 31): headless.MaybeStartLocalServer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/headless/headless.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b51d74727257d6d0cff9bd7b67890ab629fb1b2a19a5aa320a833b956ac1b5c"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.getResourceTree (cognitive 31): ApplicationController.getResourceTree has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, boolean chains 3, loops 3 (nesting depth added 7). Of this number, 22 points are the body\u0027s own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e2ba88a43465459211e802f8f100871eef5620b6473d9179dc8355e8547417"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.handleRefreshAnnotation (cognitive 31): ApplicationController.handleRefreshAnnotation has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, boolean chains 2 (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":"controller/appcontroller.go"},"region":{"startLine":2301}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1699c6d25d6b8ce9d5fc203668ba91b2ceb34920638eabe15e1a27a964ed03b"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.populateNodeInfo (cognitive 31): cache.populateNodeInfo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20, match/switch 7, loops 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/info.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"0463620effebdc3ca4bcd1c2452924015fa62e0883577c88d3a2bfe44a6ac5ad"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.populateIstioVirtualServiceInfo (cognitive 31): cache.populateIstioVirtualServiceInfo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, loops 6, boolean chains 3 (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":"controller/cache/info.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d97af956d1b7bc480f0e0c98c4ab8fcadd43e2b83056feb99266b9fde705e0"}},{"ruleId":"D2","level":"warning","message":{"text":"Repository.CopyCredentialsFromRepo (cognitive 31): Repository.CopyCredentialsFromRepo has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/repository_types.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"38376a0ee91a809568a5e4238bb5738d0328a4c53baa10e6411263bed6a8fc68"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.RunResourceActionV2 (cognitive 31): Server.RunResourceActionV2 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 2, match/switch 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":"server/application/application.go"},"region":{"startLine":2663}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddd95efe6b86025fa57d580898dea26d1e26e4ae64dd8eb643d094b7d8604ab"}},{"ruleId":"D2","level":"warning","message":{"text":"terminalHandler.ServeHTTP (cognitive 31): terminalHandler.ServeHTTP has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, loops 2, boolean chains 1 (nesting depth added 4). 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":"server/application/terminal.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0aef3957d2c79839c44e6d16bb0b095a79a96f14d240f8c940dab94cbcdbc9"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.isSourceInHistory (cognitive 31): repository.isSourceInHistory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 3, boolean chains 1 (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":"server/repository/repository.go"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"94112247049d3c3f14e754363570c27295264adfa616e2ea3f0bec7dcff568f5"}},{"ruleId":"D2","level":"warning","message":{"text":"GitGenerator.generateParamsFromGitFile (cognitive 30): GitGenerator.generateParamsFromGitFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 7 (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":"applicationset/generators/git.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b1bc487b700056a4c9a0f86539da95d433ec9b80938860904e143f37df24f11"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewGenDexConfigCommand (cognitive 30): commands.NewGenDexConfigCommand has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, loops 10 (nesting depth added 21). Most of this is not in the body itself: 0 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 159). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-dex/commands/argocd_dex.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a372bcb332717bbb9a0ed6eb73f33028c8abd020baa107c22cba17b689fb482"}},{"ruleId":"D2","level":"warning","message":{"text":"sharding.GetClusterSharding (cognitive 30): sharding.GetClusterSharding has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sharding/sharding.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb89146039a5316b51b774719dd9c65c644cfdd941ea95f3ca07ec619eac7552"}},{"ruleId":"D2","level":"warning","message":{"text":"application.streamApplicationListJSON (cognitive 30): application.streamApplicationListJSON has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, 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":"pkg/apiclient/application/forwarder_overwrite.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e4e88a1fd71ec6322dfaa35bb2315214acf591b3188bbfbb8375b60e824601"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncWindows.CanSync (cognitive 30): SyncWindows.CanSync has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":3179}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47e533771584b5ef9edd0c3d8aea194d8068080010784f1b414271238c61eb6"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.sync (cognitive 29): clusterCache.sync has cognitive complexity 29 (threshold 15). Drivers by points: if/else 28, loops 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1175, 1101). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5bef1fdad819c8d93e29e1f0cee976238817b4fb0e2c21e6bdd121e28a8283"}},{"ruleId":"D2","level":"warning","message":{"text":"WebhookHandler.shouldRefreshMergeGenerator (cognitive 29): WebhookHandler.shouldRefreshMergeGenerator has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/webhook/webhook.go"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"16cb96ff72fedbbc7535e56e2fb083984e6dd092d2cd03026a5b3e2d944d06f4"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printResources (cognitive 29): commands.printResources has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16, boolean chains 6, loops 6, match/switch 1 (nesting depth added 13). 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":"cmd/argocd/commands/app_resources.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f107d8df795baac799b06733974975044b9a01e99de3c60d281a03e608b14ed"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewClusterAddCommand (cognitive 29): commands.NewClusterAddCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 4, match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/cluster.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"52907a9ebfd97ca3f3cea22ae390b874f255e2a25b61c45c0ce2e688b83e9b9e"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewRepoAddCommand (cognitive 29): commands.NewRepoAddCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 5 (nesting depth added 6). Most of this is not in the body itself: 0 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 117). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/repo.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"872aeca2bc864a6870ed81bb90678a50647e4df12bf676066f4f6b8d1ca59679"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.handleObjectUpdated (cognitive 29): ApplicationController.handleObjectUpdated has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 4, boolean chains 3 (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":"controller/appcontroller.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1564939ee3264681a544f6294e41fce983083ec95d78921cf1e3c78a00437dd"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizers.NewIgnoreNormalizer (cognitive 29): normalizers.NewIgnoreNormalizer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 6, boolean chains 1 (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":"util/argo/normalizers/diff_normalizer.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c4f65e774667f7a3e3bf7733269fe9b4a1b99372dc3f497d837ffbcce4eed9"}},{"ruleId":"D2","level":"warning","message":{"text":"exec.RunCommandExt (cognitive 29): exec.RunCommandExt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, match/switch 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/exec/exec.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4680eeba269fde55a4053df7cef1e14e03c4c78b4e019f4fe68e1116d27285"}},{"ruleId":"D2","level":"warning","message":{"text":"legacyConfig.merge (cognitive 29): legacyConfig.merge has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, boolean chains 2, loops 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":"util/notification/settings/legacy.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3357c50718655277ddcb5bce0d2f0781ec15e3a27c9ae9e4a95e908aa9cbba"}},{"ruleId":"D2","level":"warning","message":{"text":"AWSCodeCommitProvider.listRepoNames (cognitive 28): AWSCodeCommitProvider.listRepoNames has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, loops 10 (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":"applicationset/services/scm_provider/aws_codecommit.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff27d5c61b140538b2996cbb0d2956642293de6c9ced9935cd28abfef73140c"}},{"ruleId":"D2","level":"warning","message":{"text":"webhook.shouldRefreshPRGenerator (cognitive 28): webhook.shouldRefreshPRGenerator has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, 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":"applicationset/webhook/webhook.go"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"571ef263808dbf6800e267176630f002d8e9ac04839e47c31d31a4250c92dadf"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewCommand (cognitive 28): commands.NewCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 4, loops 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-server/commands/argocd_server.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"3730600464a8c51bf15084bdda9b8a44318189b38a37b39ec1d1900a50f0975d"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewExportCommand (cognitive 28): admin.NewExportCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 5, boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 0 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f5270371aadccefe9e542d8bcb0cee14d8c3c01c9d6a4f7c4cfc50c5c2fe6e"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.runClusterNamespacesCommand (cognitive 28): admin.runClusterNamespacesCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, loops 9 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"f93b9f475e00304b95455d35c2379afb04e6e468ed015647acd2346a124526ed"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.updateProjects (cognitive 28): admin.updateProjects has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, loops 6, boolean chains 4, match/switch 3 (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":"cmd/argocd/commands/admin/project.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab920b5bd610a51451e9764092178a6996fc007062a1fe64ea8b35035229d039"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.GetManifestsWithFiles (cognitive 28): Server.GetManifestsWithFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, loops 1 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac948671e51c10e520ccfdef7c716a4784e147f5a789d106475007060c30d7e9"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.validateAndNormalizeApp (cognitive 28): Server.validateAndNormalizeApp has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1322}}}],"partialFingerprints":{"codehealthFindingId/v1":"756dc98629483e5f35d4e866fe49b4a976464524ed773c174fd10d6cd071ea81"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientApp.SetGroupsClaimFromEndpoint (cognitive 28): ClientApp.SetGroupsClaimFromEndpoint has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc.go"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"88bdd971f88fe598e8d20b2ad7b88351b44920b39d46ec801e2834ba520289b8"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionManager.Parse (cognitive 28): SessionManager.Parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 3 (nesting depth added 7). Of this number, 27 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/session/sessionmanager.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b150e2639cc27369a9098e922a37d10033261de8524f9e1b471dba371dddce"}},{"ruleId":"D2","level":"warning","message":{"text":"sourceintegrity.SyncKeyRingFromDirectory (cognitive 28): sourceintegrity.SyncKeyRingFromDirectory has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, loops 3, boolean chains 1 (nesting depth added 8). Of this number, 25 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/gpg.go"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"12582036b1f4dd807aa30c2809b0131350b33731f1dff759c61fbdd8b3f9a1da"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDWebhookHandler.HandleRegistryEvent (cognitive 28): ArgoCDWebhookHandler.HandleRegistryEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, loops 4, 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":"util/webhook/registry.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0a5af257478931acb67d07d8b2fb72beaf43765322aaf7c760206743db927d"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.processCrossNamespaceChildren (cognitive 27): clusterCache.processCrossNamespaceChildren has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, loops 3 (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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1348}}}],"partialFingerprints":{"codehealthFindingId/v1":"55fa0b6e2fbee784359508818b8e25c5ebd18d248b190726eb65eac60758a5b2"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printApplicationHistoryTable (cognitive 27): commands.printApplicationHistoryTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, loops 7, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2598}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea6990a3954780fa504ce1ee0fb147fa34009c9215944b10e3b8e5f763b0b36"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationManifestsCommand (cognitive 27): commands.NewApplicationManifestsCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10, loops 10, boolean chains 4, match/switch 3 (nesting depth added 9). Most of this is not in the body itself: 0 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 2824). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2797}}}],"partialFingerprints":{"codehealthFindingId/v1":"58874d06a4a51bab058ee20f18a4841a65eba0961fa9853a77f7ae3fe550142a"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultPluginHandler.ListAvailablePlugins (cognitive 27): DefaultPluginHandler.ListAvailablePlugins has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 3, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/plugin.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"60667021c358144d2b2ab8b50858b9b16ffa6bfab29c5f898676b8241ac9409d"}},{"ruleId":"D2","level":"warning","message":{"text":"VM.ExecuteResourceActionDiscovery (cognitive 27): VM.ExecuteResourceActionDiscovery has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, loops 4 (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":"util/lua/lua.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93bb881a43e896740b90d473b9e847ec77a5567511e83cfde2150a7b5776767"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientApp.GetUserInfo (cognitive 27): ClientApp.GetUserInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, match/switch 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc.go"},"region":{"startLine":973}}}],"partialFingerprints":{"codehealthFindingId/v1":"642a42b8c14e6fe3ef5d55c779a68d765d27d306040fb4d7f2646ce2c23ea5c3"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.startMissingWatches (cognitive 26): clusterCache.startMissingWatches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24, boolean chains 1, loops 1 (nesting depth added 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 678). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b559d6e5c14e017018fa8960407ec4eea94d88fbba6636c8c12309d7013c2f"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.terminateHooksPreemptively (cognitive 26): syncContext.terminateHooksPreemptively has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64c3e5d292554d761bd05c5987fba697ee91580f4f771a361ed3448178f4105"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.removeFinalizerOnInvalidDestination (cognitive 26): ApplicationSetReconciler.removeFinalizerOnInvalidDestination has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, loops 4, 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":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca42d18b4eefaa7be44e1b172cca0d63a7253e674588b0ce305faf80ef6dd4e4"}},{"ruleId":"D2","level":"warning","message":{"text":"DuckTypeGenerator.GenerateParams (cognitive 26): DuckTypeGenerator.GenerateParams has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 5, loops 5 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/duck_type.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ebafb6804d2200b5862a5397c4f5cfddcd555dd975fa6826c548726eba83fa"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.newServerSideDiffStrategy (cognitive 26): commands.newServerSideDiffStrategy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 8, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 222). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c06e1c253539a2dd66a33636620c20f4d4d9f5b595a44209f9a85d03215421"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewRepoCredsAddCommand (cognitive 26): commands.NewRepoCredsAddCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 4 (nesting depth added 6). Most of this is not in the body itself: 0 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/repocreds.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94a11238e3315cea7e70c2136a444e8a746cfc2d25e92698efbc9fa9e992876"}},{"ruleId":"D2","level":"warning","message":{"text":"main.generateCommandsDocs (cognitive 26): main.generateCommandsDocs has cognitive complexity 26 (threshold 15). Drivers by points: loops 15, if/else 11 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hack/gen-catalog/main.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"444d7323ad3e64f1c9f5b5868b70eef7470c844beeb5d71d71f6abf9ec1b7bc1"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.getObjsFromYAMLOrJSON (cognitive 26): repository.getObjsFromYAMLOrJSON has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, boolean chains 1 (nesting depth added 13). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":2049}}}],"partialFingerprints":{"codehealthFindingId/v1":"6270e4179eccf88c0a02235deff8eadc2494d343e6c2a725bd490f3a396166ce"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDServer.getClaims (cognitive 26): ArgoCDServer.getClaims has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/server.go"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"8667b0ffe278fa21fa61b08c6d9e2b190bc61f33e605c393043304b79dc76c15"}},{"ruleId":"D2","level":"warning","message":{"text":"syncTasks.adjustDeps (cognitive 25): syncTasks.adjustDeps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, loops 9 (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":"gitops-engine/pkg/sync/sync_tasks.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"7af5f56186fcc60e870378bb42c73a74109215c3946d09fc8b79266dbbf5ffeb"}},{"ruleId":"D2","level":"warning","message":{"text":"MatrixGenerator.GenerateParams (cognitive 25): MatrixGenerator.GenerateParams has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 3 (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":"applicationset/generators/matrix.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"156d79f96f4c28b559231691cf402d9fb556f7fbc46737846538d340af250dc0"}},{"ruleId":"D2","level":"warning","message":{"text":"scm_provider.matchFilter (cognitive 25): scm_provider.matchFilter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/services/scm_provider/utils.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f790df35e6f67619920ab85d40659ff8eebee60b7906643524fe95d5807ec90"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationGetCommand (cognitive 25): commands.NewApplicationGetCommand has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, boolean chains 2, match/switch 2 (nesting depth added 7). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 380). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"533719e60bd3cac448d67528de07d0c5e8166a2fe7e62f7818695b29af468d6c"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationLogsCommand (cognitive 25): commands.NewApplicationLogsCommand has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 3, boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 575). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47b11c28421872bb529c195b3c652560f0dc3a1584ce79568edd997d3b2a4aa"}},{"ruleId":"D2","level":"warning","message":{"text":"util.setHelmOpt (cognitive 25): util.setHelmOpt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/util/app.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aac4acc822489cff0f995028a0c940b76ac04d2803362df46aa228725f814cd"}},{"ruleId":"D2","level":"warning","message":{"text":"Hydrator.ProcessHydrationQueueItem (cognitive 25): Hydrator.ProcessHydrationQueueItem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 7 (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":"controller/hydrator/hydrator.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"2729773eb7992dd77224a99664db21c6621a819a13b114fc23df6412ef250e3d"}},{"ruleId":"D2","level":"warning","message":{"text":"apiclient.buildTLSClientConfig (cognitive 25): apiclient.buildTLSClientConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 12). Of this number, 15 points are the body\u0027s own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/apiclient/clientset.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a1c1485ea2779a0e9f01f2e897e1cfe276711db763a25d24111b77db145238"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.findManifests (cognitive 25): repository.findManifests has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d81d15ff5f5c45642b1b2f4b0e889073a708cb257fe0930c7ae7855a165c052"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDServer.Run (cognitive 25): ArgoCDServer.Run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, match/switch 2 (nesting depth added 4). Of this number, 17 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. 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":"server/server.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"d958df2834dc2bb4998cd95e7724aed70b3ae436d4b21edcc1b12dcbbb733432"}},{"ruleId":"D2","level":"warning","message":{"text":"argo.ValidatePermissions (cognitive 25): argo.ValidatePermissions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, loops 2, boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/argo.go"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2651ed85db34bdeba5027d66747f16111f95b2f8e9736716fdd59b76d27522"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsManager.appendResourceOverridesFromSplitKeys (cognitive 25): SettingsManager.appendResourceOverridesFromSplitKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, match/switch 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"69502aa525b02bbdcdbeff84b80afe76825a2475cee31e5a2a49957108ca98e8"}},{"ruleId":"D2","level":"warning","message":{"text":"sourceintegrity.GetInstalledPGPKeys (cognitive 25): sourceintegrity.GetInstalledPGPKeys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/gpg.go"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"a92a6f9d27dc2a1ca539053c6cea1aaf9e7e319a7544b6d0140f47110363d0b7"}},{"ruleId":"D2","level":"warning","message":{"text":"AzureDevOpsProvider.GetBranches (cognitive 24): AzureDevOpsProvider.GetBranches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/services/scm_provider/azure_devops.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d7f0c1fd404b1bf6ebb55b6687d121681415cecc8e88dc906c74726dc1560a"}},{"ruleId":"D2","level":"warning","message":{"text":"Render.RenderGeneratorParams (cognitive 24): Render.RenderGeneratorParams has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 360). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/utils/utils.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cc804e7eb851c4ebf6810c3619d37ddf5495a9a67a1de2b5b0ab34acb9a3dce"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.setOperationState (cognitive 24): ApplicationController.setOperationState has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 3 (nesting depth added 6). Of this number, 21 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea001df9ba91eff921ddcc0d9c1977d18b031746ef2fec49dd696bfa6d2b2ee"}},{"ruleId":"D2","level":"warning","message":{"text":"sharding.getOrUpdateShardNumberForController (cognitive 24): sharding.getOrUpdateShardNumberForController has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14, loops 8, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sharding/sharding.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf96318808bc68b212421f19ec6e6f12fc8c676d3826e0493c9f3408c16f46a3"}},{"ruleId":"D2","level":"warning","message":{"text":"appStateManager.evaluateRevisionChanges (cognitive 24): appStateManager.evaluateRevisionChanges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6036084249b58a358020c706d8c61d29cdff11ea380c9fb80553f50bfbe25d"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.getPotentiallyValidManifestFile (cognitive 24): repository.getPotentiallyValidManifestFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":2143}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa408ae8cbbe85f6dfbc125f066aa53f5f8914b03bfc26dd9e65c9334cc96fcd"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Get (cognitive 24): Server.Get has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/settings/settings.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f06cb2fb21787a392faed5c5a3a84484eb7c1e9c5b85433706f78b105de610e4"}},{"ruleId":"D2","level":"warning","message":{"text":"argo.GetRefSources (cognitive 24): argo.GetRefSources has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 4, boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/argo.go"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a1d88530676210aa4696bc441fd4792a4fd51b00ca6485bc2ca28f331beb55"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.NormalizeSecret (cognitive 23): diff.NormalizeSecret has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"504db38bcc9d512f394589c61d8ea6ffc11b52fd76a25c82b72403bb9979151a"}},{"ruleId":"D2","level":"warning","message":{"text":"MergeGenerator.GenerateParams (cognitive 23): MergeGenerator.GenerateParams has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, loops 4 (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":"applicationset/generators/merge.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da3379be73cfcc4c499a0fc7180375c951f5408a50dca9f2a49b0551277f737"}},{"ruleId":"D2","level":"warning","message":{"text":"GitHubMetricsTransport.RoundTrip (cognitive 23): GitHubMetricsTransport.RoundTrip has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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":"applicationset/services/github_metrics.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5aa8250d1d708c35798eff6950eea0cdce0645e7abcff026f433a980106e83"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.getResourceStates (cognitive 23): commands.getResourceStates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 7, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2151}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbabf4e98c58b76e33b948cc1474e0d3ec1931c692a2d824a31d6fe8761024f"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.Run (cognitive 23): ApplicationController.Run has cognitive complexity 23 (threshold 15). Drivers by points: loops 15, if/else 8 (nesting depth added 7). Of this number, 12 points are the body\u0027s own statements and 11 belong to 6 function literals inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"e324238b0af3c9fe6056e3428c214519baf80e8cec64692501381c9bf95e02b2"}},{"ruleId":"D2","level":"warning","message":{"text":"client.WatchApplicationSetWithRetry (cognitive 23): client.WatchApplicationSetWithRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 5 (nesting depth added 14). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 814). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/apiclient.go"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1829db51e867e79b9ddf5880cebf5b86971ff318076895be759b8f4df42421"}},{"ruleId":"D2","level":"warning","message":{"text":"client.WatchApplicationWithRetry (cognitive 23): client.WatchApplicationWithRetry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18, loops 5 (nesting depth added 14). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 857). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/apiclient.go"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2bef0a0be2e47141dc3a5ca84750ed090dc11d62c524e5f3d202b223c84e54"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.UpdatePassword (cognitive 23): Server.UpdatePassword has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 2 (nesting depth added 5). 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":"server/account/account.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0a0c3a5f60899e610ee0bf985d77e78d1a58a4d12f67819d9296a57e8b23d1"}},{"ruleId":"D2","level":"warning","message":{"text":"server.bug21955WorkaroundInterceptor (cognitive 23): server.bug21955WorkaroundInterceptor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/server.go"},"region":{"startLine":1728}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a071f9c1db79738604f4d8ca8e352ef6856a62f7e6ef5081991927fb61cb84"}},{"ruleId":"D2","level":"warning","message":{"text":"discovery.DetectConfigManagementPlugin (cognitive 23): discovery.DetectConfigManagementPlugin has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/app/discovery/discovery.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"994491dbbe01228e36dfd68c9d7158af996779f7613255d73f13756c0af649cf"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.getRefs (cognitive 23): nativeGitClient.getRefs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 4 (nesting depth added 5). Of this number, 18 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"a264be613817faa4a5910a769845bbc7d2d4d1c01bedfd11245f065570618e62"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.LsSignatures (cognitive 23): nativeGitClient.LsSignatures has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":1297}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5a6d6197203f2bdb328d1868fd4c3998c031f8f73b7d91523c3c5ee27fa6112"}},{"ruleId":"D2","level":"warning","message":{"text":"manifeststream.receiveFile (cognitive 23): manifeststream.receiveFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/manifeststream/stream.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb6b8d3e077709a66125a525db6f3a36783e53e61fa941b8e9a20b02d1b0921"}},{"ruleId":"D2","level":"warning","message":{"text":"Enforcer.EnforceErr (cognitive 23): Enforcer.EnforceErr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 3 (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":"util/rbac/rbac.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"697ad6428d6b94d89cd879e2cdcb95af545c134c941001c89e86511fbb2fb0e0"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewRunDexCommand (cognitive 22): commands.NewRunDexCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-dex/commands/argocd_dex.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5ac76f657091f1ea38a23f5cc1869ece3a6259e3a69b3441d64e759121b5ed"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationSetCreateCommand (cognitive 22): commands.NewApplicationSetCreateCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, match/switch 4, boolean chains 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2778bc674c8f46d1981861adc3f741aa316f498b8b9700a9922ec9db6807f56"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewClusterRemoveCommand (cognitive 22): commands.NewClusterRemoveCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/cluster.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c5c1435e4b861f2b166d2d0be3775d872074d61c1f80986ea8a4fb26486227"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewVersionCmd (cognitive 22): commands.NewVersionCmd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 42). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/version.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28593af876ddfbe53f7825d81a6940ab48d6f5ef1568abb34e231e6cda7754f"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.persistAppStatus (cognitive 22): ApplicationController.persistAppStatus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (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":"controller/appcontroller.go"},"region":{"startLine":2422}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee03543041d8764910bfe60c911f79c762362c0cecb8bd61fba6f9bade56122"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.applicationEventHandlerFuncs (cognitive 22): ApplicationController.applicationEventHandlerFuncs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 6 (nesting depth added 2). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2913, 2948, 2900). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":2898}}}],"partialFingerprints":{"codehealthFindingId/v1":"d972886b4fa829bf65aa22b828cbf42173138970984f8e890cf1800e63543a28"}},{"ruleId":"D2","level":"warning","message":{"text":"client.executeRequest (cognitive 22): client.executeRequest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (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":"pkg/apiclient/grpcproxy.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ef5ae2acb77359c79c08a8d22eccf88ffcf0e2955498f7963f4a0128572bff4"}},{"ruleId":"D2","level":"warning","message":{"text":"client.startGRPCProxy (cognitive 22): client.startGRPCProxy has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/grpcproxy.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"6310c2fc801d1b09dfdc2b7d26fda6e710af155a02429cdea79ffd84c5bfe6b6"}},{"ruleId":"D2","level":"warning","message":{"text":"application.parseLogsStream (cognitive 22): application.parseLogsStream has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 9, if/else 8, loops 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/logs.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"46a361a4dcfd02cde09d6c659d85e5e5e1d6f86e699182638b3a8db1f9527069"}},{"ruleId":"D2","level":"warning","message":{"text":"Handler.ServeHTTP (cognitive 22): Handler.ServeHTTP has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 1 (nesting depth added 4). 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":"server/logout/logout.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"73bb7df7714576725aeb67bc60e2c50cb86368a61bb8c2625e03e3447ef84827"}},{"ruleId":"D2","level":"warning","message":{"text":"ArgoCDServer.newStaticAssetsHandler (cognitive 22): ArgoCDServer.newStaticAssetsHandler has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 3 (nesting depth added 7). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1476). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/server.go"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ebc4c8314d68be26ed245850c1493de394264ce20708e8699ff2049379a5cb5"}},{"ruleId":"D2","level":"warning","message":{"text":"path.CheckOutOfBoundsSymlinks (cognitive 22): path.CheckOutOfBoundsSymlinks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/app/path/path.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9de90f767cf7aa7811bc71aa279f7c531052cfec9efe30da756df56b9bf4e08"}},{"ruleId":"D2","level":"warning","message":{"text":"git.DiscoverGitHubAppInstallationID (cognitive 22): git.DiscoverGitHubAppInstallationID has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, loops 2 (nesting depth added 4). 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":"util/git/creds.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"184128d36e0bb28ecdfa7f425c61c21ba39be709c1d3282fdc42d182ca0f2f50"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.LsFiles (cognitive 22): nativeGitClient.LsFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 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":"util/git/client.go"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c117a88a46ce2636955fbd9583a7b3c5243f33c7d0ed965aae000e7407bf77"}},{"ruleId":"D2","level":"warning","message":{"text":"helm.DependencyBuild (cognitive 22): helm.DependencyBuild has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/helm.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a26b21f444726d2e268d5aa4270e9d9559dfd41e6517e0f6a3a34f72b915168"}},{"ruleId":"D2","level":"warning","message":{"text":"lua.cleanReturnedObj (cognitive 22): lua.cleanReturnedObj has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, match/switch 7, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/lua/lua.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3b6ed001c688e1d34da38c5c465f3ebc3fc3f7a8bbb88ded7b13ce4fc9b431"}},{"ruleId":"D2","level":"warning","message":{"text":"ClientApp.HandleCallback (cognitive 22): ClientApp.HandleCallback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc.go"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d4a6089040a9e3e74cd4f03f0cb89ae4ebc359f26bc3c530d16a7cf37e43ecc"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.applyPatch (cognitive 21): diff.applyPatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (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":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"85790eac3716bc80fac035046665d5441f0ff2ff8cea7dd0325fda0fc555bee3"}},{"ruleId":"D2","level":"warning","message":{"text":"KubectlCmd.filterAPIResources (cognitive 21): KubectlCmd.filterAPIResources has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 3 (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":"gitops-engine/pkg/utils/kube/ctl.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"e720c077ea45543dc34dd6869fb523317aab5df4b792220b6a07044fdb2f63d0"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewApplicationDeleteCommand (cognitive 21): commands.NewApplicationDeleteCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 5, loops 1 (nesting depth added 6). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 1286). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa8a47ac00120ec2b329f2defc6a2a2693c70fd8194755ca55916940d8931a0"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printManifestAsTable (cognitive 21): commands.printManifestAsTable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 4, match/switch 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":"cmd/argocd/commands/app_resources.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"694724c8fd191fd88e25831cbf337a5ba7789e6027eab46ecea0f3e800d34bee"}},{"ruleId":"D2","level":"warning","message":{"text":"commit.WriteForPaths (cognitive 21): commit.WriteForPaths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commitserver/commit/hydratorhelper.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e6a7db6172fa29eaa0a2b1332d7354216ea683f32f16a890c6a609cf325f95"}},{"ruleId":"D2","level":"warning","message":{"text":"Hydrator.hydrate (cognitive 21): Hydrator.hydrate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 3, boolean chains 1 (nesting depth added 2). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. 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":"controller/hydrator/hydrator.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"a92479cc0f684ee7669109cd5712cf91ee8943bbc26a704a7e3f4d7d544a0ac6"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetStatus.SetConditions (cognitive 21): ApplicationSetStatus.SetConditions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 2 (nesting depth added 6). Of this number, 17 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/applicationset_types.go"},"region":{"startLine":1012}}}],"partialFingerprints":{"codehealthFindingId/v1":"630beae81e19555cbe8428b9e90fe952979a3b5b629ac9bd46ae4f764ea39caa"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.resolveReferencedSources (cognitive 21): repository.resolveReferencedSources has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 5, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3df3cfbb68e4bb11465f9d1b9c656054ec1cf5c2792b0ea7075b45458e936f"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.fetch (cognitive 21): repository.fetch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 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":"reposerver/repository/repository.go"},"region":{"startLine":3015}}}],"partialFingerprints":{"codehealthFindingId/v1":"46384b2f799a956dfae53692c6bae0770b4dbdefe433ad4df69b6dab19f6d7d7"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.GetAppDetails (cognitive 21): Server.GetAppDetails has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 4). 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":"server/repository/repository.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"55d32b0a6492584a2aee155fad4ae775aa6b08615bff895d850c18bc4651d124"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.AddCacheFlagsToCmd (cognitive 21): cache.AddCacheFlagsToCmd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, match/switch 2 (nesting depth added 9). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/cache/cache.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"2486d5ce867a3cd4caae649ac09730d41415044ac3b861e337f6c25cead15d4c"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.Checkout (cognitive 21): nativeGitClient.Checkout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"d143e23ce02c8ad35c5b48509dfd7b4115755bf4c7faf41a6c5eae3dcc2e2685"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.lsRemote (cognitive 21): nativeGitClient.lsRemote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"527f17ce7acfe35ff3afbc838009dfbe0cdf1d2d2e16a34f35b6d5ab7ec70481"}},{"ruleId":"D2","level":"warning","message":{"text":"helm.GetParameters (cognitive 21): helm.GetParameters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/helm.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba22245ba1859c5d1d8ff380c055b3af1fbc8bcb7b9f3ec135ded389651bf9d"}},{"ruleId":"D2","level":"warning","message":{"text":"VM.ExecuteResourceAction (cognitive 21): VM.ExecuteResourceAction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/lua/lua.go"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e3a7ddde047ba5a9837008b2b602c279833c548f211b8480448f5df5f043b46"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionManager.VerifyToken (cognitive 21): SessionManager.VerifyToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/session/sessionmanager.go"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21dae269a28c2d38e5fe55580ff9e3b2caa91eb7342d923b13bb40694fa35a2"}},{"ruleId":"D2","level":"warning","message":{"text":"kubectlResourceOperations.newApplyOptions (cognitive 20): kubectlResourceOperations.newApplyOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, match/switch 1 (nesting depth added 5). Of this number, 12 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/utils/kube/resource_ops.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a22a2d3f5977e1a2f71c036dec9857bf14064f943f2b34d653a723fd1fbf3a"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.deleteInCluster (cognitive 20): ApplicationSetReconciler.deleteInCluster has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 3, loops 2 (nesting depth added 7). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 901). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ce48433127f4db307bdeead2a9cf4be8e64c017fc06095bdd49aee71b0b1d1"}},{"ruleId":"D2","level":"warning","message":{"text":"GitGenerator.generateParamsFromApps (cognitive 20): GitGenerator.generateParamsFromApps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 4 (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":"applicationset/generators/git.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"6301fd2ca12aebb53712ccba903190ed7eb54f9968267a6b9007b9a6108df358"}},{"ruleId":"D2","level":"warning","message":{"text":"scm_provider.compileFilters (cognitive 20): scm_provider.compileFilters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/services/scm_provider/utils.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96c91d7c140335b690744af70104979a6ed75dadf7451ea6141bd06f678b8ac"}},{"ruleId":"D2","level":"warning","message":{"text":"command.NewCommand (cognitive 20): command.NewCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3. Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-applicationset-controller/commands/applicationset_controller.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2df854fafc9461ec6219618b7e045e4f3d08bd2985b54ea30ada0df3b3a5457"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printManifests (cognitive 20): commands.printManifests has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_resources.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"e673570c8de1615501565006430a1aceadd1e6ad1befa62d0ad7cb5529e0495c"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.reconcileApplications (cognitive 20): admin.reconcileApplications has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/app.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f543e6ba0b33eb9105d19cfda667f5e50bc50bec32da9e4af5949c16c85393"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewGenRepoSpecCommand (cognitive 20): admin.NewGenRepoSpecCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 0 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/repo.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67eba307c6212a2477185a1bb6dfb70a162f9c958c8474fee8df770ca335412"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.normalizeTargetResources (cognitive 20): controller.normalizeTargetResources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sync.go"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"85884a346ff1e5f2969752ee4e2b8e101c429f4b4a6c0ae03b41cbf1398cd204"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationController.needRefreshAppStatus (cognitive 20): ApplicationController.needRefreshAppStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 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":"controller/appcontroller.go"},"region":{"startLine":2155}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a7d17d325b9939a9394eec3abd68f46ee9a7e0eca1abd3676edfc053fde727"}},{"ruleId":"D2","level":"warning","message":{"text":"cache.loadRedisCreds (cognitive 20): cache.loadRedisCreds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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":"util/cache/cache.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eecba52241076c3d2e7736771881be01befcbfb3c622996dff6adfbb13faad1"}},{"ruleId":"D2","level":"warning","message":{"text":"cmp.receiveFile (cognitive 20): cmp.receiveFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/cmp/stream.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e624b2aa0bae4385eb226c8f999fa59c200f975ed2edfa69895db54a2ce43ef"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeGitClient.cleanupOrphanedTempPackfiles (cognitive 20): nativeGitClient.cleanupOrphanedTempPackfiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/client.go"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c8ae4e4836f597715381179459aa3922e74c8a085bf6be00ca958a3176797bf"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.GetLegacyDestinations (cognitive 20): settings.GetLegacyDestinations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (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":"util/notification/settings/legacy.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"75bd7f0b64d7f3e860863df7f8570dd3137f260078fb7b7cf1d2a77e35f74c31"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.updateSettingsFromConfigMap (cognitive 20): settings.updateSettingsFromConfigMap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 4). 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":"util/settings/settings.go"},"region":{"startLine":1670}}}],"partialFingerprints":{"codehealthFindingId/v1":"e32850d0c4f9c9ae8e43eaf0ff3273506927f1ec284543cbb664ad777eb68d88"}},{"ruleId":"D2","level":"warning","message":{"text":"sourceintegrity.describeProblems (cognitive 20): sourceintegrity.describeProblems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/sourceintegrity/source_integrity.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"3490d67a996bd1bde4796844bcb2cdfccea421de8c1fb0adf1f1b74b85e618ba"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.processNamespaceHierarchy (cognitive 19): clusterCache.processNamespaceHierarchy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 2 (nesting depth added 11). Of this number, 14 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b5102365bbc2b5d0e19384b5b81956ec599012ebff0b7da83b7eb8caa3a736"}},{"ruleId":"D2","level":"warning","message":{"text":"sync.dedupLiveResources (cognitive 19): sync.dedupLiveResources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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":"gitops-engine/pkg/sync/reconcile.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b504f25329317bbdf7784b7c5a6917a41719c38f597b28d5b5eeb9d4436bd6b"}},{"ruleId":"D2","level":"warning","message":{"text":"Requirement.Matches (cognitive 19): Requirement.Matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 2, match/switch 1 (nesting depth added 8). 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":"applicationset/utils/selector.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9119664b99a60d86fda99511c88040bf325f3827d9aee8ebe44889d2e39835a"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewCommand (cognitive 19): commands.NewCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 2, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-notification/commands/argocd_notification.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"02c770943c678c02b8aa1fc4341cbe8bd024de7addff245471a400810cbaa750"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand (cognitive 19): commands.NewProjectSourceIntegrityGitPoliciesDeleteCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e43cc748b3676b78a1867ad647e62f2664c5a578dd2edbe3310cf546c3d114"}},{"ruleId":"D2","level":"warning","message":{"text":"settingsOpts.createSettingsManager (cognitive 19): settingsOpts.createSettingsManager has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 8). 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":"cmd/argocd/commands/admin/settings.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a4fc8a3d5ec6e01fb74609ec2d8d7ec27984afa02f1a5965e8e6061fc6a406"}},{"ruleId":"D2","level":"warning","message":{"text":"util.setKustomizeOpt (cognitive 19): util.setKustomizeOpt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/util/app.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4f38f85f7659bcff826c16804b8c34328b08b68cf6133936869dcde4b91a1f"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.NormalizeTargetObjects (cognitive 19): controller.NormalizeTargetObjects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5b960b860b00fb78b4986796968c20f0793e1398ccb80e23bc6ef0203d3538"}},{"ruleId":"D2","level":"warning","message":{"text":"liveStateCache.handleModEvent (cognitive 19): liveStateCache.handleModEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/cache.go"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcda8f73fe385a69ffd42e05d41781ffd8b14b17544a8496b1006ddf6f9febbc"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.isAppSyncStatusRefreshed (cognitive 19): controller.isAppSyncStatusRefreshed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 6, match/switch 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":"notification_controller/controller/controller.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c403a0763d17869ceb6dc7447a09c8b9ba16f00774fd31eebd157be383574db8"}},{"ruleId":"D2","level":"warning","message":{"text":"reposerver.NewServer (cognitive 19): reposerver.NewServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/server.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d706ab4caa8fa9c565aae209fb149ff45afc74ab7106ef3657ffbd31a66643"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.GetRevisionMetadata (cognitive 19): Service.GetRevisionMetadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, loops 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":"reposerver/repository/repository.go"},"region":{"startLine":2722}}}],"partialFingerprints":{"codehealthFindingId/v1":"1082150d89bb517fb6264106db3b23b8935a96466b013270468983b2bc9f7038"}},{"ruleId":"D2","level":"warning","message":{"text":"application.isTheSelectedOne (cognitive 19): application.isTheSelectedOne has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 6, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"a906d5e27390d6858302b5c3c58c45e769d724f96db8ba7e4b2b7efe50cfd6c0"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.ListResourceEvents (cognitive 19): Server.ListResourceEvents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bada938641262db421c06e2a9f54f8847387dc8334d8cd1a24db68c083ac7b8"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.NormalizeProjs (cognitive 19): Server.NormalizeProjs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 3 (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":"server/project/project.go"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b4309a1a4420acfa18c3ae2a620dca77da8f0a47f2659a67f69f0b5ea14af5"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsManager.GetKustomizeSettings (cognitive 19): SettingsManager.GetKustomizeSettings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d9a7cc8894a23dd03bb76758af5aacd6f487d14bf87bf42fb074dfd9ffd32d"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.parseManifests (cognitive 18): settings.parseManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 71). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/agent/main.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f25f18dba2dd76ea75dbd9c0cf5e8cab9098ac47429cb0104b9961108ecf90d"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterCache.checkPermission (cognitive 18): clusterCache.checkPermission has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 2, match/switch 1 (nesting depth added 7). 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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1040}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8bdb128c9266e05d19ab66c1543d67c347eae297a89196399006e64ec42a1a4"}},{"ruleId":"D2","level":"warning","message":{"text":"BitbucketServerProvider.ListRepos (cognitive 18): BitbucketServerProvider.ListRepos has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 3, match/switch 3 (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":"applicationset/services/scm_provider/bitbucket_server.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"37413ef7ef88f8bf1ead920d06cbd920a83d2d14fe13ae8b2951d5f7ef2d5dda"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.compareManifests (cognitive 18): commands.compareManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1538f8f7deb489d61faa7fa40e2249aa275891d026653ee62f9ba9f1745c72"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.oauth2Login (cognitive 18): commands.oauth2Login has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 256, 344). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/login.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"780008c5088b8d85f32951bf7a8a75366056c18eb44ddd50a6bf3ccd25b3a2cc"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.modifyResourceListCmd (cognitive 18): commands.modifyResourceListCmd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 662). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project.go"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"6862acb46b86d7220954b8ddb8996b54625f9c9db47db172b679281d11ee1ae2"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.NewRBACCanCommand (cognitive 18): admin.NewRBACCanCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 164). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/settings_rbac.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b9d00eaa1d3e3e29d929638fe5b18ee5ddcc861496ad316190f9d654d233c5"}},{"ruleId":"D2","level":"warning","message":{"text":"util.FilterResources (cognitive 18): util.FilterResources has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 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":"cmd/util/app.go"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"32eed8641da6005597885ef19dd6eaf51e6b4a6732648c901a17c15f4b5cb0f8"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.handleCommitRequest (cognitive 18): Service.handleCommitRequest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"commitserver/commit/commit.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eebc9ac51a418db3c55f2a4708419326901c8bd5ac018f1da43b715045ff589"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.isKnownOrphanedResourceExclusion (cognitive 18): controller.isKnownOrphanedResourceExclusion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"799df86587fc999ad16edbc4a8fced9bfbb3f562b6613f6bbf70cb9659723766"}},{"ruleId":"D2","level":"warning","message":{"text":"appStateManager.EvaluateAppRevisionsChanges (cognitive 18): appStateManager.EvaluateAppRevisionsChanges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c756f5801457b19c56bbdc49a1670e9606ba305b792acff5df9892cbceb9431"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Delete (cognitive 18): Server.Delete has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"server/application/application.go"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"4112caa636a0b1d1ce9111fe78d78a939a62ea9f25f5912c0f77dee11a783aef"}},{"ruleId":"D2","level":"warning","message":{"text":"argo.verifyGenerateManifests (cognitive 18): argo.verifyGenerateManifests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/argo.go"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"0986c135e213cb01713d3984d6b8b9afe2c99677ddd2e06959a7025e64252100"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.diffArrayCached (cognitive 18): diff.diffArrayCached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 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":"util/argo/diff/diff.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e3b74f6ad5be695c3d7e4862a0d7c87a9b565dbf2a83ec926d6c503e1a4e40"}},{"ruleId":"D2","level":"warning","message":{"text":"git.newAuth (cognitive 18): git.newAuth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, match/switch 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":"util/git/client.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"035a0aaa09dfb4c97377b74f291829aa65f8f7baffcdf38e0109786032263611"}},{"ruleId":"D2","level":"warning","message":{"text":"git.ExtractOrgFromRepoURL (cognitive 18): git.ExtractOrgFromRepoURL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/creds.go"},"region":{"startLine":770}}}],"partialFingerprints":{"codehealthFindingId/v1":"606633c61536d4c2442e591dd6f78c6682c40d06d8fc736346746f5f214e5d16"}},{"ruleId":"D2","level":"warning","message":{"text":"Cmd.RepoAdd (cognitive 18): Cmd.RepoAdd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/cmd.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"30cbce42f9bc19cc7bfa5a47d310acaccc71a45cb5d6259862c63d221349d041"}},{"ruleId":"D2","level":"warning","message":{"text":"tls.generate (cognitive 18): tls.generate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/tls/tls.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5ee9f0e5bc27caa4cac9a8f5680fe5b9b231857978d1006befcf66a4fb416ef"}},{"ruleId":"D2","level":"warning","message":{"text":"versions.MaxVersion (cognitive 18): versions.MaxVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/versions/tags.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"94bc71996da0fd8d80f4d1abac00784ce1fc5d5f65d45a3114d0bc5ba70bfc74"}},{"ruleId":"D2","level":"warning","message":{"text":"webhook.newBitbucketClient (cognitive 18): webhook.newBitbucketClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 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":"util/webhook/webhook.go"},"region":{"startLine":730}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbdffb1935330d1aeedd2e0e702ae56962a541eeacd8695969cc329648a3105f"}},{"ruleId":"D2","level":"warning","message":{"text":"health.GetHealthCheckFunc (cognitive 17): health.GetHealthCheckFunc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, match/switch 5 (nesting depth added 8). 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":"gitops-engine/pkg/health/health.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"1738c4073555f1e0f8d7c30e2ff38757eb1dc885f4d65eccd65dcbd99ca70c99"}},{"ruleId":"D2","level":"warning","message":{"text":"controllers.nestedGeneratorHasClusterGenerator (cognitive 17): controllers.nestedGeneratorHasClusterGenerator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"applicationset/controllers/clustereventhandler.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cba9e01148970784c8fbdcf3a01b71da5860618281470c1f0da1ffeedce6596"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationSetReconciler.migrateStatus (cognitive 17): ApplicationSetReconciler.migrateStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 8). Of this number, 10 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"35109274d796e7711d102390bba14ea8365b08c2b7edff56b241033ffc62e767"}},{"ruleId":"D2","level":"warning","message":{"text":"GitGenerator.filterApps (cognitive 17): GitGenerator.filterApps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 3 (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":"applicationset/generators/git.go"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53d209220542d41c547dd157f2796d1795e2fae3b9014d996404c2787a9214e"}},{"ruleId":"D2","level":"warning","message":{"text":"progressivesync.getAppsToSync (cognitive 17): progressivesync.getAppsToSync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/progressivesync/progressive_sync.go"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6b4fa89ae89d5e277e13fdb768133e479c0d55551a224ebbc22c9531565bc1"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewCommand (cognitive 17): commands.NewCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 0 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-repo-server/commands/argocd_repo_server.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"05005f2c389c056a391ba8341f0ab1cb2a19e290b323c3e52693a0734498e11a"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.printProject (cognitive 17): commands.printProject has cognitive complexity 17 (threshold 15). Drivers by points: loops 9, if/else 8 (nesting depth added 1). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project.go"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd4b80c00567cf15b64383f2e255b87b77beff6d7babcdcd913172b13f873bc"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.warnOnProblems (cognitive 17): commands.warnOnProblems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e434dd5fca929eea2d628c41d70f58aced54da8725927bd03345dc112abc563"}},{"ruleId":"D2","level":"warning","message":{"text":"clusterInfoUpdater.getUpdatedClusterInfo (cognitive 17): clusterInfoUpdater.getUpdatedClusterInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 2, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/clusterinfoupdater.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd69f57a7efe76abe8f39810d9ec4884cb29625827278b5cdbd44e045b27acb"}},{"ruleId":"D2","level":"warning","message":{"text":"appCollector.collectApps (cognitive 17): appCollector.collectApps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 6, boolean chains 2 (nesting depth added 5). 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":"controller/metrics/metrics.go"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"b00099e2fde1f215f70091ea4bb08c275d9e72a3664f5c1a913eac06450cf845"}},{"ruleId":"D2","level":"warning","message":{"text":"application.processAppFields (cognitive 17): application.processAppFields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (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":"pkg/apiclient/application/forwarder_overwrite.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe2a38e9a1ffcf3d656791003d247fac0a230480eb6cad153c5ea00ad0a24372"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncWindows.inactiveAllows (cognitive 17): SyncWindows.inactiveAllows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":2999}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53c84aa08f4810fff6ad9f0b8f32c4e12ad8a744c205879c938118cfee6599f"}},{"ruleId":"D2","level":"warning","message":{"text":"repository.runConfigManagementPluginSidecars (cognitive 17): repository.runConfigManagementPluginSidecars has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":2345}}}],"partialFingerprints":{"codehealthFindingId/v1":"54405e335fd05646bcd50e31bba5d574a3a58e3d62957ef2e320bf39ad43d79b"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.GetGitDirectories (cognitive 17): Service.GetGitDirectories has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 1). Of this number, 11 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. 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":"reposerver/repository/repository.go"},"region":{"startLine":3281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e092edcd08096bd73095c6ae83bdb0a8ae5c1438e095940f87614b1916fe042f"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.getAppEnforceRBAC (cognitive 17): Server.getAppEnforceRBAC has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"be11e136f7f984d7f907b94dd0c85213df9cdad057cee1c69bc8916622664587"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Watch (cognitive 17): Server.Watch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 4, match/switch 2, boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5745bb2264f4704578a0355e9096d7c8daa95ca522b10c548551d600d09bab8"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Create (cognitive 17): Server.Create has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/applicationset/applicationset.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"19076852c20a51cc47ccd0465b7ad349ebf83eaf3446fb0db25671e3d8022d91"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.getCluster (cognitive 17): Server.getCluster has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/cluster/cluster.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"af21cdd42703dbf73fb6b99fa6a90411ad7741558543f0fd5c5c5076f0073ac9"}},{"ruleId":"D2","level":"warning","message":{"text":"deeplinks.EvaluateDeepLinksResponse (cognitive 17): deeplinks.EvaluateDeepLinksResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/deeplinks/deeplinks.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb91cd0f70de3a5af769187f46b610dde2bd3680bc493fc73a364b302bf0ac12"}},{"ruleId":"D2","level":"warning","message":{"text":"RBACPolicyEnforcer.EnforceClaims (cognitive 17): RBACPolicyEnforcer.EnforceClaims has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (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":"server/rbacpolicy/rbacpolicy.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b6b81eedbb0fd246d191b8ebe04cae36cb538027f29a8ef38944243465c380"}},{"ruleId":"D2","level":"warning","message":{"text":"argo.GetGlobalProjects (cognitive 17): argo.GetGlobalProjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (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":"util/argo/argo.go"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44306f0dbc7460b46de2a67af112f7ef6464733531ae2a45348a237d620d127"}},{"ruleId":"D2","level":"warning","message":{"text":"resourceTracking.RemoveAppInstance (cognitive 17): resourceTracking.RemoveAppInstance has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, match/switch 1 (nesting depth added 8). 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":"util/argo/resource_tracking.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"93006540a57db244ea55c3669dac028b917505e6f4eaf05ff520da90bec35f09"}},{"ruleId":"D2","level":"warning","message":{"text":"lua.strftime (cognitive 17): lua.strftime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, match/switch 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/lua/oslib_safe.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c723d83382f3e82b5a6a8807ddbd5be2f6361859d48ec854e0a271f89ecc1842"}},{"ruleId":"D2","level":"warning","message":{"text":"oidc.hasUserReadScope (cognitive 17): oidc.hasUserReadScope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 4, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc_azure.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a3ebeabe92e6013edd2810546e73b8edd1e7398f1cebb5ed78f6d38e129ba24"}},{"ruleId":"D2","level":"warning","message":{"text":"providerImpl.Verify (cognitive 17): providerImpl.Verify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 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":"util/oidc/provider.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"542183a3c315b0398723e8a69bcce79e031489e00df5fa3af9e4e1756cd80824"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.Diff (cognitive 16): diff.Diff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"390055f359ed0b64cff93b645e49cedb406f591a6c3579e15bbc2f38612c39bf"}},{"ruleId":"D2","level":"warning","message":{"text":"diff.removeWebhookMutation (cognitive 16): diff.removeWebhookMutation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d595365f00c7fbeab380fde9ba7a3a1d14317345a1018b770e2f0940d2d8d6"}},{"ruleId":"D2","level":"warning","message":{"text":"gitOpsEngine.Sync (cognitive 16): gitOpsEngine.Sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, match/switch 4, loops 1 (nesting depth added 5). Of this number, 11 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/engine/engine.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"18639ab62e72cf0caf85cc39d0de8e02de8d5e5d58705dcdcc3a9ee54c04724b"}},{"ruleId":"D2","level":"warning","message":{"text":"syncContext.autoCreateNamespace (cognitive 16): syncContext.autoCreateNamespace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, match/switch 3, loops 2, boolean chains 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":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"97af471aae7f9fadecb33c080cdd2987cd424fb77bde52594480ffb84fdefc2f"}},{"ruleId":"D2","level":"warning","message":{"text":"GitGenerator.generateParamsForGitFiles (cognitive 16): GitGenerator.generateParamsForGitFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 7 (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":"applicationset/generators/git.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"78b92d0b889b9fecb971b388053ca9ad4b30dbdfe540e17d3e707de48e05f6f9"}},{"ruleId":"D2","level":"warning","message":{"text":"pull_request.compileFilters (cognitive 16): pull_request.compileFilters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/services/pull_request/utils.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc786b4938bfd5c9b6a71ce3bcddcd493a67755b7b2ae90390ca3eebe4b0b9e6"}},{"ruleId":"D2","level":"warning","message":{"text":"AWSCodeCommitProvider.RepoHasPath (cognitive 16): AWSCodeCommitProvider.RepoHasPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (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":"applicationset/services/scm_provider/aws_codecommit.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"33571f51298c4d8bfc3afa876d26b77326c388f8d5905c352499f611873a6960"}},{"ruleId":"D2","level":"warning","message":{"text":"GitlabProvider.listBranches (cognitive 16): GitlabProvider.listBranches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/services/scm_provider/gitlab.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e9b19b0252f8955a35295f4d807e962bfde22f844f7ef58e0e0c996304b651b"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.NewAccountSessionTokenCommand (cognitive 16): commands.NewAccountSessionTokenCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 473). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/account.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e007a0c58d202205c70309ccf2c4314f08dcfd9fe3fbab22284f857f947b8b"}},{"ruleId":"D2","level":"warning","message":{"text":"commands.checkResourceStatus (cognitive 16): commands.checkResourceStatus has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2242}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3864e88bfdde60905ce2908d6ecbbb630d105c9d06c146010ff7be31662669"}},{"ruleId":"D2","level":"warning","message":{"text":"admin.checkPolicy (cognitive 16): admin.checkPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/settings_rbac.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6d1413e42c42863dddd4da893b2484970018d9ee3ee4d31c6d0106ca42dd9e"}},{"ruleId":"D2","level":"warning","message":{"text":"controller.restoreNonIgnoredFields (cognitive 16): controller.restoreNonIgnoredFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sync.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd65203785b4de488c8f59b76c2ff1408be295cabd8b1a718c83c27b671069aa"}},{"ruleId":"D2","level":"warning","message":{"text":"main.newCommand (cognitive 16): main.newCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 3). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hack/dev-mounter/main.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe05eade922bf06908994aec3c986317e7e09e6c7bc1accc09ea30a8f2eb805b"}},{"ruleId":"D2","level":"warning","message":{"text":"client.newConn (cognitive 16): client.newConn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/apiclient.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73cb801a4ed89289e0cc8f1cd5cb82e2eb76d35765fe785706e105b5cc071f1"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationTree.GetSummary (cognitive 16): ApplicationTree.GetSummary has cognitive complexity 16 (threshold 15). Drivers by points: loops 9, if/else 6, boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":2138}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9a667e0440611f9d9fe00760691e8eda0563c6822bf2addd281b83c43e5ab1"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Create (cognitive 16): Server.Create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 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":"server/application/application.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a7372dc70b25665ef319df1eadf4907d46621e0543be64d520d14bfca983c5"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.Watch (cognitive 16): Server.Watch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, match/switch 2 (nesting depth added 4). Of this number, 14 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/applicationset/applicationset.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7bd6ac266ae89a51f04a5c8d89b28cef2603ff8da1c38122b5b087fe9651f2c"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.updateAppSet (cognitive 16): Server.updateAppSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/applicationset/applicationset.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c838add479c4da6e97ca39a1313a7a3465e2d73897b7486693602d584a654d3"}},{"ruleId":"D2","level":"warning","message":{"text":"extension.parseAndValidateConfig (cognitive 16): extension.parseAndValidateConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/extension/extension.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"183ebd6248ac69fee1eebef273c713a29a6b5f9a43d9394034417d168e5e5ab6"}},{"ruleId":"D2","level":"warning","message":{"text":"Server.CreateRepository (cognitive 16): Server.CreateRepository has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/repository/repository.go"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76f0cf0891cfc330e281bea39cc647a5432bd2d83e2bbb71135e433492b60e2"}},{"ruleId":"D2","level":"warning","message":{"text":"argo.ValidateRepo (cognitive 16): argo.ValidateRepo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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":"util/argo/argo.go"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"d67004348298607d3baa8f8184e7872397b04f303739c0e808f0ea39b456122d"}},{"ruleId":"D2","level":"warning","message":{"text":"ignoreNormalizer.Normalize (cognitive 16): ignoreNormalizer.Normalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/normalizers/diff_normalizer.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"563ef8e9861779a01d90cff341ce6168628b1bedb5898fcea42badcec137976a"}},{"ruleId":"D2","level":"warning","message":{"text":"resourceTracking.Normalize (cognitive 16): resourceTracking.Normalize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/argo/resource_tracking.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"c38e1c8bb81795b5e57d9b53231b4dad1b2991bcf83f18fe9fd6fd43155d430e"}},{"ruleId":"D2","level":"warning","message":{"text":"cert.ParseTLSCertificatesFromStream (cognitive 16): cert.ParseTLSCertificatesFromStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/cert/cert.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d81b99f961df078b47eb35c2d1b1cedef45043cf6ea6991d407152c19273ed"}},{"ruleId":"D2","level":"warning","message":{"text":"cmp.sendFile (cognitive 16): cmp.sendFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/cmp/stream.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"591e9e5a61eed4a41100dc43abde7f9a53df261060b282dd2d4d9cbc7fac2dce"}},{"ruleId":"D2","level":"warning","message":{"text":"db.SecretToCluster (cognitive 16): db.SecretToCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/cluster.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"84728b2eac9823d16a4c8ad4c5dfb14c51e4e4560322db83f65fa60efbeedc4e"}},{"ruleId":"D2","level":"warning","message":{"text":"secretsRepositoryBackend.getRepositorySecret (cognitive 16): secretsRepositoryBackend.getRepositorySecret has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/repository_secrets.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"4577ba46545b9332574bbf5b47e8779d73492e839c480e2f4f7e34d100576237"}},{"ruleId":"D2","level":"warning","message":{"text":"HTTPSCreds.Environ (cognitive 16): HTTPSCreds.Environ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/git/creds.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9dc577dd507ba9eedc45f1b0eb945a08171e5110eb03f5c9546bd56181ec224"}},{"ruleId":"D2","level":"warning","message":{"text":"Cmd.template (cognitive 16): Cmd.template has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/helm/cmd.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"0125a9b9e3896eef08a6acca9b195904d503e709bb7c63cc42897c47a2f1257f"}},{"ruleId":"D2","level":"warning","message":{"text":"retryTransport.RoundTrip (cognitive 16): retryTransport.RoundTrip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 3, match/switch 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/http/http.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac608305e07357013f7043cc471e7814ce68f0aead52105111d748e72a56e7e"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.PortForward (cognitive 16): kube.PortForward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1 (nesting depth added 2). Of this number, 14 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/kube/portforwarder.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"3591e75132a21b02e3d86c40a61de9b0d81b1d22a02323e72eaf2c5bb4151402"}},{"ruleId":"D2","level":"warning","message":{"text":"manifeststream.sendFile (cognitive 16): manifeststream.sendFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/manifeststream/stream.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"598bac328469294e671b9cfe0110af3d8f909aec79cd43cd29d830295cab8fc6"}},{"ruleId":"D2","level":"warning","message":{"text":"nativeOCIClient.getTags (cognitive 16): nativeOCIClient.getTags has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oci/client.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3318de928cfbec02b400c1091ece0f3c4d1fbc43077e3607225dafff298832"}},{"ruleId":"D2","level":"warning","message":{"text":"settings.secretToCluster (cognitive 16): settings.secretToCluster has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/cluster_informer.go"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5c6b3c1b6b9dc41c55932cee1f771ebf5a5f00b08b3737909924e0a140d33b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repository/repository.go: FileTooLong \u2014 2257 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"reposerver/repository/repository.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f934f11f818ab87a5a3db9360e14d9b8088665313872c0ba74af904a4f0fe0c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: v1alpha1/types.go: FileTooLong \u2014 2144 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d55b630a9d7a07fcf16b1902b80a9e03ce794a9466f57e5b8c14ad9f259b95"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/app.go: FileTooLong \u2014 2122 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"cmd/argocd/commands/app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55c0567675ba69fb6db486a256bf60418e93d058f03f475083e576e2d663647"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: application/application.go: FileTooLong \u2014 2066 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"server/application/application.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7d7d4b21cde6a602d7a0a83377d009cdbfde5506544e9f83a0e90d800f4800"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: controller/appcontroller.go: FileTooLong \u2014 1988 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"controller/appcontroller.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb26cf539f52b9c9a4df993f13329ea2c0f54b2fd1ee8b88a58915d5dc97873"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: settings/settings.go: FileTooLong \u2014 1687 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/settings/settings.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c90c633c28fa4c6e6d2d2c012358eac6be0f531c19b929011ed103e43b370a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/server.go: FileTooLong \u2014 1230 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"server/server.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae1a94109b305dacc30a7b8a22ee24b1a6c658512279cf1478e57603ed29c6b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ApplicationController: TooManyMethods \u2014 71 methods, declared across 3 files: controller/appcontroller.go (52), controller/hydrator_dependencies.go (13), controller/hook.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc1a13ad94c9396086cddcfca810fd0db13b7ab879c8510f00173f1772609a49"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SettingsManager: TooManyMethods \u2014 71 methods, declared across 2 files: settings/settings.go (66), settings/accounts.go (5). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"089066dee278a1ab76dc18bc7d7a4691e7a7af57015fc47919dab6d11eb33bc1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sync/sync_context.go: FileTooLong \u2014 1122 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c63dc2c924f203f524b38195152acdf69985608a19edaef5507f185ff12fa6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: git/client.go: FileTooLong \u2014 1062 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/git/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"646564badff854250e5a43930eda88916037ddd5ee4c27d12601aa6d4af412f0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cache/cluster.go: FileTooLong \u2014 1025 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee66c3d03008d9e6ba5cd56090cbea823f2b37290dfac258b965bc74b799cde"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: db: TooManyMethods \u2014 61 methods, declared across 8 files: db/repository.go (35), db/cluster.go (10), db/certificate.go (6), db/secrets.go (4), \u002B4 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement db.ArgoDB (43 of 61 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/db.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c07bf1c4debb30cdeb25a13e861462a7689ee924d9a4c257a87e53f611b7a8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Server: TooManyMethods \u2014 59 methods. 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":"server/application/application.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"83fc214ae884cf2b5cb5bcdf73d6dbf99315721277e5d1529dca80c30e30a11a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: controller/state.go: FileTooLong \u2014 889 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"controller/state.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c09a85659235d0dd0ed42b33819e1b267a5698d694f959c28a49b71a4915214b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: argo/argo.go: FileTooLong \u2014 854 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/argo/argo.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a63affaf6d50a74534686cb7e246b08b11d5b6a38d0fd6c66e6765c0d3e8167"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: controllers/applicationset_controller.go: FileTooLong \u2014 841 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"57c94a876d42d6a2178aa49c00e6d7a22f30465b93585d34e0b8f336d47f9877"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/project.go: FileTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"cmd/argocd/commands/project.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eade6bf405b7040bb3bf754ec5d6c46828dadca6266fb1a41549c315d8b84d4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: clusterCache: TooManyMethods \u2014 49 methods, declared across 2 files: cache/cluster.go (48), cache/references.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e83eda69d46f5527402a44442bf926dfc6a996ae6e01e38bfd60ea22af8270d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: oidc/oidc.go: FileTooLong \u2014 707 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/oidc/oidc.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b723056b3e2dbea29d437164535b1c4386dd5199fa2b84a8910595126980ef80"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: util/app.go: FileTooLong \u2014 706 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"cmd/util/app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"24637a7241895bedf2e04179af34f3fd1a5202e0b9d6021e3303096ce6476c8f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: diff/diff.go: FileTooLong \u2014 701 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b14c0fe8734291bb9bf9339d368492eff53c25a9831c17e1f43f39d78feaa68"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: git/creds.go: FileTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/git/creds.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09f0af5ebdfedef627400214b427b594dd192b386518ae69c282c90c9447cc5d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: apiclient/apiclient.go: FileTooLong \u2014 645 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"pkg/apiclient/apiclient.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"842c6e7cf1836c0d20a1dc0c5d774f61d3b3f164da6bbc51be4a50b16137f955"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: client: TooManyMethods \u2014 38 methods, declared across 2 files: apiclient/apiclient.go (35), apiclient/grpcproxy.go (3). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement apiclient.Client (31 of 38 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apiclient/apiclient.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"3289d5a9f4a066266f85852c104a6f5975987abee2e60cc84c4ba847173a29cd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: nativeGitClient: TooManyMethods \u2014 38 methods. 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":"util/git/client.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c3471bdeda59de7651bd7ed1645b546c0e196689395a2b44f492b14cfa07d4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ArgoCDSettings: TooManyMethods \u2014 36 methods. 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":"util/settings/settings.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0136a66a0dd194b46ca2ed4d953c16ce03e3d963f02a34bae3fbe1757754632"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cache/cache.go: FileTooLong \u2014 588 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"controller/cache/cache.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abfeefe7d7631269836ba53a2ca011b128af9ebaf53fe310697f9eef47b0e311"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: syncContext: TooManyMethods \u2014 35 methods. 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":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"d09559c2091ad13ac1429819e1487e5e4cefb73b7f3dd48609895256a8cd21bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: webhook/webhook.go: FileTooLong \u2014 563 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"util/webhook/webhook.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d72e40edc699e45883aa05c1216662ab4a6c553afaa31fa3f7a54966eb07ebc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Service: TooManyMethods \u2014 33 methods. 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":"reposerver/repository/repository.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2ed49d86325d01275a191ddc25e9af93573e878c052ac35b5d6b2941adaf8cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/app_diff.go: FileTooLong \u2014 539 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"cmd/argocd/commands/app_diff.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a538fed3a46a62c63d77bdbfae18cab93d851d151d7910cecbb8079ccc613850"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cache/info.go: FileTooLong \u2014 523 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"controller/cache/info.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4709e7b26a02b1aa7b83275fcaaa833467adc559ba1c4e99d8cedf12008f0d4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: v1alpha1/applicationset_types.go: FileTooLong \u2014 522 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"pkg/apis/application/v1alpha1/applicationset_types.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23fe92c810eb49014b03b5c6aa3afa829c24e3429bc7713e4ee96af32a182a90"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: repository/repository.go: FileTooLong \u2014 518 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"server/repository/repository.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9042a10a9b4e7b6104435353efe475eeea08393d33acee0f9ef3411782e4b11b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: admin/cluster.go: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f4bb664dff7206ea4c37c4876dd14e7422f72491e22da0b480e2a4ca140d0a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): util/git/creds.go:213-232 | util/git/creds.go:426-444 \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 \u0060util/git/creds.go:213\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":"util/git/creds.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"81657a97ebae1537f4ac5ce58b1c248854c978242d77b62375d48f43ad8d2aa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): applicationset/generators/matrix.go:142-159 | applicationset/generators/merge.go:194-211 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applicationset/generators/matrix.go:142\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/matrix.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"a35b25dbc4bee85e513791172aeca72517a474f8027e3419d42ab632efa51d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): applicationset/controllers/applicationset_controller.go:1070-1085 | applicationset/controllers/applicationset_controller.go:1195-1210 \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 \u0060applicationset/controllers/applicationset_controller.go:1070\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. 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":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"5359244abc90a1e90a2544f2b60076666e9c414752e81474e8fd94be3c50821d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/argocd/commands/app.go:2859-2873 | cmd/argocd/commands/app_diff.go:682-696 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:2859\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":"cmd/argocd/commands/app.go"},"region":{"startLine":2859}}}],"partialFingerprints":{"codehealthFindingId/v1":"811a7d8a25dbccda01e67fb6f9870f4a59381cdfcdb51d01100e893e29a48cfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): util/db/repository_secrets.go:373-387 | util/db/repository_secrets.go:491-505 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/repository_secrets.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d7ea6b370b2672d1aa28fa1557e1f0cca814d9848932ee38861bfca41eee1ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/argocd/commands/admin/backup.go:73-87 | cmd/argocd/commands/admin/backup.go:208-225 \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 \u0060cmd/argocd/commands/admin/backup.go:73\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. 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":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c79eeda82c6916c1e0f5ba8782937114f8e294cfb342551f2fbbb22ea222d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): applicationset/generators/matrix.go:109-123 | applicationset/generators/merge.go:164-177 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applicationset/generators/matrix.go:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/matrix.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d981d4762b881687bea1ce97e2e1a7e56fff68febae1db596a2c36dafc44f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/argocd/commands/admin/cluster.go:404-417 | cmd/argocd/commands/admin/cluster.go:462-475 \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 \u0060cmd/argocd/commands/admin/cluster.go:404\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":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2bb3a3c11846bc4da8c0965eafbce01c3388eb4d8781691666eb0415003aa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): util/argo/audit_logger.go:142-155 | util/argo/audit_logger.go:182-195 \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 \u0060util/argo/audit_logger.go:142\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. 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":"util/argo/audit_logger.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a6ce305f276bedce654b84c5e93d86c96ca76a8c007fca1e3ffca869f4a9ae7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): util/settings/settings.go:721-735 | util/settings/settings.go:759-772 \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 \u0060util/settings/settings.go:721\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":"util/settings/settings.go"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff9f01106b468880a1958cb07e576b838d7a25f0b0805163c5d4fd8698a71bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): cmd/argocd/commands/app.go:442-455 | cmd/argocd/commands/app.go:881-893 | cmd/argocd/commands/app.go:3197-3209 \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 \u0060cmd/argocd/commands/app.go:442\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. 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":"cmd/argocd/commands/app.go"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"6470f2a40d1460e32989cf447518a11d5963555f1908457d62b82fef09a3d81f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): gitops-engine/pkg/cache/cluster.go:509-521 | gitops-engine/pkg/cache/cluster.go:525-537 \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 \u0060gitops-engine/pkg/cache/cluster.go:509\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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"e180f52d3f01f1071fcd0d3fc72c59728f6659d1c7b182bd1058eecfdf072be9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): gitops-engine/pkg/health/health_apiservice.go:43-55 | gitops-engine/pkg/health/health_apiservice.go:64-76 \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 \u0060gitops-engine/pkg/health/health_apiservice.go:43\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/health/health_apiservice.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e761113c32e243f0308c8fd43feca6b6e96274cf8908338bdd379c6112bcabf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): applicationset/services/pull_request/github.go:26-38 | applicationset/services/scm_provider/github.go:26-38 \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 \u0060applicationset/services/pull_request/github.go:26\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":"applicationset/services/pull_request/github.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"b457b7b60e4f09202189c5b81ab178cd4b5156986dc1e4d8ec2039195dc67023"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/argocd/commands/app.go:885-897 | cmd/argocd/commands/app.go:998-1010 \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 \u0060cmd/argocd/commands/app.go:885\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":"cmd/argocd/commands/app.go"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"5549817b04bb3ed296dc45f772089d9446f53b84a6bafa5da6c47a863373d49c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): reposerver/repository/repository.go:3244-3256 | reposerver/repository/repository.go:3316-3328 \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 \u0060reposerver/repository/repository.go:3244\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. 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":"reposerver/repository/repository.go"},"region":{"startLine":3244}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2a157fde5149157e2445c71a6c1556ebf300f06ba48d27d0df0231bf9c5b02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): util/db/cluster.go:450-462 | util/settings/cluster_informer.go:242-254 \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 \u0060util/db/cluster.go:450\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":"util/db/cluster.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b45519f7e68b72b929d2420ad0cff533c62a7eeb2eed98012e7baee45e07bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): util/db/repository.go:438-450 | util/db/repository.go:455-467 \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 \u0060util/db/repository.go:438\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/repository.go"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2036c4bdffffa489b0850cb555f881cd93637a120dddf1297f8fad7fa64728b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): controller/appcontroller.go:1085-1096 | controller/appcontroller.go:1842-1853 | controller/appcontroller.go:2090-2101 \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 \u0060controller/appcontroller.go:1085\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"8452ccaeb9097f0e058de6951815b6e1e3958211e07c48fd302e72f6f8b411b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): cmd/argocd/commands/projectwindows.go:62-73 | cmd/argocd/commands/projectwindows.go:262-273 | cmd/argocd/commands/projectwindows.go:315-326 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/projectwindows.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda901aa2676cde8646f90c64572d105a0428819c2e6c31b7a2f0695efb82397"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): gitops-engine/pkg/utils/kube/ctl.go:296-307 | gitops-engine/pkg/utils/kube/ctl.go:327-338 \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 \u0060gitops-engine/pkg/utils/kube/ctl.go:296\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":"gitops-engine/pkg/utils/kube/ctl.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"387c8c86c8a69a5b04adf78c52b4fc2525c4c7b61bacb334f3374a0b19404c8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): gitops-engine/pkg/utils/kube/resource_ops.go:525-536 | gitops-engine/pkg/utils/kube/resource_ops.go:582-593 \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 \u0060gitops-engine/pkg/utils/kube/resource_ops.go:525\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":"gitops-engine/pkg/utils/kube/resource_ops.go"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba1b7ef8bc258420bf325b08b38e76691f842dd87a5fc7e3cc2640a64f827a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd-commit-server/commands/argocd_commit_server.go:78-91 | cmd/argocd-repo-server/commands/argocd_repo_server.go:201-212 \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 \u0060cmd/argocd-commit-server/commands/argocd_commit_server.go:78\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. 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":"cmd/argocd-commit-server/commands/argocd_commit_server.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"8454651dc70a38e9f0124787e08f614896d527b170d42a94bc563f0e64b66bb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd-dex/commands/argocd_dex.go:62-73 | cmd/argocd-repo-server/commands/argocd_repo_server.go:101-112 \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 \u0060cmd/argocd-dex/commands/argocd_dex.go:62\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"cmd/argocd-dex/commands/argocd_dex.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f687ff652a80b2a9ca3bbd6b5d1756f13cbe8a46432b1470a9ad8e4020ca1b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd/commands/app.go:2569-2580 | cmd/util/app.go:529-540 \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 \u0060cmd/argocd/commands/app.go:2569\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":"cmd/argocd/commands/app.go"},"region":{"startLine":2569}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2aff2d45f3107bbe0560c1e2e8eb26b702bed267e3bf607ff22141426ce4ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd/commands/app.go:2825-2836 | cmd/argocd/commands/app_diff.go:650-661 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:2825\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":"cmd/argocd/commands/app.go"},"region":{"startLine":2825}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f1da932e76e18aac3a084521dce6a6fa6b8fff1d9e789d8b3a7992094b91fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): controller/appcontroller.go:2801-2812 | controller/appcontroller.go:3045-3056 \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 \u0060controller/appcontroller.go:2801\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"controller/appcontroller.go"},"region":{"startLine":2801}}}],"partialFingerprints":{"codehealthFindingId/v1":"12faa60e666dfc123f2a608a3ffc1f7eb2cd8b8ff5393bdb02f85ab24558bd95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/apis/application/v1alpha1/repository_types.go:158-169 | pkg/apis/application/v1alpha1/repository_types.go:212-223 \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 \u0060pkg/apis/application/v1alpha1/repository_types.go:158\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":"pkg/apis/application/v1alpha1/repository_types.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd7b73de68401aaf3cd4021da6f72d700bb577ec8b26fd653a6d554a025a8ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): server/application/application.go:1006-1017 | server/applicationset/applicationset.go:586-597 \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 \u0060server/application/application.go:1006\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":"server/application/application.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"01b9ff516fd4cbfe58a725fe2f0cdb8cd32b39ec0b67c08189b07360addd9de0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): server/project/project.go:97-108 | server/project/project.go:216-227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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":"server/project/project.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"43217ab0d69d0cd5aefcba73c60ff03d96495cb25c478554c93a14b9b392bb5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): util/settings/settings.go:1901-1912 | util/settings/settings.go:1916-1927 \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 \u0060util/settings/settings.go:1901\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":1901}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0da8eee4da0e625f0182fcdf5571d194d8e440514e54f88d02ef398d8f98c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): applicationset/services/scm_provider/utils.go:114-125 | applicationset/services/scm_provider/utils.go:148-159 \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":"applicationset/services/scm_provider/utils.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39b059e640f7ec7dc0ddddca87d42e6a34c555636a2beed45149ffe60a89ce5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd/commands/admin/repo.go:101-112 | cmd/argocd/commands/repo.go:122-133 \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 \u0060cmd/argocd/commands/admin/repo.go:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/repo.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"999656483da28fba1cdf632956a16ad31115c3b26c65ce5cad15426d91ac8f2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd/commands/login.go:87-98 | cmd/argocd/commands/logout.go:61-72 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/login.go:87\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":"cmd/argocd/commands/login.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"4451e4eca439f5572d8a7e68f9c7c3721a36b533667b0fd1f0becf4c5bd6f278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/argocd/commands/repo.go:386-399 | cmd/argocd/commands/repo.go:458-469 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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. 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":"cmd/argocd/commands/repo.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"392e918fb52c3589c0d054c8c1e5a4ae3c194052f7c61675b3c775874fc9cb8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): applicationset/generators/matrix.go:92-102 | applicationset/generators/merge.go:147-157 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applicationset/generators/matrix.go:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/matrix.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4bbdbb68959669d05e0226f7878ae9659d92f8e4ff2628841ff264633c2fd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): applicationset/generators/pull_request.go:221-232 | applicationset/generators/scm_provider.go:299-309 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applicationset/generators/pull_request.go:221\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":"applicationset/generators/pull_request.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6d272def8142b477d2bbd8533f5d858de921db36b5817b279aabaffc725121"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): applicationset/webhook/webhook.go:469-479 | applicationset/webhook/webhook.go:524-534 \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":"applicationset/webhook/webhook.go"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"1704bd569c9211d0c185c8699f90ebc1dfad8a9914863e31a807f21858f091a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/admin/cluster.go:381-391 | cmd/argocd/commands/admin/cluster.go:434-445 \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 \u0060cmd/argocd/commands/admin/cluster.go:381\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":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"174c80b4c1f524881c7c61756451be9cd4d3549fcb2b24c3b8cb2176a0b3a787"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/admin/settings.go:417-427 | cmd/argocd/commands/admin/settings.go:464-474 \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 \u0060cmd/argocd/commands/admin/settings.go:417\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":"cmd/argocd/commands/admin/settings.go"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1222a41c560d8e62771d092905c79515a053e97f017a39a9346f4f22c728da7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/app.go:253-263 | cmd/argocd/commands/applicationset.go:585-595 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1a4c09862a5343bc3515b3ad5cc48f63ff62e3291c1a372c706758e87c274e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/app.go:3104-3114 | cmd/argocd/commands/app.go:3251-3262 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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":"cmd/argocd/commands/app.go"},"region":{"startLine":3104}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e5d030baf13111b10e0f3dbcdc39c7440c19bd9932910c7a38804349a043fc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): server/application/application.go:514-524 | server/application/application.go:683-693 \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":"server/application/application.go"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64531cf1cf9d5c5d12c4880bc72d290217d5e4f8fad680778032da850530edf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): server/application/application.go:1560-1570 | server/application/application.go:1603-1613 \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":"server/application/application.go"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"b590de029e339b9fcc81cf56b64a96538d11eae0e3d66f1ef135385479803f7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): util/cmp/stream.go:179-189 | util/manifeststream/stream.go:212-222 \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 \u0060util/cmp/stream.go:179\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/cmp/stream.go"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aed23ff2a1b1f06b280bc907f04acaaf4a3a6697718d074fd0034f1fe1fad81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): util/helm/cmd.go:176-187 | util/helm/cmd.go:263-273 \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 \u0060util/helm/cmd.go:176\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. 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":"util/helm/cmd.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c93c366487764ccb5a0e27fc130630e1e302801cadcc133a182440ee2142d797"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): util/webhook/registry.go:74-84 | util/webhook/webhook.go:458-470 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060util/webhook/registry.go:74\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":"util/webhook/registry.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfa27a40f0cb92cc373aab697aac70022a1dd465c39dee1aaf63f51dfe61ce0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/admin/backup.go:54-64 | cmd/argocd/commands/admin/project_allowlist.go:54-64 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/admin/backup.go:54\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/argocd/commands/admin/backup.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27d7aefc078c1157ac696709dccc10de18acead9eaa9347520a2e5fd583a552"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/argocd/commands/project_source_integrity.go:274-284 | cmd/argocd/commands/project_source_integrity.go:379-390 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"08cdf34b20ebf23741169798f92ea317db4f32b3b0aa00bbe7d6d99cffa9cccd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): controller/cache/info.go:246-256 | controller/cache/info.go:454-466 \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 \u0060controller/cache/info.go:246\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":"controller/cache/info.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ad81d7c1e39d04b20b5a6d68d43686450942af9384873451683518b77c0bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): cmd/argocd/commands/project.go:339-348 | cmd/argocd/commands/project.go:387-396 | cmd/argocd/commands/project.go:437-446 | cmd/argocd/commands/project.go:1199-1208 | cmd/argocd/commands/project.go:1251-1260 | cmd/argocd/commands/admin/project.go:165-175 | cmd/argocd/commands/project_role.go:479-488 \u2014 there are 7 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. 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":"cmd/argocd/commands/project.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5315032fc2adfbc3fdeac748c8add925a0e6a66ab04f12a0c9f160902b8a5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): gitops-engine/pkg/utils/kube/resource_ops.go:489-498 | gitops-engine/pkg/utils/kube/resource_ops.go:524-533 | gitops-engine/pkg/utils/kube/resource_ops.go:581-590 \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 \u0060gitops-engine/pkg/utils/kube/resource_ops.go:489\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":"gitops-engine/pkg/utils/kube/resource_ops.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca6c15e1ab2384cdebbdd825bd64bca0069db5edb62f3186ea21cb605646924c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): gitops-engine/pkg/diff/diff.go:1137-1146 | gitops-engine/pkg/diff/diff.go:1154-1163 \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 \u0060gitops-engine/pkg/diff/diff.go:1137\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/diff/diff.go"},"region":{"startLine":1137}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb887da64bd4030260b67870c7d1f4af1331d53bb4a8c8139a1b8fbf9f7b5827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/admin/cluster.go:206-215 | cmd/argocd/commands/admin/cluster.go:502-512 \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":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67edfe83d048f2230913c75cbee6cba5eb4237cb3c2f789640fc74238a2f721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/admin/cluster.go:236-246 | cmd/argocd/commands/admin/cluster.go:531-540 \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 \u0060cmd/argocd/commands/admin/cluster.go:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a47f4c566ea64594ba44c083a7cbe3c6a20cf322d4c5308246f7d0c6d5f5a10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/admin/settings.go:345-354 | cmd/argocd/commands/admin/settings.go:366-375 \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":"cmd/argocd/commands/admin/settings.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cf7f2ee0895d88dc210da51323dabf9e6aed055ae8ca535e132c090ba8580ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/project.go:195-204 | cmd/argocd/commands/project.go:240-249 \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 \u0060cmd/argocd/commands/project.go:195\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":"cmd/argocd/commands/project.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24b076bbd7f6379ee80515ba677371c5acab5cd95010a413573404c38dd29e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/util/app.go:582-591 | cmd/util/applicationset.go:34-43 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/util/app.go:582\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"cmd/util/app.go"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"268d979ef332a8c29a36eb4f657d5b846cd6d7c6bbda325c25c02f81f859aef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmpserver/server.go:64-73 | reposerver/server.go:108-117 \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":"cmpserver/server.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e8144d804f12ba2343fbb9a675bfc36bc2b6730e819a9098c6b47b4d0a79cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): server/application/application.go:1265-1277 | server/applicationset/applicationset.go:92-101 \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 \u0060server/application/application.go:1265\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":"server/application/application.go"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"59925cacef11892127fae3fb5ac7de6725ae30530d2729d0849acb4d89cd4f1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): server/application/application.go:1668-1677 | server/application/application.go:1729-1738 \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":"server/application/application.go"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8963611780ecefcc617b4b5c998a837c5db093a23ab3799add644d68a4b20c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): server/repository/repository.go:160-169 | server/repository/repository.go:625-634 \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 \u0060server/repository/repository.go:160\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":"server/repository/repository.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6631ce7bbe18aa8a35c5f035c22eb6a66a848c8f7d4f2715ee962d79e54ea2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): util/db/repository.go:61-70 | util/db/repository.go:75-84 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/db/repository.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2ec971c491d3ed0e04c116d2edf1dafae371f93be37bd06d147889cb02f53a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): util/helm/cmd.go:104-113 | util/helm/cmd.go:262-271 \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 \u0060util/helm/cmd.go:104\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":"util/helm/cmd.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3fe82ee0f7edc283c8e36b386e5c27ba7a9181d328cacc9a86f7a7f22876c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): util/helm/cmd.go:130-139 | util/helm/cmd.go:330-339 \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 \u0060util/helm/cmd.go:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"util/helm/cmd.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4483378f697f3445c8e44fe541727b5cb1099a0e91bf73b052333ca3002d3855"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): util/sourceintegrity/gpg.go:223-232 | util/sourceintegrity/gpg.go:380-390 \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 \u0060util/sourceintegrity/gpg.go:223\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. 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":"util/sourceintegrity/gpg.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda187398a8890e4aac9b2602c8b9499d19a15d30db3ad6f2317585f3f5f82b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/admin/repo.go:124-133 | cmd/argocd/commands/repo.go:144-153 \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 \u0060cmd/argocd/commands/admin/repo.go:124\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":"cmd/argocd/commands/admin/repo.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"913a8c657d2b7b037ebcd3317a811817c6eb334a611107a5a82733ef6ed61541"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/applicationset.go:90-100 | cmd/argocd/commands/applicationset.go:392-401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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. 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":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ecec0ec7877a9610877ac1936488f01288e887ffa65e49ac551613c563a704"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/argocd/commands/applicationset.go:153-162 | cmd/argocd/commands/applicationset.go:262-271 \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":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd5de4cb0252a4a6e109714211e6f11a437105b36a9f0fed92f8ca45c83e30e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): util/kube/kube.go:47-56 | util/kube/kube.go:84-93 \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 \u0060util/kube/kube.go:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/kube/kube.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c2425cfc7535d27fbb169c6dc91bf5418fcd86463fbf3b72adfa1495e2a257"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 20): cmd/argocd/commands/admin/cluster.go:561-569 | cmd/argocd/commands/project.go:196-204 | cmd/argocd/commands/project.go:241-249 | cmd/argocd/commands/project.go:297-305 | cmd/argocd/commands/project.go:338-346 | cmd/argocd/commands/project.go:386-394 | cmd/argocd/commands/project.go:436-444 | cmd/argocd/commands/project.go:485-493 | cmd/argocd/commands/project.go:527-535 | cmd/argocd/commands/project.go:565-573 | cmd/argocd/commands/project.go:797-805 | cmd/argocd/commands/project.go:1198-1206 | cmd/argocd/commands/project.go:1250-1258 | cmd/argocd/commands/admin/project.go:164-172 | cmd/argocd/commands/project_role.go:231-239 | cmd/argocd/commands/project_role.go:268-276 | cmd/argocd/commands/project_role.go:332-340 | cmd/argocd/commands/project_role.go:400-408 | cmd/argocd/commands/project_role.go:478-486 | cmd/argocd/commands/project_role.go:585-593 \u2014 there are 20 copies across 4 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 20 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/admin/cluster.go:561\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/cluster.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1e936bfd981583aa48503489a578cd3988f8129fcb5e0aa4ed0ca919dbd63c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): cmd/argocd/commands/app.go:575-583 | cmd/argocd/commands/applicationset.go:89-97 | cmd/argocd/commands/applicationset.go:152-160 | cmd/argocd/commands/applicationset.go:261-269 | cmd/argocd/commands/applicationset.go:391-399 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:575\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":"cmd/argocd/commands/app.go"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3b3e2038025a378d7f5cef99b945b7031529ddcb1f056e8ca76981e171e7a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): gitops-engine/pkg/utils/kube/ctl.go:184-192 | gitops-engine/pkg/utils/kube/ctl.go:208-216 | gitops-engine/pkg/utils/kube/ctl.go:232-240 \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 \u0060gitops-engine/pkg/utils/kube/ctl.go:184\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/utils/kube/ctl.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b1c4965bc4a53542866f7a5d6473eec6685734ce35be69b4e45b26fd1342b4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): applicationset/services/scm_provider/bitbucket_server.go:140-148 | applicationset/services/scm_provider/github.go:55-63 | applicationset/services/scm_provider/gitlab.go:71-79 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060applicationset/services/scm_provider/bitbucket_server.go:140\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":"applicationset/services/scm_provider/bitbucket_server.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b826ee01ee0707ec8a9fb2da4b3250391081baf3d29f93d3d54fb95c364dfb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): cmd/argocd/commands/account.go:91-99 | cmd/argocd/commands/app.go:3103-3111 | cmd/argocd/commands/app.go:3250-3259 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/account.go:91\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":"cmd/argocd/commands/account.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e58ba7b4a44cbf0149eb807995b3642b59cc6174301c5c1ded7101bf6a7fa51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): cmd/argocd/commands/admin/settings.go:397-405 | cmd/argocd/commands/admin/settings.go:495-503 | cmd/argocd/commands/admin/settings.go:528-536 \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 \u0060cmd/argocd/commands/admin/settings.go:397\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/admin/settings.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b1f958f86c74acb222ced52a535d1a91c71e0999950083f15093be436d5209"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): server/cluster/cluster.go:180-188 | server/cluster/cluster.go:337-345 | server/cluster/cluster.go:454-462 \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 \u0060server/cluster/cluster.go:180\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/cluster/cluster.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"2334914fa17e7288669ee0cff60dedd77af52a6fb5dd6dc71bce43596a3692b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): util/kustomize/kustomize.go:193-201 | util/kustomize/kustomize.go:214-222 | util/kustomize/kustomize.go:264-272 \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 \u0060util/kustomize/kustomize.go:193\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. 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":"util/kustomize/kustomize.go"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccdd163c490cd41e24204397b2e9c214418fa5f1c37482537212cd777b9ec084"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): util/sourceintegrity/gpg.go:126-134 | util/sourceintegrity/gpg.go:222-230 | util/sourceintegrity/gpg.go:249-257 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also 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":"util/sourceintegrity/gpg.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"460b6825cc2f7ee1c8fd1726d0d78b5462851cf627f4c80dbc22e885891c0d03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applicationset/generators/pull_request.go:143-151 | applicationset/generators/scm_provider.go:179-187 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/pull_request.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"95dff2b209413765c3fb4ea8bd20a0ae5cdc2327c920fe4c8c2cdc2c7ab98ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applicationset/generators/pull_request.go:167-175 | applicationset/generators/scm_provider.go:205-213 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/generators/pull_request.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43e13f468e91b529828a650e599f5d8c2735f8e52307805372d1bb9253bcb99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applicationset/utils/utils.go:413-422 | util/hydrator/template.go:38-46 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"applicationset/utils/utils.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"f74225c5a505eadb6557358b1be56ed9c3a420668e2b8fa6fcb1e28a10b8c5a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd-application-controller/commands/argocd_application_controller.go:127-135 | cmd/argocd-server/commands/argocd_server.go:135-143 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd-application-controller/commands/argocd_application_controller.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"9951cb843cbb56b33c0f93f50f89557ef149ebe42e80508c32ee9d95aedc41be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/account.go:171-179 | cmd/argocd/commands/account.go:227-235 \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 \u0060cmd/argocd/commands/account.go:171\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":"cmd/argocd/commands/account.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"10cf56440d2cfd1654e7f9226cf12d7948cbb4770b46963d35ef87a98b8794bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/account.go:185-193 | cmd/argocd/commands/app_actions.go:117-125 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/account.go:185\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":"cmd/argocd/commands/account.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"b08c1bfa2af51451acd1c2769f5399145eb59c16c0dc0f8e0c2a26778ce15add"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/app.go:282-290 | cmd/argocd/commands/app_resources.go:442-450 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:282\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":"cmd/argocd/commands/app.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a23f1f135b7d6c04f21c8d348b6ebf0f06775c9670c3030831fa79eb8d66e12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/project.go:1126-1134 | cmd/argocd/commands/project_role.go:540-548 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/project.go:1126\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":"cmd/argocd/commands/project.go"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c3f4d58ca6e8cdf9e739402105d2aaa0487fff35252eb876222a944376e85bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): commitserver/metrics/githandlers.go:11-19 | reposerver/metrics/githandlers.go:27-35 \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 \u0060commitserver/metrics/githandlers.go:11\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":"commitserver/metrics/githandlers.go"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"c09236280ff0e899cd388ca3b983ce3eeb1d274f2675bc188439da4f10ee6d57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/apis/application/v1alpha1/types.go:2970-2979 | pkg/apis/application/v1alpha1/types.go:3012-3020 \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":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":2970}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eabecc01fffa041a20b2f13de685449c3e67cc0935b97e7148db01359447954"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): reposerver/repository/repository.go:417-426 | reposerver/repository/repository.go:459-467 \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 \u0060reposerver/repository/repository.go:417\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"reposerver/repository/repository.go"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb933164af9a497b514be02cdee09e0b880823fa4d87b8eb79c97b64c17f107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): reposerver/repository/repository.go:3227-3235 | reposerver/repository/repository.go:3299-3307 \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 \u0060reposerver/repository/repository.go:3227\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"reposerver/repository/repository.go"},"region":{"startLine":3227}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed44dd56d957d70932ff9187c77c982845dfaafb16b640ed137d287524a2bbaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): server/application/application.go:409-417 | server/applicationset/applicationset.go:347-355 \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 \u0060server/application/application.go:409\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":"server/application/application.go"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd6225154f42c97efa74912053ee4f37baacc0abf89c883b6f1dfdb857a4782"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): server/application/application.go:997-1005 | server/applicationset/applicationset.go:577-585 \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 \u0060server/application/application.go:997\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":"server/application/application.go"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"2077d5cbd25fce61a06ce478eb7166b87ce00bd38297aba9c4d9a0782337978d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): util/cert/cert.go:127-135 | util/cert/cert.go:193-201 \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 \u0060util/cert/cert.go:127\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"util/cert/cert.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2df4c2e8b68d2bcdf1d871b2607fe4e77ebc3fb5e8e71c4d6efd6030cd03b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): util/cmp/stream.go:195-203 | util/manifeststream/stream.go:232-240 \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 \u0060util/cmp/stream.go:195\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":"util/cmp/stream.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c36c262cab28a86a79ec186dc45f50324ede96b97fd1a40e89ef2c43770f50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): applicationset/generators/utils.go:25-33 | applicationset/generators/utils.go:37-45 \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 \u0060applicationset/generators/utils.go:25\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":"applicationset/generators/utils.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3f2138708d6a1d300fa914838d4a4f96cfa93ba96671fb7839908c03461e3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/applicationset.go:105-113 | cmd/argocd/commands/applicationset.go:213-222 \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 \u0060cmd/argocd/commands/applicationset.go:105\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":"cmd/argocd/commands/applicationset.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dfab78275265a354f61c7652554869770223dee0e10377f517825ec75a0b5b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/cluster.go:354-362 | cmd/argocd/commands/cluster.go:429-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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. 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":"cmd/argocd/commands/cluster.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab2ff3d48bef54c7a4329bce86bd042ca056b6e805ff257dca6820861b87535"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/project_role.go:100-108 | cmd/argocd/commands/project_role.go:175-183 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/project_role.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c2ab67648ee4b16401f5b3562fecd8019cbcf314c9e78f235f2042f56e3971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/argocd/commands/project_source_integrity.go:117-125 | cmd/argocd/commands/project_source_integrity.go:181-190 \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 \u0060cmd/argocd/commands/project_source_integrity.go:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce87ec726c1defb980fa3762eb754ad2dcb633874528805d140de3e626268cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): controller/cache/info.go:154-162 | controller/cache/info.go:190-198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/cache/info.go:154\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":"controller/cache/info.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"8659d255a07210bf9f308c802ac7dba4f85670ef9ee008d2c338ab0bac266b4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): util/kube/kube.go:145-153 | util/kube/kube.go:169-177 \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 \u0060util/kube/kube.go:145\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":"util/kube/kube.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dd16cc89ce19b21ecf686409c744faf57f597e27b6f1165c9373a2ebe266d3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): util/notification/settings/settings.go:66-74 | util/notification/settings/settings.go:89-97 \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 \u0060util/notification/settings/settings.go:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/notification/settings/settings.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a9b0802166b4a52b57175e8b6ebc7dd5fb9b4b25ab05018026614a9f6aa4f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): util/notification/settings/settings.go:78-86 | util/notification/settings/settings.go:102-110 \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 \u0060util/notification/settings/settings.go:78\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":"util/notification/settings/settings.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b33de256d647825d62f53896c3ef91b10edf92ca5e17cfcf8c75767d54378b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): cmd/argocd/commands/app.go:2964-2971 | cmd/argocd/commands/app.go:2991-2999 | cmd/argocd/commands/app.go:3062-3069 | cmd/argocd/commands/app_actions.go:78-85 | cmd/argocd/commands/app_resources.go:71-80 | cmd/argocd/commands/app_resources.go:318-326 | cmd/argocd/commands/app_resources.go:387-395 \u2014 there are 7 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":2964}}}],"partialFingerprints":{"codehealthFindingId/v1":"e795e354a8713417f46e3eb646e8b0b30014293e1c5440ba1b8fd7bdfb910dd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): cmd/argocd/commands/app.go:865-872 | cmd/argocd/commands/app.go:2963-2970 | cmd/argocd/commands/app.go:2990-2998 | cmd/argocd/commands/app.go:3061-3068 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:865\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":"cmd/argocd/commands/app.go"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"82191f544cbe3586f2250ffb709e3b377fcf9de8b544814277a8947b835adf5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): cmd/argocd/commands/app_actions.go:171-178 | cmd/argocd/commands/app_resources.go:317-324 | cmd/argocd/commands/app_resources.go:386-393 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app_actions.go:171\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":"cmd/argocd/commands/app_actions.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"548161425cf075cef6b315842d6cfd55844a77c1b438f26f193a911c4da080c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): server/repository/repository.go:248-257 | server/repository/repository.go:269-278 | server/repository/repository.go:418-425 \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 \u0060server/repository/repository.go:248\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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. 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":"server/repository/repository.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3bca00f57940f82fb0ab04c2b2584a51f2a414708ed71943edcc00e451e7ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): gitops-engine/pkg/cache/cluster.go:683-690 | gitops-engine/pkg/cache/cluster.go:1203-1210 \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 \u0060gitops-engine/pkg/cache/cluster.go:683\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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4321796277a873a21f606466db211bcf39e76df50c90ad59a157d57e11a88cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): applicationset/controllers/applicationset_controller.go:569-576 | applicationset/controllers/applicationset_controller.go:1193-1200 \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. 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":"applicationset/controllers/applicationset_controller.go"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba198bf96595e1960479c986af22668f6da61bb3363b3b72406b82318e7f486"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd-application-controller/commands/argocd_application_controller.go:151-160 | cmd/argocd-applicationset-controller/commands/applicationset_controller.go:219-226 \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 \u0060cmd/argocd-application-controller/commands/argocd_application_controller.go:151\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":"cmd/argocd-application-controller/commands/argocd_application_controller.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df67e1f1d3a9fdef2bd688bafa74bc57f126c0022f8baa1b4e192f782486276"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/admin/settings.go:537-544 | cmd/argocd/commands/admin/settings.go:602-609 \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. 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":"cmd/argocd/commands/admin/settings.go"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a6ef7e9e86d4177527021cad143f6f5b54b44cb3785f2b147a237bccfdf6c08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/app.go:383-391 | cmd/argocd/commands/app.go:578-585 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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":"cmd/argocd/commands/app.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"279b18a4a36e7f0c326807575634529ca7a6a8dff1d27cf15e219915e900b4ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/app.go:3005-3013 | cmd/argocd/commands/project.go:1137-1144 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:3005\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":"cmd/argocd/commands/app.go"},"region":{"startLine":3005}}}],"partialFingerprints":{"codehealthFindingId/v1":"32dbdbd92aeee0ee897df32cec138519027c194d05a4fd70ccd6e15771d92239"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): controller/sharding/cache.go:265-272 | controller/sharding/sharding.go:246-253 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060controller/sharding/cache.go:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sharding/cache.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"30accb786c4d21bcdf9d547e9d078a8e6bdbba4c19c21a0822ca06713035869b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): server/application/application.go:706-715 | server/application/application.go:846-853 \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 \u0060server/application/application.go:706\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":"server/application/application.go"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc93e0c46ee74b9fe7257faab5672f2b4952204a3873ca50366765169ecebd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): server/application/application.go:1020-1027 | server/applicationset/applicationset.go:396-403 \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 \u0060server/application/application.go:1020\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":"server/application/application.go"},"region":{"startLine":1020}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b9b06a0048ed2ca9d4ccd928f3e2e7cb498799c5b275f3712786ff035aa4bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): server/application/application.go:1699-1706 | server/application/application.go:1729-1736 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1699}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0be7e6456b201cbbdd358a7ba2eba160974d426c90db842959dda77dfdd80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): server/repository/repository.go:287-299 | server/repository/repository.go:338-345 \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. 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":"server/repository/repository.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"114151f83ce075b8ce49a0a972875cdfb6a4755b8931cd3eeaca75d859723068"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): util/git/creds.go:961-968 | util/git/creds.go:1063-1070 \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 \u0060util/git/creds.go:961\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":"util/git/creds.go"},"region":{"startLine":961}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38ea50a7aa0b3803dfb240c55079bcec0456717e7d18748aee726ed16b80a72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/project_role.go:547-554 | cmd/argocd/commands/projectwindows.go:377-384 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/project_role.go:547\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"cmd/argocd/commands/project_role.go"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a180aa86aff7a8fd573fbd53c1a10a013f39f1f357e77b5db7dc7b7ebeb80e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/project_role.go:639-646 | cmd/argocd/commands/project_role.go:670-677 \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 \u0060cmd/argocd/commands/project_role.go:639\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":"cmd/argocd/commands/project_role.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ea5a259eed187cb060ebdd6c326b744ebf2321732a799c085837601a7e57d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/argocd/commands/project_source_integrity.go:190-197 | cmd/argocd/commands/project_source_integrity.go:392-399 \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 \u0060cmd/argocd/commands/project_source_integrity.go:190\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. 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":"cmd/argocd/commands/project_source_integrity.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6584fca45ae56541aba3b843baa446f25d7142b7c9a3e66157e5b4af580d96b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): cmd/argocd/commands/project.go:161-168 | cmd/argocd/commands/project.go:1130-1136 | cmd/argocd/commands/project_role.go:544-551 | cmd/argocd/commands/projectwindows.go:218-225 | cmd/argocd/commands/projectwindows.go:374-381 \u2014 there are 5 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/project.go:161\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"cmd/argocd/commands/project.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d23a966972b94eb03c839355a0bbdb8ced6867ddf9a6ef048b701e1c4db62b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): controller/appcontroller.go:498-504 | controller/appcontroller.go:555-561 | controller/appcontroller.go:691-697 \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 \u0060controller/appcontroller.go:498\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"controller/appcontroller.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5ad8cbe3466a0608875cdf18847eb8a2c239df0771440d9f00f16ebeacdf44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): server/project/project.go:335-341 | server/project/project.go:498-504 | server/project/project.go:528-535 \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 \u0060server/project/project.go:335\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. 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":"server/project/project.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ef871a5bec7c0efc56f5bf9b4575dc50aa1b788e119ea4f17fb74e3c58ee48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): gitops-engine/pkg/cache/cluster.go:1601-1607 | gitops-engine/pkg/cache/cluster.go:1616-1622 \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 \u0060gitops-engine/pkg/cache/cluster.go:1601\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. 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":"gitops-engine/pkg/cache/cluster.go"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90144cf099bae21efb0dd869e1687ec51eea5749091695c47252051665ffc0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/argocd/commands/admin/app.go:293-299 | cmd/argocd/commands/headless/headless.go:137-143 \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. 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":"cmd/argocd/commands/admin/app.go"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb14e8255bb647d78a3c01b4b61e7c1b8d74cf6886e4e096503a8aee594a3dfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/argocd/commands/app.go:1463-1469 | cmd/argocd/commands/applicationset.go:358-364 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:1463\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":"cmd/argocd/commands/app.go"},"region":{"startLine":1463}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef7e407a830d96e5e1f99eda57d5d817a649282ddea16480fa225a0f7e5b59ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/argocd/commands/project.go:307-313 | cmd/argocd/commands/project.go:1219-1225 \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 \u0060cmd/argocd/commands/project.go:307\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"cmd/argocd/commands/project.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c3fa55e4a1a66d549bb156387b00c143c1faff27d1c9cf046f7061db7965943"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmpserver/server.go:51-57 | reposerver/server.go:94-100 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmpserver/server.go:51\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":"cmpserver/server.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec8404076404af3236652f3e45868634d1c3705ce36dac31932b9cda9ba54a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): controller/appcontroller.go:830-836 | server/application/application.go:3161-3167 \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 \u0060controller/appcontroller.go:830\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":"controller/appcontroller.go"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2505eb64f36dafa331d8030a8e2322e3a53e72eca7fc611d8a4b75261bcc804"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): controller/appcontroller.go:1105-1111 | controller/appcontroller.go:2523-2529 \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 \u0060controller/appcontroller.go:1105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"controller/appcontroller.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09a1842c44b13ec7364a47bb2042cfaa57ab7d29b684a33e87d5ff7ec5ae42c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): hack/gen-resources/cmd/commands/cmd.go:62-69 | hack/gen-resources/cmd/commands/cmd.go:101-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hack/gen-resources/cmd/commands/cmd.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d245fc9970e0f46d687461414978f425ea54c67a5da858987bdd3eea93a4d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): reposerver/repository/repository.go:970-976 | reposerver/repository/repository.go:1045-1051 \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 \u0060reposerver/repository/repository.go:970\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":"reposerver/repository/repository.go"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb6cd7c5b3e431210c8b8acf37d321b73900095c5128bb69f578a04bddd9090"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): reposerver/repository/repository.go:3213-3219 | reposerver/repository/repository.go:3285-3291 \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 \u0060reposerver/repository/repository.go:3213\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":3213}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc0dc4f19e28d0959de484a1d989a2e162e73967c462ee16824e487bb8ea2e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): server/application/application.go:2178-2184 | server/application/application.go:2318-2324 \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. 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":"server/application/application.go"},"region":{"startLine":2178}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4c93b0c372eabb877fe80088cf6a9be25b490087ebf3e85bc87d0893aefe0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): util/oidc/oidc.go:265-271 | util/session/sessionmanager.go:159-165 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060util/oidc/oidc.go:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/oidc/oidc.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a9c639dd9328a6346da9e4fd13ad26c5fd05d0c6776020169bb1156195d272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): util/webhook/webhook.go:276-282 | util/webhook/webhook.go:289-295 \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":"util/webhook/webhook.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7adefd90b4033b86dd9020173464c8c7cf328eaf96911f061ccf57f4ff90d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/argocd/commands/admin/repo.go:160-166 | cmd/argocd/commands/repo.go:222-228 \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. 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":"cmd/argocd/commands/admin/repo.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaba3bdba1a6d288666f62102f0f5eee9d89f0dfd46617eb5219e13006ae062e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/argocd/commands/login.go:136-142 | cmd/argocd/commands/relogin.go:77-83 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/login.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"7638d37c75558576ff9ec92d0f187f144d6dac0185af3f740c25c733cb1570cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/argocd-dex/commands/argocd_dex.go:140-145 | cmd/argocd-dex/commands/argocd_dex.go:208-213 \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 \u0060cmd/argocd-dex/commands/argocd_dex.go:140\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":"cmd/argocd-dex/commands/argocd_dex.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b64a8ffe53450ec0b695c35a74bae1f650191d1caa23bb478a500d2ba5f6db7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/argocd-notification/commands/argocd_notification.go:123-128 | cmd/argocd/commands/admin/notifications.go:58-63 \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 \u0060cmd/argocd-notification/commands/argocd_notification.go:123\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":"cmd/argocd-notification/commands/argocd_notification.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6861e4166e31e939dc67afb17259f1d91f14e76495c36c4ffb0849021e89a08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmpserver/apiclient/clientset.go:47-52 | reposerver/apiclient/clientset.go:130-135 \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":"cmpserver/apiclient/clientset.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b86db44ce8c888320e2f8afd56f1c2b933910ce027a75d1ac3745e7e6047fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): server/application/application.go:1838-1843 | server/application/application.go:3051-3056 \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 \u0060server/application/application.go:1838\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":"server/application/application.go"},"region":{"startLine":1838}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dcd835d04dd50babe8a92f8bd6a1307d6cf9ae4afe028dd2c1994dedf76a15d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): server/application/application.go:2223-2228 | server/application/application.go:2248-2253 \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 \u0060server/application/application.go:2223\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":"server/application/application.go"},"region":{"startLine":2223}}}],"partialFingerprints":{"codehealthFindingId/v1":"112459efae847cedb37266ba1309733f21891edea0786132d012c840262f66c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): util/db/repository_secrets.go:435-440 | util/db/repository_secrets.go:537-542 \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":"util/db/repository_secrets.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae7f27cc9c300b39e90c03ca315f594f1a28420c257c40e2d083381ba4afa44f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/argocd/commands/app_resources.go:78-85 | cmd/argocd/commands/app_resources.go:560-565 \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 \u0060cmd/argocd/commands/app_resources.go:78\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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":"cmd/argocd/commands/app_resources.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c6161dea88bf8baca6643df7cec7af0881d8843632a651e5172e60d8c98000"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/argocd/commands/tree.go:107-112 | cmd/argocd/commands/tree.go:127-132 \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":"cmd/argocd/commands/tree.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c68efdc42df1251c8d47a264ac2392d545840e9b1d63b225bca26139b5c24fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/argocd/commands/app.go:1251-1255 | cmd/argocd/commands/app_diff.go:777-781 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/argocd/commands/app.go:1251\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":"cmd/argocd/commands/app.go"},"region":{"startLine":1251}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9340ab2dbfbf42d15d965eb65aa174a208fc8d612830b42630e0ea44548f3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): cmd/argocd/commands/app_actions.go:85-89 | cmd/argocd/commands/app_actions.go:181-185 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also 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. 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":"cmd/argocd/commands/app_actions.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"489fe358331508ac12b6386951e8f52a2328e9ef73a04223788e504663de4933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): server/project/project.go:113-117 | server/project/project.go:232-237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060server/project/project.go:113\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. 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":"server/project/project.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db0e637869341d16c7912ddc21d6aac6811151d4a33814b419562fe1ae32be8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): util/db/repository_secrets.go:335-339 | util/db/repository_secrets.go:472-476 \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":"util/db/repository_secrets.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"061819946ea1de1dcea5323221f4d76a00d9622f90c791b78cf07d475ab4f8bb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: controller/appcontroller.go: controller/appcontroller.go changed 22 times in last 90 days, max complexity 44. 11 of those changes were fix/bug commits, and the other 11 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/appcontroller.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1db9968ec2002b64e93d9cfbda10df8e2ca7965770888219c5f8045157db14"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: reposerver/repository/repository.go: reposerver/repository/repository.go changed 21 times in last 90 days, max complexity 42. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"reposerver/repository/repository.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"918fdf19d71eff61ae5a42a7fad311ba89be2eeb8b553c75490e5ee9986957b6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: controller/state.go: controller/state.go changed 8 times in last 90 days, max complexity 95. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/state.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a89e0ac83b032a96bf6e56da65f1f9d1474dd774c640cadb75206afa26de00"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: gitops-engine/pkg/sync/sync_context.go: gitops-engine/pkg/sync/sync_context.go changed 8 times in last 90 days, max complexity 59. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"gitops-engine/pkg/sync/sync_context.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4361298aa3c61676b55e040afff451ae53a58f6cb0ccba35566821e68e4ab22e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: controller/sync.go: controller/sync.go changed 9 times in last 90 days, max complexity 51. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/sync.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4e293fda7c761f43f7ab10ee7e3e500fdac94e3d007aec8049770bbce1214d3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/argocd/commands/app.go: cmd/argocd/commands/app.go changed 4 times in last 90 days, max complexity 69. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/argocd/commands/app.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b0672ec5bf253087dc04b5dfa29b066e4e2a54d4b47ff4d500eca51712f520"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: controller/cache/info.go: controller/cache/info.go changed 6 times in last 90 days, max complexity 46. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"controller/cache/info.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5c3701a153165093c6314ab809269f813f9f5588b57b63a3d2575a53b2aa82"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: server/application/application.go: server/application/application.go changed 6 times in last 90 days, max complexity 46. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"server/application/application.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"492392e87f36d674cdb0a340bcb664e6e244beb6f4e61e74b9d1f2ceaceae639"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: util/settings/settings.go: util/settings/settings.go changed 13 times in last 90 days, max complexity 19. 4 of those changes were fix/bug commits, and the other 9 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"util/settings/settings.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"16b83dba6f9bd5daa7e6830b5018fcec8e261f13f795f14cd851c3f763b74622"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/apis/application/v1alpha1/types.go: pkg/apis/application/v1alpha1/types.go changed 9 times in last 90 days, max complexity 27. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/apis/application/v1alpha1/types.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"690590645907baa363d3dd79366c3d14a3de99bdab4c5799334c5c097d0d7887"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: util/kube/util.go, hack/gen-resources/generators/repo_generator.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b9d075f4c8ebb1145eceafbd7040f37cb0634a615432e30c83e21ac02652ef45"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (6 single-owned of 285 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7c3f72c6ba89cb32e345f1994aaad484e2e27f7fe4ee270cd3b0d88f398d900c"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d63634160eb6a603bb61721eec48df4b79c7544b09dbcba43ae3a1bfcb4afcb5"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2e28b8f8929a6a67e573cabb90ee43e85bf07c85dfcd2a9b7c233ce07d3151c3"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"153f3c463e6f40b218d6bc3c140d9d7eddfe54839165e78eec29a3fd9e510ee5"},"taxa":[{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e506f4058c0c72d0faed4d84b3ff23067560c0e59fee1fe84436153538b2ed72"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3aa0cf89128bdb14e509e14e6b9a3e78493eb1f5db15a1cae7f4c3c19c1d0823"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7b6da35d1615f17253da417261953b8628a9c0a19c6344018ac839551daf1279"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9ff9da328b5efc30f4dc85ea8831321576f3cfdf03c4be65f5b3ab76f6331d7c"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d33ac7f7db51fb20b9444b21866905324601d5154e7b6c702990032f7319690d"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e8f3988a5241a1fe6896a1fb8d1594357886f7e09e1c05cae45fc5fcbf0ec117"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e6c0ddd5c2b3731bdee6f11be0630c6665d0f8bd769472f8762fcae60daa72a7"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f4a4ba977ba2d903f8bf252489d6fbafce7da287e21a85d8d9ad5badef9e8ece"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"813b6dca832b84ea92eeed54655098264fb3dff61e03dadeb2c9759bc2a8f039"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9f4a8da6eef3db7d72ccb8277955ff5f025ab3f9d0e54f598a22df0f5591cd9a"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3a00809509f75fee799f2c3f21d21e4ffb16fdbb147b6c53542548f9c98552fb"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8428b06026639d7ae996c07f4e785064c1d207e190419b6c21c6b253b3dd8e54"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b7399b00725fd4cbce0a38acd38e75efebefa6fe4734157f9f5685bd5a97a482"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5d94bd56940e886e6903472edca6fc5724d3536054bb0c9ef27dae0ae32456b"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"46c4deb0d203dd7c7f5e6407921d137a7ab6be92a65a0f9f234a8234c1709646"},"taxa":[{"id":"CWE-328","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"800ccb4c3e3a26fa8775be08bdc6388ea503f051125167527e89b6d4ed9ebb8a"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f6d3bf655436e90216dc8656f6575f3ed8ef154711089e21d907a5173010638c"},"taxa":[{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cdef52f71b622f578fd3252e8612b5e9d0214e347149fb4e12f851df9d84d5c9"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4e4b79e9f9e89e7f94751b9ac395aa434db0dee37e9139b06dd8da2ecbeebfb8"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b3c49272de0b93512c97e78f6f303784b8ab078c360475917b0c3b3fd77b4c46"},"taxa":[{"id":"CWE-400","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b47ad885696138d31541bbef2433aff4c31d896a0e3372b0b41e746b12d205e2"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"92052ea16f01b515737c315d34b6bbd4712b36dbcf338cdf287df1bb6000f709"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f9d7677b3e1bc9044112cb8c393183af444fba38985ad4500e22e8150c48d41c"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8350e795f5b3007aefd577fe235a8668c11ce6d8743285a957a68102d63365de"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0aec468202e2c76d2ae9b3440f70ed35bacbaff4c14d4c95a3c38e2f5b5aed3d"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1ae04eee6f433e970eff3388e98ea2fbbf4c5633a1ac9ba7a65a9709aa62767"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"db7becdbebc774aaf6c6c35757d7939e28e755f91589fe45aae50d1b3edec7cc"},"taxa":[{"id":"CWE-242","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"da3f8cc68ac1756ea9c805c6017ce02eb98a135ecad3b9803b484796edd490a4"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"45f95f1cbbbfd62e9565b451bbe82469fa8bad9efd14c16cfc7b722474edfb4b"},"taxa":[{"id":"CWE-377","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eaddc345be22b51058253b55ad1921bed89cb4d29417c080fc913ae0df3a6ca5"},"taxa":[{"id":"CWE-377","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"69e4cf98d84d7a48f9f30c5c0b8db99e18bc822f09790a67bd408ec1866a5c9d"},"taxa":[{"id":"CWE-377","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2a0311045484913d90fd90474d4c1c88d59c65c98f8276d23231a323bf261039"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5cce1163f84718ec042b75f1d258d7e0289c84ce37a405c7edb4f68b9988bf51"},"taxa":[{"id":"CWE-489","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fd9cb270ac917d772f647dd2b005aaff0e23d14e115c4e9968f4845257fe9815"},"taxa":[{"id":"CWE-489","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5fb33eee58b02402e6f2afb5605de98b3bd7fc65fe9d9011a4e41ea9371b8afb"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f9935edae0e9c10fb6aae214363ab54762369b88b6aeb71a3ee64ec4497084b6"},"taxa":[{"id":"CWE-352","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cf64fbeade544a074d668eee076401dc4bc06a8299874a2c9639208ace581a0a"},"taxa":[{"id":"CWE-1004","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"73dbac14fb52aeab1db144000fa62806cf5f21634ce62b998e24827abb6dfabd"},"taxa":[{"id":"CWE-614","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b473fb3596745a5432c42f66ab1027e325b127ec3d9cdd58d0e42c0475dc6882"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0350a60eb0c14adfe2f820c840d649e6afebc27a449d311bce01dc576c18cd7f"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b5bb2653127c063fe7fe83b4485ad2ebadc10ffd13cfdf46b681ff438ad1700"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c3494fd4fbcaf751e8199ccc410335fde5a7aaa9206b9330a200da228ee26a7b"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2294b47f92733a2b2ab7725301dbca968e46ce6b002080e77681e8bb993c72d6"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"284281aa4a7b495c8c81e6193aa1fadef35eb6f83235f250a0069efb9ab662d4"},"taxa":[{"id":"CWE-322","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7d70e4d7df43644265cd5d29ac8b6f068e9913997d32b9859fb164b684e92458"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7449af45dbc93f814190bec344bc2d360587e73efef10018fd73c67df1ab0fe3"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"93979e0965d462d280b71d2247ec8adf9a22bef6679cfdecbe556232198782a2"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"477178783440b5536fee0f39f3c88096327d8111ce97a2234e6b0eff682b0496"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9665964f93222fadc4ad7f9253fe0f58ff465038f91062aa89a1cf37724ad048"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6d7328b54c72c6d80b33116828a7545f37b51054494169b26fd9170af57af22b"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7004280f0765c31adb0f4003a21918d21ff5189899ea70b2e940b512d05f6d75"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f69760f5d71fa4535e418999b1d8c121897f509422e5fdf490c6373dc93f07fd"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"20e0c9c7be5af0d3f1e59e9c528771427a05ce01fd44f197fa01b7ad03376077"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2920b2c9f1cde952a0a12ea3f1eaac2df5fb880ab3aed8e1c03375d43c32a97"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"45ee9e3b8fe77e848d43e8f2cd804cbe7f3aa4f73dbbd57a318fe7a0b9096317"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f7ef5407e35a927c113ff285dfa6a9214c0bd86821e18263c58060aba637d682"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"492deb8ee043693d0349d3158b996715d7cc0f0c97fe7aee4369d8e24ca34817"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c32019bb37d1d4e7e716b32573a9f8545b14f30556f5b08e6fbe1125cf5799bc"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"521551871b842044e09258fa4c02c235a1ca2d99e5e91b97e651fff77dadffee"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9bdf59a9fda913e32310491a457e0df1c69f1049ac85ae67f2d419889d60495a"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"15207d6b7f3400d62c561d186684839d4eff5c0b1860b3993f711f1d760cfec9"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d7f6343bdbacbd2aa2a1421ee39b4175dda4074b34b8ae4d25eff559f42ad881"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f9dcfd8603376c29527f0d4345c13aaee61c2c26b8b03e4dd7196f0e42c010f6"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c9dae5c57f2c4c969ef2b3493e394630fc7087a13f21ede0ad0d2f61edd1c07d"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"df2a4379aed21941604bddbe9a49521b6997be666ed9ff58fe4f67a07ab424f4"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"79610fe6a4a8006b96298777c4fe9b29943d5e7273e17096b9fad2765d5252ed"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6f5418f7b4dc7aef96db5799ad692c6cd240cce7f35c3bebb3238a56d70b8cc1"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e8abd80c6909f59c58915cfda7feb7152520d0a719a29a970e4e1cf8204d2991"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"598bdfafcbe95c2d79fd5aa048f69a8a7969dc1a2a756df7d480ad5fb9499d57"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2c6b18a0f917770dcba4f2a4b04c636bbc659c79d0f66113f07cb0592e71bdcb"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"777fa474d706b1ca2fc838ef19d144a9cf7d4abcbe69c87c68950be9014a0833"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0c48116b7e794af04ad2b3670968dfef76fa50893e5c66eb1e906505aac2ffe7"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6d92261ed62fa267c6f21a9560cc0c1885f1260b770f928bca86875c6ff90b4e"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"315ec7f63f27b4ea9965243b3a01219cd4813cda0dddd8950db1f35cdeaa6fd8"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"03862ddcb4074ae320140ba910f4264a33b9664497061c9ac915405ac2e4ebd9"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"831ca72220de5100224f4dd6166bcea62b0e1d021c68a97626fde25a611523b3"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8283f1fda2cf59c292a2e2927b56a222e942006fcf1cfe54b340d402173b58b0"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cd1b37da8fb92848f6d54167de26622a9a4520adf055f79646258049f8cedb2c"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a5b52c748cf3de4d168ae3600041b04e90c6f5a52f1f207037bf9af0ebfb8adf"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"53c3b7f5b73f6e6e4605f7e19c083357cd1e4c2befa6e1a3be2a2c2c13f1654c"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"cd419c04ce05ff5d72f4697963abb4da53efba2d02b790428fb328149fbb7513"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7002667cb5d4c3d2a7fde70ea07fe744ff92f321d491f0e3e6e75bab80c34d2a"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d24fa8a0af62c897b18fb1159d53bcf60e9425b2f4519396ae1979bbd4161e8f"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"060d2faa351b0945a4fccc1efdfc140b3ee695b61ea81e4e72159f1dafb1539e"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"001c9c2e4aabc0ae3383d87446db868afb70fcf54eb5d4c6f3482c90439ca71f"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"558c8f3fa2e513852c3396c22a7613e52494d8497def01a54b63c872593e2e2e"}},{"ruleId":"D31","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2447a8e1b0d4759f09ea627f4ae2d99cfe2119ce26b98be2485f45c75eca9ffd"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 37 of 285 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 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). 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 largest first: util/clusterauth/clusterauth.go, gitops-engine/pkg/utils/kube/uniqueprotomodels.go, gitops-engine/pkg/diff/internal/fieldmanager/borrowed_managedfields.go (and 34 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":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"03ca47e374a38d00469d52ae26b8146f727866516d2342feaa21f63388785245"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"91665a78a2d013c9e5bd71df1887915f7f0f303c806ecb1e49cc9694b5bfbe52"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"27f83c2b372c65806e3e3e64899de07853ae9665c48cf7f88ada2756df67792a"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2b05a3bdebf05c32e531441d967ca8cb64a681c17a836f501077fac90980cde"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"aecab607db5364a16a760f513eb40d6c8de9f9fe0c0ceb89230ed9d4779dfde1"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b5857b293f2fa67025df1e58965e4a85ef8a2fa828b64ef321496c68bd1bd26"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ab0133be2088f39a7f889a47b87886db596f7064a4f5de33bb8589c9af2528ef"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ff04de5176a905d55e89aab1c7b17d4ba785de4f9d11adb27b977b745ed1c88c"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"aadf16c8954cff20fc3b93e5746e6810a43f6f5fb2b76cae93b7c1cd63d7167e"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"25ba3a7ff4ea0802eb8f38b49dd9c76ea4567df1b1cb7f1ff4eb32c66d2e2a56"}},{"ruleId":"D38","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"911559458eac1f15436c59d9ec122ef9aedbaf4c203207c63703ea000b775d73"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e4d24f32959092d3d82d8bb8aa5aa4254cb2bd3b12b3aef3e0aff1df89639ac1"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5c7a8ae1f8010b7b2bbf988139a1e9a378187316c09cfcbd26edee210e858f23"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ef6e5d8a9975b32bc51aa6de439f4066b3540ca68b282a24e3da90a614e8345c"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"47c9fd8f8d375c345a57fdbb5a277ed9ccf4821f3d9b47013b542911af1f3c7a"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"50c379534161bb30611d421e82af3666b891a67b9a6a35df5a4fc4b4977e653b"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2274eed99ea03e8dd10a34eee9c392214c294e1c299c92944b400cd01072b37"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5bb6511ccadf47fcec0eba481fbdcaeb413336d244401cd46ea96fa925391ead"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1c50914a0d71fe9bee2612e6cdedad4be6b7fc0661f1e87b56ad085ca791b525"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"731dfbc87be6972374046488c4a208dd1c4928855b1aaf96f09f34d34a5ef5de"}},{"ruleId":"D38","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4df5d224242b165296b94e5c48727fd5f29b2f9762c251f909e5d4279a1f4226"}},{"ruleId":"D38","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"af8df1141f7546315c792ff511aaa7c8517a02559efb338801cf695291b9c2a8"}},{"ruleId":"D38","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc7afa5a91ffbc7a98b82eceededc39a7c43ae032ccfcb583540218795833ea1"}},{"ruleId":"D41","level":"note","message":{"text":"No AppArmor/SELinux confinement: Workloads declare no AppArmor or SELinux profile. A mandatory-access-control profile confines what a compromised container can touch on the host, complementing seccomp\u0027s syscall filter."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e83fbc31033373d6c51983ed230eb4ba61f7775ed02afb30f5fc1840bde01d4f"}},{"ruleId":"D42","level":"note","message":{"text":"No runtime threat detection: No runtime threat-detection engine (Tetragon TracingPolicy / Falco) is committed. These observe process, file and network activity in-kernel and can alert or kill on malicious behaviour a static scan cannot catch."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aade9827a37dfc7ee064f80a997f47b5d11e31bc09704e26b9252bef00aa0c58"}}],"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-1004","guid":"872195c9-bb07-cf51-8a32-865f4bb753ca","name":"CWE-1004","shortDescription":{"text":"CWE-1004"},"helpUri":"https://cwe.mitre.org/data/definitions/1004.html"},{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-242","guid":"5c147e5c-be37-b051-9928-764ef5a8f3d3","name":"CWE-242","shortDescription":{"text":"CWE-242"},"helpUri":"https://cwe.mitre.org/data/definitions/242.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"CWE-319","shortDescription":{"text":"CWE-319"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-322","guid":"f9bcce90-227a-d056-9902-7b1c2f9f299c","name":"CWE-322","shortDescription":{"text":"CWE-322"},"helpUri":"https://cwe.mitre.org/data/definitions/322.html"},{"id":"CWE-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"CWE-327","shortDescription":{"text":"CWE-327"},"helpUri":"https://cwe.mitre.org/data/definitions/327.html"},{"id":"CWE-328","guid":"f0ffc869-97c3-dc5c-8825-be1159f1fc5f","name":"CWE-328","shortDescription":{"text":"CWE-328"},"helpUri":"https://cwe.mitre.org/data/definitions/328.html"},{"id":"CWE-338","guid":"e89b7604-c3f7-8b53-bc8c-4d4718c28617","name":"CWE-338","shortDescription":{"text":"CWE-338"},"helpUri":"https://cwe.mitre.org/data/definitions/338.html"},{"id":"CWE-352","guid":"2afe7bdb-7330-195f-b3bf-8cf5b789b3ae","name":"CWE-352","shortDescription":{"text":"CWE-352"},"helpUri":"https://cwe.mitre.org/data/definitions/352.html"},{"id":"CWE-377","guid":"53bb4a85-bb20-a053-b6e4-4a9f656e96bb","name":"CWE-377","shortDescription":{"text":"CWE-377"},"helpUri":"https://cwe.mitre.org/data/definitions/377.html"},{"id":"CWE-400","guid":"ca529a89-676d-8857-aac1-84359c77bb6c","name":"CWE-400","shortDescription":{"text":"CWE-400"},"helpUri":"https://cwe.mitre.org/data/definitions/400.html"},{"id":"CWE-489","guid":"b1d97a6c-8316-175f-ade8-b1bfbc14619d","name":"CWE-489","shortDescription":{"text":"CWE-489"},"helpUri":"https://cwe.mitre.org/data/definitions/489.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-614","guid":"faa8a6a5-7e9d-5d5e-afc9-020ff49d250a","name":"CWE-614","shortDescription":{"text":"CWE-614"},"helpUri":"https://cwe.mitre.org/data/definitions/614.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":117,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}