{"$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":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D7","name":"Architectural Integrity","shortDescription":{"text":"Architectural Integrity"},"helpUri":"https://codehealth.canine.dev/dimensions/D7"},{"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":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"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":"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"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.FillOutSpecGen (cyclomatic 194): specgenutil.FillOutSpecGen has cyclomatic complexity 194 (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":"pkg/specgenutil/specgen.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"1817b94224a91f40281a0cff9070cf41c971db69ffa34d87daabbb50bc827ff4"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.generateSpec (cyclomatic 142): Container.generateSpec has cyclomatic complexity 142 (threshold 15). Of this number, 140 points are the body\u0027s own statements and 2 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":"libpod/container_internal_common.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"509e6d7f71fac1d45b0f41320c282f93bb5205d97edbdc562781dccf7f483e97"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.playKubePod (cyclomatic 129): ContainerEngine.playKubePod has cyclomatic complexity 129 (threshold 15). Of this number, 128 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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"732a61b1fe0c6bdde131014e2ce519e0059e0136dffe43865eced57bef962063"}},{"ruleId":"D1","level":"warning","message":{"text":"images.prepareParams (cyclomatic 114): images.prepareParams has cyclomatic complexity 114 (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":"pkg/bindings/images/build.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f89ebeba068d38e97411f3e304919e061ea6ed5803a31cf80f2536c6a8e393"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.ToSpecGen (cyclomatic 102): kube.ToSpecGen has cyclomatic complexity 102 (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/specgen/generate/kube/kube.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"18af6d3d659cb0e45b18f3b7e3fc467e9a18eda9f57daea1676c0055eebe3069"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.restore (cyclomatic 101): Container.restore has cyclomatic complexity 101 (threshold 15). Of this number, 95 points are the body\u0027s own statements and 6 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":"libpod/container_internal_common.go"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7bc0b728d253e56e599f2a4cfa1e08a577e9100da49bb37b0a6a276b08f3ef6"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.createContainerOptions (cyclomatic 100): generate.createContainerOptions has cyclomatic complexity 100 (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/specgen/generate/container_create.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"356f661edf0e81a7abfe91ec9351b105bf7b9290a1fe6cdf6481f2f126db233d"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.setupContainer (cyclomatic 98): Runtime.setupContainer has cyclomatic complexity 98 (threshold 15). Of this number, 94 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":"libpod/runtime_ctr.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"6966a4bb786529c8cf17e70503dac51e1c7b57f3c4803bbdac31eb66afe70a93"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.namespaceOptions (cyclomatic 97): generate.namespaceOptions has cyclomatic complexity 97 (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/specgen/generate/namespaces.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d45042da8f2ed53f54b91f8936d094fc0ace74d654721cabfb908441074f825"}},{"ruleId":"D1","level":"warning","message":{"text":"common.buildFlagsWrapperToOptions (cyclomatic 96): common.buildFlagsWrapperToOptions has cyclomatic complexity 96 (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/podman/common/build.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6f3aee65d9d9f0a4f53d179dbf9b9d27e767fb856135ccd10d72ebe22384ea0"}},{"ruleId":"D1","level":"warning","message":{"text":"filters.GenerateContainerFilterFuncs (cyclomatic 90): filters.GenerateContainerFilterFuncs has cyclomatic complexity 90 (threshold 15). Of this number, 44 points are the body\u0027s own statements and 46 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":"pkg/domain/filters/containers.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5375a3b8a8f117e9841b28844fc3f6d9ca3d6b8f93d0d9bec99651dafdaf3c13"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.cliOpts (cyclomatic 86): compat.cliOpts has cyclomatic complexity 86 (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/api/handlers/compat/containers_create.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afe6d6389cc6fa0ccb7a492a02fc3105df7d218de14842c03aa5eb1a4aa60fb"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.createBuildOptions (cyclomatic 86): compat.createBuildOptions has cyclomatic complexity 86 (threshold 15). Of this number, 82 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":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"726732d6d5e6a0774266f903e78d98b1200053bf5a4485a69058cdf62b09af14"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.MakeContainer (cyclomatic 84): generate.MakeContainer has cyclomatic complexity 84 (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/specgen/generate/container_create.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"549c15037bc4e4b93112f247aceb0a04b89c05930219cf13cc80862c02b11748"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.removeContainer (cyclomatic 80): Runtime.removeContainer has cyclomatic complexity 80 (threshold 15). Of this number, 78 points are the body\u0027s own statements and 2 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":"libpod/runtime_ctr.go"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e48a980e8e620d07ee1011042c6de20b28aae49f2d77592554854f993cff443"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.SpecGenToOCI (cyclomatic 70): generate.SpecGenToOCI has cyclomatic complexity 70 (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":"pkg/specgen/generate/oci_linux.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"603999f02e9888a8d5d764021df256ede241f2ce6c2c6701b33c3fe693e4563b"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.platformInspectContainerHostConfig (cyclomatic 69): Container.platformInspectContainerHostConfig has cyclomatic complexity 69 (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":"libpod/container_inspect_linux.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a0c5588e41ecb9ada23c2ce93833bc894c3952707bbfebabbc8cbfa5a0dc56"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.makeRuntime (cyclomatic 67): libpod.makeRuntime has cyclomatic complexity 67 (threshold 15). Of this number, 58 points are the body\u0027s own statements and 9 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":"libpod/runtime.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"3890b2b8ef9915b34aae4644116fe9b4ba0844b2a4910ad563c1505a4c3f13ce"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.validate (cyclomatic 66): Container.validate has cyclomatic complexity 66 (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":"libpod/container_validate.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1dd0da5309aa5a2f8dd5697a8aab616219d03c99feae3b4bafb4fe43a038644"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.parseMountOptions (cyclomatic 66): specgenutil.parseMountOptions has cyclomatic complexity 66 (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/specgenutil/volumes.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"7724833ba13f9ec253dc15005481e1cedfcd469a1e33144c2120fd7680ea3ee9"}},{"ruleId":"D1","level":"warning","message":{"text":"util.processOptionsInternal (cyclomatic 66): util.processOptionsInternal has cyclomatic complexity 66 (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/util/mount_opts.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade84788725f186c6fd49e35fde9cde22bb4138162395e9502a93c012365f59e"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.ConvertContainer (cyclomatic 63): quadlet.ConvertContainer has cyclomatic complexity 63 (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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce769e300a9c07b6f4af31203679215a32cbae0c5b2e736996ebb4f2875ad84"}},{"ruleId":"D1","level":"warning","message":{"text":"common.NetFlagsToNetOptions (cyclomatic 62): common.NetFlagsToNetOptions has cyclomatic complexity 62 (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/podman/common/netflags.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec6b4f747e688d41161c0c0c66e1adec3f514bc72cf2f45bb4c9fb327cf833d0"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.securityConfigureGenerator (cyclomatic 62): generate.securityConfigureGenerator has cyclomatic complexity 62 (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/specgen/generate/security_linux.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"afac8d67d19732d1dea724269993f80ff9a33fdecfa1265a36835ca22112a869"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.PlayKube (cyclomatic 61): ContainerEngine.PlayKube has cyclomatic complexity 61 (threshold 15). Of this number, 53 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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"78c4afd99b8e00cb8457d1d289b84a311c0ee17970d5fc1cd9189774a437e3d4"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.CompleteSpec (cyclomatic 61): generate.CompleteSpec has cyclomatic complexity 61 (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/specgen/generate/container.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f31968441038c9147a3b46a9ccee26f4b15010347eceb8ef59737c8a53223d"}},{"ruleId":"D1","level":"warning","message":{"text":"filters.GenerateExternalContainerFilterFuncs (cyclomatic 60): filters.GenerateExternalContainerFilterFuncs has cyclomatic complexity 60 (threshold 15). Of this number, 38 points are the body\u0027s own statements and 22 belong to 7 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":"pkg/domain/filters/containers.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54ecfffc5fafcd96d2cad3c5677051cce4d720b15a3b4c959b5639abcbff330"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.makeBindMounts (cyclomatic 58): Container.makeBindMounts 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":"libpod/container_internal_common.go"},"region":{"startLine":2001}}}],"partialFingerprints":{"codehealthFindingId/v1":"66bdaea0cfbf8d3caafd586f02e4bf7d479657e91abae8bafe78d1d0fc8bfe51"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.createOCIContainer (cyclomatic 56): ConmonOCIRuntime.createOCIContainer has cyclomatic complexity 56 (threshold 15). Of this number, 54 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":"libpod/oci_conmon_common.go"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ea646170a68717bdc7e40340acbab293548b87e87d0ac977cc991329279af3"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.specConfigureNamespaces (cyclomatic 52): generate.specConfigureNamespaces has cyclomatic complexity 52 (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/specgen/generate/namespaces_linux.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e2b39388cd27ca42c78dee3635eac392fb8a9c93fc686a1406a1cca5fc9db1"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.CreateInit (cyclomatic 51): containers.CreateInit 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":"cmd/podman/containers/create.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf9d7858d32fd3b333c7c24d7233747a45b07ebb514c71fde2ac65a6a51d23a"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.mountStorage (cyclomatic 51): Container.mountStorage has cyclomatic complexity 51 (threshold 15). Of this number, 43 points are the body\u0027s own statements and 8 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":"libpod/container_internal.go"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ac9a0ebe69ddbe936420292c95ada882fd0916739c0fe788b950484707b40e"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.Attach (cyclomatic 51): containers.Attach has cyclomatic complexity 51 (threshold 15). Of this number, 46 points are the body\u0027s own statements and 5 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":"pkg/bindings/containers/attach.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ce886c050a6c19829fdc66ca79126100b7fc777006cbcd510603cc46dd170e"}},{"ruleId":"D1","level":"warning","message":{"text":"pods.create (cyclomatic 50): pods.create has cyclomatic complexity 50 (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/podman/pods/create.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"5941af27bbee460c688abb6a47e290995fec061a41657f3e01deeb8b37a84e50"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.newVolume (cyclomatic 49): Runtime.newVolume has cyclomatic complexity 49 (threshold 15). Of this number, 45 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":"libpod/runtime_volume_common.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d163742efb93b9c5bf43c41923dcebbe00c5335d92f4c982323ae3ba717458"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.ConfigToSpec (cyclomatic 49): generate.ConfigToSpec has cyclomatic complexity 49 (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/specgen/generate/container.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6b88679b193d460516a65f6b8338aebc23421d9da7da50c23db19c01f86505"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.extractFirstWord (cyclomatic 48): parser.extractFirstWord has cyclomatic complexity 48 (threshold 15). Of this number, 47 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":"pkg/systemd/parser/split.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"8548342eccc7369a26e1bef250254dd2456013b944d51576d40fb7e22bfa7c30"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.ManifestModify (cyclomatic 47): libpod.ManifestModify has cyclomatic complexity 47 (threshold 15). Of this number, 36 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":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"51367e120947a063f545538d29eb201158980cb07066820f6b815d7dd7ff6973"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.finalizeMounts (cyclomatic 47): generate.finalizeMounts has cyclomatic complexity 47 (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/specgen/generate/storage.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4c78290759abffde89f91bac04b507f1fadf9967a14f34fb5a8292cfd6c7b4"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.Reset (cyclomatic 46): Runtime.Reset 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":"libpod/reset.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"c181f0c1fcfc2b39842fb80c57a122e7a7d37fbfa8d2b4cce4f3c8b47fd6e32e"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.ImagesPull (cyclomatic 44): libpod.ImagesPull has cyclomatic complexity 44 (threshold 15). Of this number, 35 points are the body\u0027s own statements and 9 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":"pkg/api/handlers/libpod/images_pull.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1667b8949ba73362f6ccaeb44ca2ae70878ffbb2d7ad2c860c0b4ef9effb3836"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.restore (cyclomatic 43): containers.restore has cyclomatic complexity 43 (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/podman/containers/restore.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0982c13c4c7dac8d9e7d31a7652af071a3fb5d1bef06f5037b88d81cf4f7500a"}},{"ruleId":"D1","level":"warning","message":{"text":"filters.GeneratePodFilterFunc (cyclomatic 43): filters.GeneratePodFilterFunc has cyclomatic complexity 43 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 24 belong to 7 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":"pkg/domain/filters/pods.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"78c4fb713226c24678cd25b4ebddf8808f48418cc4db43d31fc2edf1adfe6543"}},{"ruleId":"D1","level":"warning","message":{"text":"infra.getRuntime (cyclomatic 43): infra.getRuntime has cyclomatic complexity 43 (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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a6291a87d9fb5bc48d3d8348ec4b9adfd7fdb8c271aada6aaa46b581fcbc16"}},{"ruleId":"D1","level":"warning","message":{"text":"shim.startLocked (cyclomatic 43): shim.startLocked has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body\u0027s own statements and 3 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":"pkg/machine/shim/host.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f94c056d9d3546da88b1045e5704a69711701acc48515f86cb976016de9477"}},{"ruleId":"D1","level":"warning","message":{"text":"SpecGenerator.Validate (cyclomatic 43): SpecGenerator.Validate has cyclomatic complexity 43 (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":"pkg/specgen/container_validate.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4b8db7860dcfbeecce51ed38daa643721fb8bd254a462e1c62c22333271425"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.executeContainerTemplate (cyclomatic 43): generate.executeContainerTemplate 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/systemd/generate/containers.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab0fb4c8d07da093d9370bfa5acd7c74c3ce4bb99946bee3c1512ebfcb62f0a7"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.cUnescapeOne (cyclomatic 43): parser.cUnescapeOne 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/systemd/parser/split.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"5680f6e844fd76394a04c4b4dcba7e82b23e8215b65046771777bc159cb6ba03"}},{"ruleId":"D1","level":"warning","message":{"text":"main.persistentPreRunE (cyclomatic 42): main.persistentPreRunE has cyclomatic complexity 42 (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/podman/root.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"7401cbaf226287dd1ae3cad1de02fbb3c6ad57782b2a77524b1efefc2157e1ad"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.run (cyclomatic 42): containers.run has cyclomatic complexity 42 (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/podman/containers/run.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d4a3530f3091435c8441eeef9fd681edf5b92177c14f3730620cf426d6a5e6"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.containerToV1Container (cyclomatic 42): libpod.containerToV1Container has cyclomatic complexity 42 (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":"libpod/kube.go"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a617623152e9a6fc673ebfd5282fb8be6a291008b2eeb1f7f51f579df9e0304"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.GenerateKube (cyclomatic 42): ContainerEngine.GenerateKube has cyclomatic complexity 42 (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/domain/infra/abi/generate.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"85eb0deaf9e13fe6f3201c5f4a4931906bba49b35bc8b6924f9a3450e1f04e4b"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.generatePasswdAndGroup (cyclomatic 41): Container.generatePasswdAndGroup has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal_common.go"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd9980208c029f6d8f9793292f3599a33fa6f902ef7c002a65a027f061f7baaa"}},{"ruleId":"D1","level":"warning","message":{"text":"checkpoint.CRImportCheckpoint (cyclomatic 41): checkpoint.CRImportCheckpoint has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/checkpoint/checkpoint_restore.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7d03d502d3265928613271cf388c78526796d78d2a8a5bcc405260829f2806"}},{"ruleId":"D1","level":"warning","message":{"text":"common.ParseBuildOpts (cyclomatic 40): common.ParseBuildOpts has cyclomatic complexity 40 (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/podman/common/build.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2500a85ba261355ba1b6aa0454144b55e79be142045cf0a34f0d830f362da6"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.GetLimits (cyclomatic 40): libpod.GetLimits has cyclomatic complexity 40 (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":"libpod/oci_conmon_linux.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4843684aab834ca0541cedaf9645bddfb9e9d6eb9dfe07f2f54ff425ed50aaf"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.HTTPAttach (cyclomatic 40): ConmonOCIRuntime.HTTPAttach has cyclomatic complexity 40 (threshold 15). Of this number, 26 points are the body\u0027s own statements and 14 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":"libpod/oci_conmon_common.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"360df6a17e2d42d106b19796d0ab3d77b5ad316da455bc9e4205256f5cd24baa"}},{"ruleId":"D1","level":"warning","message":{"text":"shim.Init (cyclomatic 40): shim.Init has cyclomatic complexity 40 (threshold 15). Of this number, 36 points are the body\u0027s own statements and 4 belong to 3 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":"pkg/machine/shim/host.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ba1b9ad0634e62bf3f63cd5a9e66be6beeb911087dc013722e0e8b50d86fff"}},{"ruleId":"D1","level":"warning","message":{"text":"specgen.GenVolumeMounts (cyclomatic 40): specgen.GenVolumeMounts has cyclomatic complexity 40 (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/specgen/volumes.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"df72fdc65396e3161e1123df96a4bc85a3b686a2a15bdc02d9882e5e8f7c62c9"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.ParsePortMapping (cyclomatic 40): generate.ParsePortMapping has cyclomatic complexity 40 (threshold 15). 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, 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/specgen/generate/ports.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"9238000030e5e5df60ae2b5b4f8bccc54424132f6938312068a69bd57c4e5549"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.LibpodToContainerJSON (cyclomatic 38): compat.LibpodToContainerJSON 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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"11779e531c9553f1846bc248472e4f0b619f6cbc957a4bbdb495d3fbc304a410"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.PlayKubeDown (cyclomatic 38): ContainerEngine.PlayKubeDown 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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e192091a25f294cdf0b7a5cde670fff62f068ed217d48d62f95ad31ad2b166"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.ExecuteTransfer (cyclomatic 38): utils.ExecuteTransfer 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":"pkg/domain/utils/scp.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d0d558b457fca1b1b34b2588a7b2451ebfad7f64586fb764133ccaa8934a8b"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.play (cyclomatic 37): kube.play has cyclomatic complexity 37 (threshold 15). Of this number, 35 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":"cmd/podman/kube/play.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"6609470dbb253f9926d654c782ffb874f7561385dfcead784a8ab08b71b3b5b2"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.runHealthCheck (cyclomatic 36): Container.runHealthCheck has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/healthcheck.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f9953a3a3519ba38459e16b442f6280aab6ed69ff3ef5c9921826364bd1ac6"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.LibpodToContainer (cyclomatic 36): compat.LibpodToContainer has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"d631f56076cb94b4ac86ef39f0c75515185f30a9c4dfda46819786292da42d1f"}},{"ruleId":"D1","level":"warning","message":{"text":"inspector.inspect (cyclomatic 35): inspector.inspect 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":"cmd/podman/inspect/inspect.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"276c272d2e93055af564c946d865e522f4017a67b5c63de24d84c37a00d72306"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.simplePodWithV1Containers (cyclomatic 35): libpod.simplePodWithV1Containers 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":"libpod/kube.go"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"9805088ca94a0ef39bf5c970977b11d7dc8377696a47915fff921a8e83d39f7c"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.ExecStartAndAttach (cyclomatic 35): containers.ExecStartAndAttach has cyclomatic complexity 35 (threshold 15). Of this number, 32 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":"pkg/bindings/containers/attach.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c699e153399371b52b102caf0e6f41eebdc2bbec841c1a1ac2252927327e68"}},{"ruleId":"D1","level":"warning","message":{"text":"images.nTar (cyclomatic 35): images.nTar has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1126, 1275). 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/bindings/images/build.go"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab9fd189ca3cbc54aa5372e55e113d3921f8733158766751b08a4e313cce03b"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerRun (cyclomatic 35): ContainerEngine.ContainerRun has cyclomatic complexity 35 (threshold 15). Of this number, 34 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"f64ecb1c7c9aec2b6d8b89bbf82f3e00797a6dd3fc961cf70f986e7943669af1"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.WaitForConditionWithInterval (cyclomatic 34): Container.WaitForConditionWithInterval has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 786, 771). 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":"libpod/container_api.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"eacb1130bdc80a51feb5334e9fd97895112079102748b612015fa21487f342f4"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.update (cyclomatic 34): Container.update 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":"libpod/container_internal.go"},"region":{"startLine":2785}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a09c1f1e235e0f23787c417cd45391bf36331e5da60d699e0024863c43d7d1"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.PushImage (cyclomatic 34): compat.PushImage has cyclomatic complexity 34 (threshold 15). Of this number, 31 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":"pkg/api/handlers/compat/images_push.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e18699ee9b9025a354445b0b734068d19a2b20e695829e9388efa22e700b63"}},{"ruleId":"D1","level":"warning","message":{"text":"images.prepareRemoteRequestBody (cyclomatic 34): images.prepareRemoteRequestBody has cyclomatic complexity 34 (threshold 15). Of this number, 23 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":"pkg/bindings/images/build.go"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"734bd3551ae0e09b8fc80e77e60dfaf24aa19162fe7e348b3ebd3c5ccfdf6101"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.parseVolumes (cyclomatic 34): specgenutil.parseVolumes has cyclomatic complexity 34 (threshold 15). Of this number, 33 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":"pkg/specgenutil/volumes.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0ddaac5d3589e323381edb8ddf960b148c6cb8377bab00f6d738d27b804b844"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.mounts (cyclomatic 34): specgenutil.mounts has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 196). 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/specgenutil/volumes.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"53da20903fb2d43ad18f882dc996728d491ac480d022cfb837194e51dc7acaa8"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.Commit (cyclomatic 33): Container.Commit has cyclomatic complexity 33 (threshold 15). Of this number, 32 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":"libpod/container_commit.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6fec3a703a95b365ccdea0d83c6dbc0eddb2d4f2c5f642cc27d4b886cba8c4a"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.QuadletInstall (cyclomatic 33): ContainerEngine.QuadletInstall 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":"pkg/domain/infra/abi/quadlet.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90fe5132aa9e691681ac44d63dd93f38bdb5b7e1e390870859a3635821165f0"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.fixVolumePermissionsUnlocked (cyclomatic 32): Container.fixVolumePermissionsUnlocked 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":"libpod/container_internal_common.go"},"region":{"startLine":3029}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee00e3488e2183daeb4ef6a9d46088edf70ae7ce22d551f42fe687ccc6f4022"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.Refresh (cyclomatic 32): SQLiteState.Refresh has cyclomatic complexity 32 (threshold 15). Of this number, 30 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":"libpod/sqlite_state.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd74c5ef6e5e72cc2980f6fff6f36633425cbf11c346b6d409724b087f59fe4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.process (cyclomatic 31): main.process 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":"cmd/quadlet/main.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"246b37c5feb19f5ae0ffb4044373fb7998e6ba2e7d6f124f4ee59713999dab6d"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.addSharedNamespaces (cyclomatic 31): Container.addSharedNamespaces 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":"libpod/container_internal_linux.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8d5b22261ddfa2992fe08185e9271a1869c86fd38640e3259e35bd39262393d"}},{"ruleId":"D1","level":"warning","message":{"text":"manifests.Modify (cyclomatic 31): manifests.Modify has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 9 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/bindings/manifests/manifests.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c216f0bba964b0bf5a493076fae3daaafe461b774338417c1040a1f98599089"}},{"ruleId":"D1","level":"warning","message":{"text":"abi.getContainers (cyclomatic 31): abi.getContainers 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"4386bd9c71060f2461f3bb99435d4eef5f15108933a4d39812f7370945e0a417"}},{"ruleId":"D1","level":"warning","message":{"text":"specgen.ParseNetworkFlag (cyclomatic 31): specgen.ParseNetworkFlag 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":"pkg/specgen/namespaces.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f23275fa17e36e8171f01261ae8ae8639b121910a8c01647665c5d65f635e6"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.MapSpec (cyclomatic 31): generate.MapSpec has cyclomatic complexity 31 (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":"pkg/specgen/generate/pod_create.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"c08c5a49d40d9cf929771ef5c8052722f24444506c591a177561dd500986cde9"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.GetResources (cyclomatic 31): specgenutil.GetResources has cyclomatic complexity 31 (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":"pkg/specgenutil/specgen.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"097973470a2c6196b472ecc7b58ab272753c4bc0e8e45e4566fadf84358bb4bc"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.copyFromArchive (cyclomatic 30): Container.copyFromArchive has cyclomatic complexity 30 (threshold 15). Of this number, 15 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":"libpod/container_copy_common.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fb5d06c1f65068455dc7bbd9458328be239b130796e0af27d748b54244c7bb4"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.checkpoint (cyclomatic 30): Container.checkpoint has cyclomatic complexity 30 (threshold 15). Of this number, 27 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":"libpod/container_internal_common.go"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f42b7c46fc6c716027c3cc30edc0e0869e0f25c0a335b7d2d547ab1d300d710"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.NetworkConnect (cyclomatic 30): Container.NetworkConnect 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, 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":"libpod/networking_common.go"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"888fcd1af60c49819ea3228066344d3e1b63f2a7ec815f103a3e4104990d255a"}},{"ruleId":"D1","level":"warning","message":{"text":"Pod.podWithContainers (cyclomatic 30): Pod.podWithContainers 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":"libpod/kube.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"4983bb115f1759da724b9117ee4968b74613241f834ecffede5dd112edb6e5ef"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.removeVolume (cyclomatic 30): Runtime.removeVolume 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":"libpod/runtime_volume_common.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e864aa77b2c81cf78336d70c2d58e3c027543adde53e8b68ed02abf12a7b316"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.ValidateDBConfig (cyclomatic 30): SQLiteState.ValidateDBConfig has cyclomatic complexity 30 (threshold 15). Of this number, 22 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":"libpod/sqlite_state.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"edbec7d23bc8aecc8ad1138fb341ea657b14283582041d04506de78854757c4f"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.port (cyclomatic 29): containers.port 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":"cmd/podman/containers/port.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b5372558a91b6a216c9c61f97456d47f92be603567cfc8b30d87fc84d92918"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.attachExecHTTP (cyclomatic 29): libpod.attachExecHTTP has cyclomatic complexity 29 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 7 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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cea9cb40ae52b1a2eff7466ea52e23ec76aa5b5398e8deb16f97fe57dc8b7d4"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.SystemCheck (cyclomatic 29): Runtime.SystemCheck has cyclomatic complexity 29 (threshold 15). Of this number, 26 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":"libpod/runtime.go"},"region":{"startLine":1352}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f0d9b14b9ce3e92542bd1f03a4eaed214b3d507c97c518cf5a7518b74880e1"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.LogsFromContainer (cyclomatic 29): compat.LogsFromContainer has cyclomatic complexity 29 (threshold 15). Of this number, 28 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":"pkg/api/handlers/compat/containers_logs.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f376614048c3edb1958a0731e0ce4db1ee8f6b97312191b960188c08b350ae1"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerMount (cyclomatic 29): ContainerEngine.ContainerMount 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b1ad671ad0e33a384fe4ef852609fa80f22966d067f62a27c89d96dadabe797"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.QuadletRemove (cyclomatic 29): ContainerEngine.QuadletRemove 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":"pkg/domain/infra/abi/quadlet.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"37086cf20d4d6e4d7320d83979238607fc537ba5ae67190f4c35421ae4e5db76"}},{"ruleId":"D1","level":"warning","message":{"text":"PodSpecGenerator.Validate (cyclomatic 29): PodSpecGenerator.Validate 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":"pkg/specgen/pod_validate.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"7382d92006dd34febfa5468bb909d86fcdb3ba8c01c54c1923a6a0cbede66113"}},{"ruleId":"D1","level":"warning","message":{"text":"connection.add (cyclomatic 28): connection.add has cyclomatic complexity 28 (threshold 15). Of this number, 23 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":"cmd/podman/system/connection/add.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8240ab9520e242282ed39f4a876ea896973c5c912de1a0b217b56fb40026ebb"}},{"ruleId":"D1","level":"warning","message":{"text":"main.parent (cyclomatic 28): main.parent has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 4 belong to 4 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":"cmd/rootlessport/main.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e0ece3e25655d9352e6d76bc64faa2ff12738f3ab2c68c06b71e81d7eb0dd36"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.setupStorage (cyclomatic 28): Container.setupStorage has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"806546634aac2cdda45a6b1e3f588368ed35ee3168f03c637242844a44229dcd"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.exportCheckpoint (cyclomatic 28): Container.exportCheckpoint has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal_common.go"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c40c7a96b3dd564ddd118fe43f930e90650183d0c14b13f6dcc46a19ce19188"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.evictContainer (cyclomatic 28): Runtime.evictContainer has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/runtime_ctr.go"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"e743e7580ac84dc4d2f69d74639cc6d180f0a311aa4e4c4df5fb744771ced2f5"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.removePod (cyclomatic 28): Runtime.removePod has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/runtime_pod_common.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfcc63d5849ebd894563968d5ecc9e9eb00ff2dae1720bb667c83e1cd9a38d84"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.UpdateContainer (cyclomatic 28): compat.UpdateContainer 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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"211b75360ef17b989309dda794d7d08756e0093d2d68f8d72795adf5669833bc"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.GetDefaultNamespaceMode (cyclomatic 28): generate.GetDefaultNamespaceMode has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/namespaces.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef2316714a0c64236e69cd2286580f9e5eb22142551d57d697baaa77cfba38e7"}},{"ruleId":"D1","level":"warning","message":{"text":"validate.CheckAllLatestAndIDFile (cyclomatic 27): validate.CheckAllLatestAndIDFile has cyclomatic complexity 27 (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/podman/validate/args.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85f37190aa7114442a26c88719d0c92e3ca2f69e27c0f12db061741f4deb434"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.execStartAndAttach (cyclomatic 27): Container.execStartAndAttach has cyclomatic complexity 27 (threshold 15). Of this number, 26 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":"libpod/container_exec.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb1462ec87c3af63b1e90e61b69242058406c0a9318c857517bf9116fcd5568"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.NetworkDisconnect (cyclomatic 27): Container.NetworkDisconnect has cyclomatic complexity 27 (threshold 15). Of this number, 26 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":"libpod/networking_common.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8f5da89d1872041595950a34b9de8cb1125cf7425244426e88299e3c7da9d3f"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.addContainer (cyclomatic 27): SQLiteState.addContainer has cyclomatic complexity 27 (threshold 15). Of this number, 25 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":"libpod/sqlite_state_internal.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ff50612f39eb25176ee761d570a6552bf53d3047553839847f54f65f950d29"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.CreateNetwork (cyclomatic 27): compat.CreateNetwork 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/api/handlers/compat/networks.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9a5636489b6508ba441d48064335c5539282a8c887ab7313fed77a74fb5a60"}},{"ruleId":"D1","level":"warning","message":{"text":"util.ParseIDMapping (cyclomatic 27): util.ParseIDMapping has cyclomatic complexity 27 (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":"pkg/util/utils.go"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d979eff0e1fc49ec509f69fe89275eb1407d3372739feccd53e2ccc5df9bcd"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.copyFromContainer (cyclomatic 26): containers.copyFromContainer has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 11 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":"cmd/podman/containers/cp.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"c423be8030ee654040aca071cd0f26e567aab9ba3e8ffabd968bfa77c6b37303"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.copyToContainer (cyclomatic 26): containers.copyToContainer has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 10 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/podman/containers/cp.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"988e8eef394a66fc7436f96f83137421f0de977b52fc0f022dd4c5e5ab220ac9"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.systemd (cyclomatic 26): generate.systemd 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/podman/generate/systemd.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e340c554505b933ddae159c61564a5784f71d293d3722ab81abe318f38c3ae"}},{"ruleId":"D1","level":"warning","message":{"text":"machine.initMachine (cyclomatic 26): machine.initMachine 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/podman/machine/init.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"748f368a4a3244f5388d69d234c72a7c9a29cda0e44c6cafb38a3f0c155bdc64"}},{"ruleId":"D1","level":"warning","message":{"text":"BoltState.GetNetworks (cyclomatic 26): BoltState.GetNetworks has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 253, 215). 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":"libpod/boltdb_state.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c6703fb01bbe9bfa845ab1d840e1f266b6af8f3e6c85706507bf7a3d532daec"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.ConvertV1PodToYAMLPod (cyclomatic 26): libpod.ConvertV1PodToYAMLPod has cyclomatic complexity 26 (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":"libpod/kube.go"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7c64e6ad67c8bb22420ae32e3329e629568522bee4f200473c7ff765b124bb"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.getContainerInspectData (cyclomatic 26): Container.getContainerInspectData 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":"libpod/container_inspect.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd399999add5efeaba9e4f968775bb5573808b3bc84bf91db3c1c4a0385a78df"}},{"ruleId":"D1","level":"warning","message":{"text":"infra.ParseIDMapping (cyclomatic 26): infra.ParseIDMapping 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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c69a8f2eb2599f04c4343eedb36a6e23814ec56709aec5a45b25b35679a9d48f"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.setNamespaces (cyclomatic 26): specgenutil.setNamespaces 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"849955542773f6b89a5dbdfa0c2da8c8c40abfb599342fac49a48e9fa27c755d"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.ps (cyclomatic 25): containers.ps 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":"cmd/podman/containers/ps.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"52624e05f3781d506846e93cabcb98823a67c0e70428b3e62f299da849dc68e7"}},{"ruleId":"D1","level":"warning","message":{"text":"images.imageSearch (cyclomatic 25): images.imageSearch 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":"cmd/podman/images/search.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"041351c552c53319a76642f6a77c4f6cb3c25fc6c35eb281a1ef2df61666e26e"}},{"ruleId":"D1","level":"warning","message":{"text":"system.restService (cyclomatic 25): system.restService has cyclomatic complexity 25 (threshold 15). Of this number, 24 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":"cmd/podman/system/service_abi.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"624eb9a5a51c156524761e12d2c0b7342beca49e3385d93c80c41d81608a8713"}},{"ruleId":"D1","level":"warning","message":{"text":"volumes.prune (cyclomatic 25): volumes.prune 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":"cmd/podman/volumes/prune.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"414cf472f49a536e6fbdd8058321532de115d56318a7dae14e04bec7af010f8e"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.createRootlessContainer (cyclomatic 25): ConmonOCIRuntime.createRootlessContainer has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 36). 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":"libpod/oci_conmon_linux.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ec01627a65c282d240fc899251c36f53dde1a5bf3185e400e349f73234895d"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.mergeDBConfig (cyclomatic 25): Runtime.mergeDBConfig 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":"libpod/runtime.go"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e9cac42efd39e3314f6d637934bed99e7bc691495e3f23c39db598364301e2c"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.handleBuildContexts (cyclomatic 25): compat.handleBuildContexts has cyclomatic complexity 25 (threshold 15). Of this number, 21 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/api/handlers/compat/images_build.go"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2eef90881f9eabfd095469bc24b3b8262b0e439ded9251c90400d30a46ce752"}},{"ruleId":"D1","level":"warning","message":{"text":"bindings.sshClient (cyclomatic 25): bindings.sshClient 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":"pkg/bindings/connection.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b70f995675fa827a01f7f7e4f6ffe16642064a58bedc2c76a7e47b829348218"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.SetupRootless (cyclomatic 25): ContainerEngine.SetupRootless 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":"pkg/domain/infra/abi/system_linux.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71e4ea485bc69a88e74977a31c7ad999bfb4ecc45caebf27b6a4093a5056d59"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.executePodTemplate (cyclomatic 25): generate.executePodTemplate 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":"pkg/systemd/generate/pods.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"20001ff0dec78efd9776815511582c9e7d5230c45aae6057cd70861f347e50d7"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.generateInspectContainerHostConfig (cyclomatic 24): Container.generateInspectContainerHostConfig 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":"libpod/container_inspect.go"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c58d95c8d9773b6109f8f168494aaa94a5b1ec313aa859ce250da97fafb942d"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.cleanup (cyclomatic 24): Container.cleanup 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":"libpod/container_internal.go"},"region":{"startLine":2171}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e97d41d8dfd75ab1e774450bdfe571617b1a32b43d4a1f3fa671403394c40e"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.getContainerNetworkInfo (cyclomatic 24): Container.getContainerNetworkInfo has cyclomatic complexity 24 (threshold 15). Of this number, 22 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":"libpod/networking_common.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"0422ab7c8b507000d58b20718aa2f07068bebde01667f548f7f211b0b8cf28e3"}},{"ruleId":"D1","level":"warning","message":{"text":"events.generateEventFilter (cyclomatic 24): events.generateEventFilter has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 76, 16, 33, \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":"libpod/events/filters.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2fdee954382e5f9ec8ff9cd0f980ee4258d1a9955cdf149e71eca254773d787"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.MakePod (cyclomatic 24): generate.MakePod has cyclomatic complexity 24 (threshold 15). 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, 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/specgen/generate/pod_create.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdee27767ce37ffefe5c74a640afe7ffff05465c92f1a61da2d924887745afde"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.setupSecurityContext (cyclomatic 24): kube.setupSecurityContext 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":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7e7b6fc44a5aa7014f600bed53dbdd673a276052d36c9ec9bfee83f86bb515"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.parseSecrets (cyclomatic 24): specgenutil.parseSecrets 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a89524db2e0e8e3b9b6066c46488a5449e85213fb50fb48199dc5a1dc1fa2cc"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.ConvertVolume (cyclomatic 24): quadlet.ConvertVolume 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"101702be914d08155f0913f66c6a4452a705556d424afae6e19b7664f2f61b1a"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.ConvertKube (cyclomatic 24): quadlet.ConvertKube 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"babc351daee43ec3a100873e2eca1f351d89d407541b684ba9e7c15acc3aa279"}},{"ruleId":"D1","level":"warning","message":{"text":"common.DefineCreateFlags (cyclomatic 23): common.DefineCreateFlags 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":"cmd/podman/common/create.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"57cafbb0add16c1a74517033cf3750d71f253c6f623678105b9d428e02e58b2a"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.checkpoint (cyclomatic 23): containers.checkpoint has cyclomatic complexity 23 (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/podman/containers/checkpoint.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff8faac2fec9a7c37129464166ca2c89b80e9b44bebe47fe4e4562123c3b1b79"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.create (cyclomatic 23): containers.create 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":"cmd/podman/containers/create.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a4b5a3368814786f797f9dd8d5f619959af71d8650ea0ef1d75b5147c7b28c"}},{"ruleId":"D1","level":"warning","message":{"text":"manifest.push (cyclomatic 23): manifest.push 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":"cmd/podman/manifest/push.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1c13e0c1d31791f22fd330647cd1f07397a0370c60a5c4d62e2613a4c43fa8"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.ExecHTTPStartAndAttach (cyclomatic 23): Container.ExecHTTPStartAndAttach has cyclomatic complexity 23 (threshold 15). Of this number, 22 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":"libpod/container_exec.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f908abaece3a34c2703769671aeb6bbd760c56b75007c571d73829a6d3a8336"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.prepareProcessExec (cyclomatic 23): Container.prepareProcessExec has cyclomatic complexity 23 (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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf22edb6a45f017e2eebad50287282b6a5d55dbc1ff3c893d7f2b1ce917b25d"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.startExec (cyclomatic 23): ConmonOCIRuntime.startExec has cyclomatic complexity 23 (threshold 15). Of this number, 21 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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"390a418743b8ff52648cfcdeda841a0af3f40421652a948034bee256861b42b5"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.Migrate (cyclomatic 23): Runtime.Migrate 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":"libpod/runtime_migrate.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e79bd77cb875afdf25712258af3c7b1b3a0312dc898a84bafcc8b8bfe56ac3"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.NewPod (cyclomatic 23): Runtime.NewPod has cyclomatic complexity 23 (threshold 15). Of this number, 21 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":"libpod/runtime_pod_common.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40aa01d6e9e140dbd048d87692a85ea1c8dfcc5aecb493168f76e60ca8da172"}},{"ruleId":"D1","level":"warning","message":{"text":"filters.GenerateVolumeFilters (cyclomatic 23): filters.GenerateVolumeFilters has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 10 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":"pkg/domain/filters/volumes.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6037f383dacde166408a2ade45d004ca31a8114990cacf76042ac70ad4cf15cb"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.SystemDf (cyclomatic 23): ContainerEngine.SystemDf 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":"pkg/domain/infra/abi/system.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"56964afd724da5bf37272fe1781b23f053789d5f8dfff94ad5cd43d8c2b4501e"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerRun (cyclomatic 23): ContainerEngine.ContainerRun has cyclomatic complexity 23 (threshold 15). Of this number, 20 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3cf82acfad14e43f67b7931b62ad8008dfc5d6f177c26e95158a82d0e69439c"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.getVolumesFrom (cyclomatic 23): generate.getVolumesFrom 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":"pkg/specgen/generate/storage.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a51ff6817f88ff8fbbc6d2ae4673a82a2fa7f2a8390eecf8625418dc79dc10c"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.ToPodOpt (cyclomatic 23): kube.ToPodOpt 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":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2d7ee3d7a2ac91eb44e2f9dac96c1fc76b406c03732da0b7e5b32328777271"}},{"ruleId":"D1","level":"warning","message":{"text":"kube.VolumeFromHostPath (cyclomatic 23): kube.VolumeFromHostPath 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":"pkg/specgen/generate/kube/volume.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b0ca1e56c8e590100212ddd8c86dc062653d47e7ae8a43f6d5a308c451c7e8"}},{"ruleId":"D1","level":"warning","message":{"text":"util.parseTriple (cyclomatic 23): util.parseTriple 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":"pkg/util/utils.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fcabbbe12cdef31c59c89ca486f64ecd8d5b9cf283e021382f8e5ee6640db39"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.exec (cyclomatic 22): containers.exec 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":"cmd/podman/containers/exec.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc6b34958d2ec3ccc5a72a2e52cd2ace7cd1d902110418d0073fd2c443f8d595"}},{"ruleId":"D1","level":"warning","message":{"text":"images.imagePull (cyclomatic 22): images.imagePull 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":"cmd/podman/images/pull.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdfbd26caa18f20f98e0e0651f3764695d345a1647f8b77f909cf85403b7d2d7"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.generateKubeSecurityContext (cyclomatic 22): libpod.generateKubeSecurityContext 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":"libpod/kube.go"},"region":{"startLine":1373}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4fc4a13ad4a0e1cec83e7b8c10e7b5bd0db199ab653e05355b20634130ae66a"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.mountNamedVolume (cyclomatic 22): Container.mountNamedVolume 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":"libpod/container_internal.go"},"region":{"startLine":1897}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ab7474a5f68344f430199688bd492b4e93949494f5c99381df7f09ad79a118"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.cleanupStorage (cyclomatic 22): Container.cleanupStorage has cyclomatic complexity 22 (threshold 15). Of this number, 19 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":"libpod/container_internal.go"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d50a00dce6a4a07372e580de41e714cf40c7dadac3172b6b81651968df51f8"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.Attach (cyclomatic 22): ConmonOCIRuntime.Attach 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":"libpod/oci_conmon_attach_common.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"2283de32c5b49e24c7e33d3ec5af62503adf0af87ea95aac0d09146787917880"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.migrateDB (cyclomatic 22): Runtime.migrateDB 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":"libpod/runtime_migrate.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"29133e6d59adf7bead7034a28af2381d49fc0f631ea0ddf95f61a4a370658f8a"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.RemovePodContainers (cyclomatic 22): SQLiteState.RemovePodContainers has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 2 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":"libpod/sqlite_state.go"},"region":{"startLine":1801}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff4281629db44fd1a040f266cc84bd218ab597f1cb32d7799d2c4fa5eab5ea9"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.CommitContainer (cyclomatic 22): libpod.CommitContainer has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 2 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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"8142b725f2af763b304d4e059431ea437e8537d0b39f2932b2106322c716b669"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.PushImage (cyclomatic 22): libpod.PushImage 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":"pkg/api/handlers/libpod/images_push.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a26ae9c442a59b4a411315b1ad4810196c5cf02fd2b705098392881008d4818"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.Sign (cyclomatic 22): ImageEngine.Sign 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 713). 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/domain/infra/abi/images.go"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7ce789a5b957e288cee0ea921c3ee674ca944f21811520ce5db68e390f3048"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerClone (cyclomatic 22): ContainerEngine.ContainerClone 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/domain/infra/abi/containers.go"},"region":{"startLine":1766}}}],"partialFingerprints":{"codehealthFindingId/v1":"a863411b4b46e91ebce431aec30bb33086e04f8451051d81ed3ca3afad684a7c"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.SystemPrune (cyclomatic 22): ContainerEngine.SystemPrune 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/domain/infra/abi/system.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"694d9d9705873753a3caa58c1451c5c923c2dab23d4b8cef1802d036affca966"}},{"ruleId":"D1","level":"warning","message":{"text":"listLocal.build (cyclomatic 22): listLocal.build has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 2 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":"pkg/farm/list_builder.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"086c800dd9c0ab2bf55e12b8ba792fec262832b1f3e3e7426c0ab72f93c3db35"}},{"ruleId":"D1","level":"warning","message":{"text":"ps.ListContainerBatch (cyclomatic 22): ps.ListContainerBatch has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 189). 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/ps/ps.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b8b3357ae90634f07a0599e4b0698099a1e6b7182aa75b057bd411cc416791"}},{"ruleId":"D1","level":"warning","message":{"text":"trust.AddPolicyEntries (cyclomatic 22): trust.AddPolicyEntries 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/trust/policy.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"a70f66b7a1d5c4f254c355b43a8010544b727375dfba07a1d364b296eab17714"}},{"ruleId":"D1","level":"warning","message":{"text":"network.networkCreate (cyclomatic 21): network.networkCreate 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":"cmd/podman/networks/create.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"272a6430774ae4b3627d7d3d3a35be678d06f6f4a65b5919241e0d0f274edbb7"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.startNode (cyclomatic 21): libpod.startNode 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":"libpod/container_graph.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e5fccffa80fea7224e2a3fae5990139bfd80039c5098c6bdc26af52b1d8b35"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.httpAttachNonTerminalCopy (cyclomatic 21): libpod.httpAttachNonTerminalCopy 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":"libpod/oci_conmon_common.go"},"region":{"startLine":1572}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce57d914243258a60439693552748619a94ebc6ea662273d598f286384c596a6"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.execLightweight (cyclomatic 21): Container.execLightweight has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 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":"libpod/container_exec.go"},"region":{"startLine":1149}}}],"partialFingerprints":{"codehealthFindingId/v1":"e561ca9faecfc1f6a633ce028bd0617f94fc74e0b1077fb97c337a3960353429"}},{"ruleId":"D1","level":"warning","message":{"text":"EventLogFile.Read (cyclomatic 21): EventLogFile.Read has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 151, 125, 137). 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":"libpod/events/logfile.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ad1c225dc345d4269430ec24ca6376484d0f0af829c5949c763cde20ff08690"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.sharedConmonArgs (cyclomatic 21): ConmonOCIRuntime.sharedConmonArgs has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_common.go"},"region":{"startLine":1299}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a2f5043080d8049c3efa7ab352d4193655d67a789681d9f3d2b2a349898afb5"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.TopContainer (cyclomatic 21): compat.TopContainer has cyclomatic complexity 21 (threshold 15). Of this number, 20 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":"pkg/api/handlers/compat/containers_top.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c986c67de959c85b997f3d424f1ac8344629fbf4971ee85c4cc9c164fc0a88"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.GetEvents (cyclomatic 21): compat.GetEvents 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/api/handlers/compat/events.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8b6baec856a8f7549381c675ce33fc92bfbec3144400a84fcbe5fc1a2f4cd5"}},{"ruleId":"D1","level":"warning","message":{"text":"images.build (cyclomatic 21): images.build has cyclomatic complexity 21 (threshold 15). 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: 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":"pkg/bindings/images/build.go"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"a118a211fcc749e6e3f31b439d73ea727de0b3379bd985a428f592af72243138"}},{"ruleId":"D1","level":"warning","message":{"text":"abi.getAllQuadlets (cyclomatic 21): abi.getAllQuadlets 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/domain/infra/abi/quadlet_utils.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"29aca98231f530557f37e1fbb02386c52c326aed694f47577c5afd50d8b24d32"}},{"ruleId":"D1","level":"warning","message":{"text":"parse.VolumeOptions (cyclomatic 21): parse.VolumeOptions 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/domain/infra/abi/parse/parse.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ec806a56dac708df345442f744ff5f679d734e7ba5cb6a26c4d6b28ef90a84"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.containerStopImpl (cyclomatic 21): ContainerEngine.containerStopImpl has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 323). 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/domain/infra/abi/containers.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d88f9ce241e8bc83bff1f4b465e9490a53e74307a90af7267b4cb44dd98a9d"}},{"ruleId":"D1","level":"warning","message":{"text":"emulation.parseBinfmtMisc (cyclomatic 21): emulation.parseBinfmtMisc 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/emulation/binfmtmisc_linux.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7389e6d780126ff53adadef59eca4f8e8b26d1c6803dde1aa21953ad318e9d8"}},{"ruleId":"D1","level":"warning","message":{"text":"ps.GetContainerLists (cyclomatic 21): ps.GetContainerLists 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/ps/ps.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"1117fa3d223fe4a89198643c2393cd7b39417e9e6a141bb81b05f16aeca00f8a"}},{"ruleId":"D1","level":"warning","message":{"text":"images.imagePush (cyclomatic 20): images.imagePush 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":"cmd/podman/images/push.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ba0c3c0eb1b7b3a9c5cf46eea3867b7e041b81652df58b429762f76e2ab2d5"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.prepare (cyclomatic 20): Container.prepare 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":"libpod/container_internal_linux.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b73e07d08ed3fa54716e37b3b094baed1ac04743b5f1b698a87a9a0b5d877d"}},{"ruleId":"D1","level":"warning","message":{"text":"Pod.Inspect (cyclomatic 20): Pod.Inspect 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":"libpod/pod_api.go"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d945c044a9da688ef6ee7f479f425d581124de947f5bad1bb14e8a5dfacfcc"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.RemoveStorageContainer (cyclomatic 20): Runtime.RemoveStorageContainer 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":"libpod/runtime_cstorage.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"03659c553d7bea3a66560307f073ad13f397200089e3e34ee984915ad4c6e6ce"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.platformMakePod (cyclomatic 20): Runtime.platformMakePod 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":"libpod/runtime_pod_linux.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"18fe85757e2a9582569ac3478ba590d437d24b0d580bf9134a7709935366d38a"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.ManifestCreate (cyclomatic 20): libpod.ManifestCreate 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":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"855246c64773c31f780803c6e78bf8fa73fbbbac6e7efb328849573600f9c040"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.ManifestPush (cyclomatic 20): libpod.ManifestPush 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, 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/api/handlers/libpod/manifests.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"843c5e2c7c1fc6c3f822d2ea8340b50aee2e1fff2a6610e1c82d1c8e35cacdd2"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.CompatPull (cyclomatic 20): utils.CompatPull has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 2 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":"pkg/api/handlers/utils/images.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1552b7ad4f5791681bb7d2c1459b8b46e76080066b0d65e8e5aeae80bc833b9"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.Mount (cyclomatic 20): ImageEngine.Mount 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/domain/infra/abi/images.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5ab17a4f88a9e5aca8e14909241b224c0dd5f958e4ba78b4dd4e0e078d3a7e"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.ManifestPush (cyclomatic 20): ImageEngine.ManifestPush 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":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b7c0037a89812752fb218665c312922630be6aa6620ed2cc4d3dee22be2164"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.NetworkRm (cyclomatic 20): ContainerEngine.NetworkRm 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/domain/infra/abi/network.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b50bbd0fdd315c83b5c22b1afcf27819969f4abd2114c024f3e76e4e2562f58"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.playKubePVC (cyclomatic 20): ContainerEngine.playKubePVC 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/domain/infra/abi/play.go"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"594c41cf6c9cb0d3db8ee623398f035a0d12cde17d1c29ef63eb7e9a775e41cd"}},{"ruleId":"D1","level":"warning","message":{"text":"Farm.Build (cyclomatic 20): Farm.Build has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body\u0027s own statements and 8 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":"pkg/farm/farm.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"3618af46a90f72e2c326aadf5e295d2dedee2dd52a44296d47e93193c8864c6f"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.DevicesFromPath (cyclomatic 20): generate.DevicesFromPath has cyclomatic complexity 20 (threshold 15). Of this number, 17 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":"pkg/specgen/generate/config_linux.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"927d1bc9ee153dc78b5a277c25e64907f6e2ff2b3dd66bae25ce385d2a490a6a"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.ConvertBuild (cyclomatic 20): quadlet.ConvertBuild 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1414}}}],"partialFingerprints":{"codehealthFindingId/v1":"5251c83a20a9f1c87920b68ebbcf478bc4f9c606c3fa4992b74d958de6133083"}},{"ruleId":"D1","level":"warning","message":{"text":"common.AutocompleteFormat (cyclomatic 19): common.AutocompleteFormat 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 1359). 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/podman/common/completion.go"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"eff2e998f79d2ecac2a0f68c18f59411408550b7e69a7aa69ab6b09d13ce6338"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.pullImage (cyclomatic 19): containers.pullImage 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":"cmd/podman/containers/create.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb293be09318142dbdbf005efc0eb45143115d2cbed7ec76137fa03213bee0df"}},{"ruleId":"D1","level":"warning","message":{"text":"manifest.add (cyclomatic 19): manifest.add 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":"cmd/podman/manifest/add.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4e769557c97e4a504a3e22d4529ce0cc4b6a7648111878c8f25fe49516e1b0"}},{"ruleId":"D1","level":"warning","message":{"text":"pods.pods (cyclomatic 19): pods.pods 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":"cmd/podman/pods/ps.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd9f14367106f72626aeeef492250065fe3dde8c857b8591ee7606611ca9613"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.NamespaceMode (cyclomatic 19): Container.NamespaceMode 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":"libpod/container.go"},"region":{"startLine":1507}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7eb30b35ac3eb2eaccf21ba0611a46b4c01ec6b910b3558de9a1481ff11ce4"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.WaitForExit (cyclomatic 19): Container.WaitForExit 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":"libpod/container_api.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"82aa9eedb558d678a6820080b98f0ec8ee19e5a3eb5320f0dd0f8f1a8444d86b"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.init (cyclomatic 19): Container.init 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":"libpod/container_internal.go"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0590b65217d745e6c9b732d36d4f8695ea70e3d819ece4feb3f66c8a14e6b5"}},{"ruleId":"D1","level":"warning","message":{"text":"Pod.stopWithTimeout (cyclomatic 19): Pod.stopWithTimeout 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":"libpod/pod_api.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0de4d59db891c4053f3e98dc94dc75b233aa8cdbacb73a2e81d7052f331242c"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.refresh (cyclomatic 19): Runtime.refresh 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":"libpod/runtime.go"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ceb76aa733695b234a9c22c52922ff0fdeae908853cb65937fb6ae408c204c"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.RenameVolume (cyclomatic 19): SQLiteState.RenameVolume has cyclomatic complexity 19 (threshold 15). Of this number, 17 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":"libpod/sqlite_state.go"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6de7d024fb37b7c5b6cd432869a58e31b925e468ccc460688c95e7af2af699c"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.ListContainers (cyclomatic 19): compat.ListContainers 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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d478886dd1385f05dadcaddae8988437b3627022ac44d01b4560602ad38d91c"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.StatsContainer (cyclomatic 19): compat.StatsContainer 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":"pkg/api/handlers/compat/containers_stats.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d08b87389d911958d515db3a1bb314186e9321c29116e2ca1f8cd8bba88ab9"}},{"ruleId":"D1","level":"warning","message":{"text":"artifacts.Extract (cyclomatic 19): artifacts.Extract 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":"pkg/bindings/artifacts/extract.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29c0f2c8e885250ae946ab09d083517e2dbbda204716a76301458172b562105"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.Push (cyclomatic 19): ImageEngine.Push 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":"pkg/domain/infra/abi/images.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45ce1983a6ee686c4535a8fd4894a44c76b76624a414c1cb4a2ae870b7be2bc"}},{"ruleId":"D1","level":"warning","message":{"text":"MachineConfig.Remove (cyclomatic 19): MachineConfig.Remove has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 187). 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/machine/vmconfigs/machine.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"2997f07ffc66e423cca4b0e87f087ca9827fdb2e3c582747f65fb8165070df6f"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.MakeHealthCheckFromCli (cyclomatic 19): specgenutil.MakeHealthCheckFromCli 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"be279bc2d82a8e1f798073274fa3c681bcc67a2472bc59e3f94b8465830e33c1"}},{"ruleId":"D1","level":"warning","message":{"text":"HyperVStubber.CreateVM (cyclomatic 19): HyperVStubber.CreateVM has cyclomatic complexity 19 (threshold 15). Of this number, 16 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":"pkg/machine/hyperv/stubber.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d233f1f6470d0825bd9aed8322c8c63c50082df5f5f43250d8f8101f89e30679"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.copyContainerToContainer (cyclomatic 18): containers.copyContainerToContainer has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 7 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":"cmd/podman/containers/cp.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce444c8e47270f33ebf9bcdd5a9e93c1b8bc45cec4b0fce70c004b327d751296"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.Attach (cyclomatic 18): Container.Attach has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body\u0027s own statements and 5 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":"libpod/container_api.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c30d1e0365afa05b40edd0c6dc0d28a96fb0e5f85f66200bf0c686a9764507f"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.handleRestartPolicy (cyclomatic 18): Container.handleRestartPolicy has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 2 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":"libpod/container_internal.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f40a86f5e1bc5bf0f4c4a153f7c584aebdbe26e1ede3f614e5004346b99df7"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.restartWithTimeout (cyclomatic 18): Container.restartWithTimeout has cyclomatic complexity 18 (threshold 15). Of this number, 16 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":"libpod/container_internal.go"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41e3f782d323123805f45518ba7f30cca6610cade41e3ad3421653ae6aac3e5"}},{"ruleId":"D1","level":"warning","message":{"text":"Event.ToHumanReadable (cyclomatic 18): Event.ToHumanReadable 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":"libpod/events/events.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"da16e60665cb25b190b73b99bff49ad3ea6ddc5d96def49640180dd9b6dbac5c"}},{"ruleId":"D1","level":"warning","message":{"text":"ConmonOCIRuntime.StopContainer (cyclomatic 18): ConmonOCIRuntime.StopContainer has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 7 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":"libpod/oci_conmon_common.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"a07e70112fb8787f5bfc08474936f60e7a10fc4b0c45ef17e9380630eca02cab"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.RemovePod (cyclomatic 18): SQLiteState.RemovePod has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 4 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":"libpod/sqlite_state.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2446be9693aab12a3ff63fcfd9a7d219193692dbd32a1f79b293225aa10ae16"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.networkModify (cyclomatic 18): SQLiteState.networkModify 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":"libpod/sqlite_state_internal.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4364b83a7ffbc9843fe81e4eeaae769ffce2b4b91d5fa9efc3542e79518bf6"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.CreateContainer (cyclomatic 18): compat.CreateContainer 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":"pkg/api/handlers/compat/containers_create.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"66700166c5612237556530e6b09e3da22654e582cc3e71352e7cccba907ed912"}},{"ruleId":"D1","level":"warning","message":{"text":"updater.updateUnit (cyclomatic 18): updater.updateUnit has cyclomatic complexity 18 (threshold 15). Of this number, 14 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/autoupdate/autoupdate.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62c365c8b5dcaebba8559e5298ffc05822e4af192b7f90294901e230a3e2c8b"}},{"ruleId":"D1","level":"warning","message":{"text":"images.Pull (cyclomatic 18): images.Pull 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":"pkg/bindings/images/pull.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cbfde661261ea60639580b0aeb6326b6c71c87ef66236f0728900640130a082"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.ManifestAnnotate (cyclomatic 18): ImageEngine.ManifestAnnotate 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/domain/infra/abi/manifest.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c25f7f802ffe884cb0b8ae11683aa20adc0185cd14898914523531883ee60d"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerStats (cyclomatic 18): ContainerEngine.ContainerStats has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1692, 1673). 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/domain/infra/abi/containers.go"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f9bee2798d759978d249fbc3eaf968a5a22a048daf5f3ced2f1e3372db10ac"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerRunlabel (cyclomatic 18): ContainerEngine.ContainerRunlabel 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/domain/infra/abi/containers_runlabel.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a9c65502c93a1ce99cffef136688728fd6a295af2072f75ada182437cf7612"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.PodClone (cyclomatic 18): ContainerEngine.PodClone 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/domain/infra/abi/pods.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf52c643cfdc9947a1a74f7d71c06b7e09dcadd5ad46289ff252a76a2057d7ba"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerRm (cyclomatic 18): ContainerEngine.ContainerRm 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/domain/infra/tunnel/containers.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea1cae7eae23e271ab82bab70fbd827308fa8ca6cbe8c186ae4c55d2b3094a8"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.PodConfigToSpec (cyclomatic 18): generate.PodConfigToSpec 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/specgen/generate/pod_create.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"9712958311c4c429b4c46f47740262ceb82c610ff3781bf7377aa09c77021a80"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.handleSetWorkingDirectory (cyclomatic 18): quadlet.handleSetWorkingDirectory 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/systemd/quadlet/quadlet.go"},"region":{"startLine":2020}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4a20a5da8b6057698b25a2c01d88e11dea9b09c58b7f3ecd2515904fa6f300"}},{"ruleId":"D1","level":"warning","message":{"text":"util.ParseDockerignore (cyclomatic 18): util.ParseDockerignore 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/util/utils.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5710b91799d08d2711967cfb57e6e11fdf5ce2e3e3334c507a561ba9e14d959"}},{"ruleId":"D1","level":"warning","message":{"text":"farm.build (cyclomatic 17): farm.build has cyclomatic complexity 17 (threshold 15). Of this number, 16 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":"cmd/podman/farm/build.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c9dbb30947daa37feeca33f44349abf079b115eea8dcee3ea05a88989149db0"}},{"ruleId":"D1","level":"warning","message":{"text":"farm.farmUpdate (cyclomatic 17): farm.farmUpdate has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). 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/podman/farm/update.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0725863a12c637e571834bfb0f5cdb1e7a2195e3db18544b3e7f0e81829d0373"}},{"ruleId":"D1","level":"warning","message":{"text":"system.printSystemCheckResults (cyclomatic 17): system.printSystemCheckResults 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":"cmd/podman/system/check.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"272b9042f11fca47356efe7b304bbc42f6e8477a191d0bad38849ed4b6369ea6"}},{"ruleId":"D1","level":"warning","message":{"text":"connection.inspect (cyclomatic 17): connection.inspect 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/podman/system/connection/list.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2202a84b2c1e2c6afbf5c2429d789b5140e1044f4eb2d8c425587f5fdc67d43"}},{"ruleId":"D1","level":"warning","message":{"text":"registry.StartWithOptions (cyclomatic 17): registry.StartWithOptions 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":"hack/podman-registry-go/registry.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"86535eff52ecb76181bf7f22f2f25cd878acc3de9e794478868d3525e971dc81"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.AddPod (cyclomatic 17): SQLiteState.AddPod 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, 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":"libpod/sqlite_state.go"},"region":{"startLine":1656}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba572bf8e98a8ce16a2c1c179a2dbd5fac3920965ee37e3bf7f567beb6bd5935"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.CreateVolume (cyclomatic 17): compat.CreateVolume 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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"026ac1ae7d0ccc0f9e3071c50a44763297786ebd474d0d67b98c47f0b8a34b44"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.KubePlay (cyclomatic 17): libpod.KubePlay has cyclomatic complexity 17 (threshold 15). Of this number, 16 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":"pkg/api/handlers/libpod/kube.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"633002fa8142539e4fe81ca8bd7ebeeb214c6ffea416d003c4a0991511230d21"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.InstallQuadlets (cyclomatic 17): libpod.InstallQuadlets has cyclomatic complexity 17 (threshold 15). Of this number, 16 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":"pkg/api/handlers/libpod/quadlets.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"385b35fd6129d28830aa75bc88cadb6b83c5bb90e541871133a8a2f455bf6921"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.Commit (cyclomatic 17): containers.Commit 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/bindings/containers/commit.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"1716693df96555d5986ec17afe5481af3c409f277e830ac351b9aefcd0746d7b"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.Logs (cyclomatic 17): containers.Logs 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/bindings/containers/logs.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"a561097a1e3cdf5e1b40aee6ab1a91cd31044c5fd342250e03c204d88d4316e1"}},{"ruleId":"D1","level":"warning","message":{"text":"images.Push (cyclomatic 17): images.Push 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":"pkg/bindings/images/push.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20dd08e13510b45e5cdd60aad6e1905728b2f1c0b4895afe9f09cf3251231dc"}},{"ruleId":"D1","level":"warning","message":{"text":"manifests.Push (cyclomatic 17): manifests.Push 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":"pkg/bindings/manifests/manifests.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ad389477c407fca55a0947496455b8ae04dbcffb983b24b1903f49edc69608"}},{"ruleId":"D1","level":"warning","message":{"text":"abi.getKubePods (cyclomatic 17): abi.getKubePods 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/domain/infra/abi/generate.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"5149bbed7c21efacda35d5b8a65e0d5bb9ef28871de29ad178c2511fd7fb9c08"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.List (cyclomatic 17): ImageEngine.List has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 34). 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/domain/infra/abi/images_list.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7024a071b044e053491e202f5beaf60c5497f3ece23f084246d6f2d2a57e2518"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageEngine.remoteManifestInspect (cyclomatic 17): ImageEngine.remoteManifestInspect has cyclomatic complexity 17 (threshold 15). Of this number, 16 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":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a150e31b32a80ea2e633bd3775491f9d30b82581307a39afcf42e833a7e1da"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerStart (cyclomatic 17): ContainerEngine.ContainerStart has cyclomatic complexity 17 (threshold 15). Of this number, 16 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3329843c380fc61184673af7efa5352539407b6b4dcf43def0e5a3d3dee53d4"}},{"ruleId":"D1","level":"warning","message":{"text":"tunnel.getContainersAndInputByContext (cyclomatic 17): tunnel.getContainersAndInputByContext 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/domain/infra/tunnel/helpers.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f176660256c5633a2bf5b0dd27cf0b6b5592d61ed85819e3bd80fbd41b858222"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerStart (cyclomatic 17): ContainerEngine.ContainerStart has cyclomatic complexity 17 (threshold 15). Of this number, 14 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"eedd460f6866be0786c2a7e879c722bfc6292d5f4067121c6e46559f5aad606f"}},{"ruleId":"D1","level":"warning","message":{"text":"emulation.registeredBinfmtMisc (cyclomatic 17): emulation.registeredBinfmtMisc has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 26). 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/emulation/binfmtmisc_linux.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"62744ce17555059a93f777f9467e28b2823cfa909a1a601d4b473a0b86c819cb"}},{"ruleId":"D1","level":"warning","message":{"text":"shim.Remove (cyclomatic 17): shim.Remove 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":"pkg/machine/shim/host.go"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7e5c7ef583882c2378d232ede89fb723e1b082b2831b2865ca6c210a78b372"}},{"ruleId":"D1","level":"warning","message":{"text":"specgen.SetupUserNS (cyclomatic 17): specgen.SetupUserNS 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/specgen/namespaces.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a2ead8ac362ed81b51755f2e5887bcae8e4fc3fcec81b5c9221d703c515545a"}},{"ruleId":"D1","level":"warning","message":{"text":"NotifyProxy.listen (cyclomatic 17): NotifyProxy.listen 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 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":"pkg/systemd/notifyproxy/notifyproxy.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be353784019ec880f7dda569db83fbe023f4d35e8e0a9ff36d971da679765a4"}},{"ruleId":"D1","level":"warning","message":{"text":"parser.escapeString (cyclomatic 17): parser.escapeString 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":"pkg/systemd/parser/split.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"e589166373cb961edbf447ae497c97b9b8b38f8b476ff4f763cafbff57528dda"}},{"ruleId":"D1","level":"warning","message":{"text":"quadlet.handleUserRemap (cyclomatic 17): quadlet.handleUserRemap 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/systemd/quadlet/quadlet.go"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4ce07b5a174d4633638e3a8dd3697e25b555af2d134db33c64e7c49098d00b"}},{"ruleId":"D1","level":"warning","message":{"text":"util.breakInsert (cyclomatic 17): util.breakInsert 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/util/utils.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4acae026f57f27461d09febe792e15aa9f77d84db82a2d73cd9a1ff2604218e"}},{"ruleId":"D1","level":"warning","message":{"text":"HyperVStubber.SetProviderAttrs (cyclomatic 17): HyperVStubber.SetProviderAttrs has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 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":"pkg/machine/hyperv/stubber.go"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"4385f76a9b539a2e9e6c057dbbc67fe6fda9ee3805db4d37a61e952b57b6533e"}},{"ruleId":"D1","level":"warning","message":{"text":"vsock.loadHVSockRegistryEntries (cyclomatic 17): vsock.loadHVSockRegistryEntries has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 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":"pkg/machine/hyperv/vsock/vsock.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd88076ea9f8eb1e24b084c6fca96c7e6d734898cb1cf0cce885ae03487e1d8"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.portsToString (cyclomatic 16): containers.portsToString has cyclomatic complexity 16 (threshold 15). Of this number, 15 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":"cmd/podman/containers/ps.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ecbceb20005d885fa4570609ce9c4adaaae80e712f26ee5ca1069ceec4580a"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.validateStart (cyclomatic 16): containers.validateStart has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/start.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b8fa6d5f5dd2c124bef3a96dcc094aa8ec877ecb54bd9f4248b4f05b1949c15"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.GetChangedHealthCheckConfiguration (cyclomatic 16): containers.GetChangedHealthCheckConfiguration has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/update.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e122f6d10d3a82bd16063f97429d3082a30df7a2cfe24081782f3d59a18f76"}},{"ruleId":"D1","level":"warning","message":{"text":"containers.update (cyclomatic 16): containers.update 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":"cmd/podman/containers/update.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc1e8a3782156d64e125b46579326acedf4f8db2007e8e6f74b8d18312dbf8ae"}},{"ruleId":"D1","level":"warning","message":{"text":"system.prune (cyclomatic 16): system.prune 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":"cmd/podman/system/prune.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ee352c3f5dc0cc9449d95af479f6fd919eea5b27b5b0aa8f78f399fb951d573"}},{"ruleId":"D1","level":"warning","message":{"text":"localapi.CheckIfImageBuildPathsOnRunningMachine (cyclomatic 16): localapi.CheckIfImageBuildPathsOnRunningMachine 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":"internal/localapi/utils.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"8604bbe2cc9440afbfbde9c2ab13c9e8fa061af1acc4f7a4a7a9a038733c3156"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.detectCycles (cyclomatic 16): libpod.detectCycles has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 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":"libpod/container_graph.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4941e2020a9122573c2eae212d587f40de24d866f289183a8bdafd1e3dc30e"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.stopInternal (cyclomatic 16): Container.stopInternal 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":"libpod/container_internal.go"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc6c956afc79ddfb4b0caee1ce76b67ad9597262563c3b42330ff26d0452559"}},{"ruleId":"D1","level":"warning","message":{"text":"Container.inspectJoinedNetworkNS (cyclomatic 16): Container.inspectJoinedNetworkNS 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 227). 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":"libpod/networking_linux.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac32d399d7b3b6e552c7bc4e14fa88628f7b88b827bfe531069fbf6def75b43"}},{"ruleId":"D1","level":"warning","message":{"text":"logs.getTailLog (cyclomatic 16): logs.getTailLog has cyclomatic complexity 16 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/logs/log.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c24ea8d2dac23cb8526b9f3765c2192da6110a672414d87637ef01555b0ab1"}},{"ruleId":"D1","level":"warning","message":{"text":"Pod.removePodCgroup (cyclomatic 16): Pod.removePodCgroup 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":"libpod/runtime_pod_linux.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f540054abf7125f1d476d72a3b645caf023441cc34cf00c1ff454a43a8f356b"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.configureNetNS (cyclomatic 16): Runtime.configureNetNS has cyclomatic complexity 16 (threshold 15). Of this number, 12 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":"libpod/networking_linux.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"54440bbe3e41d588a3ca256765e9b7ca23acce25bb04a98a51d69d3618e23e0a"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.RenumberLocks (cyclomatic 16): Runtime.RenumberLocks 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":"libpod/runtime_renumber.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3187489518c9b8a520d15fbd222e5a021756b16a51bdf73a3afdcf5a9e04e4"}},{"ruleId":"D1","level":"warning","message":{"text":"Runtime.UpdateVolumePlugins (cyclomatic 16): Runtime.UpdateVolumePlugins 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":"libpod/runtime_volume_common.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf7497d1d8023728b4e91650ec5b64bc9d002c3fe0f610b04bb2088fcceacee"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.AllContainers (cyclomatic 16): SQLiteState.AllContainers 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":"libpod/sqlite_state.go"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd30f41dc819e8685c1d7ad76e3d0c6c2883885b076d76c3dea215003a8d46e"}},{"ruleId":"D1","level":"warning","message":{"text":"SQLiteState.AddVolume (cyclomatic 16): SQLiteState.AddVolume has cyclomatic complexity 16 (threshold 15). 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: 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":"libpod/sqlite_state.go"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b6e90409bdbe226fda2c76007be59981e352ce74aa74ae0684c39b3dab0f15"}},{"ruleId":"D1","level":"warning","message":{"text":"Volume.mount (cyclomatic 16): Volume.mount has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/volume_internal_common.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"f21ddcce459fef515041f1a58c1367bbca13254bae6a3f374a0f0dd7a99de2b9"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.AttachContainer (cyclomatic 16): compat.AttachContainer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers_attach.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd460408dba2471582607936b7f3783a59aad37c3b00791eafd37517141832a8"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.processBuildContext (cyclomatic 16): compat.processBuildContext 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":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d9451473e47c887b8c53e99cb757157f3dd7bd4bba1e78f20096b93c9770a42"}},{"ruleId":"D1","level":"warning","message":{"text":"compat.SearchImages (cyclomatic 16): compat.SearchImages 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":"pkg/api/handlers/compat/images_search.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9eb7ef857e362fe17c8a5122aa7ade10f258d7b4a79c545508992956d9a13ce"}},{"ruleId":"D1","level":"warning","message":{"text":"libpod.PodTop (cyclomatic 16): libpod.PodTop 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":"pkg/api/handlers/libpod/pods.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4cac7b110cf223a0c55901c0ef05c7d049d952164a992fac0a1b08272e8a122"}},{"ruleId":"D1","level":"warning","message":{"text":"Connection.DoRequest (cyclomatic 16): Connection.DoRequest 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":"pkg/bindings/connection.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"5967b3b67d76b99d8a24e06778abc658cabf5d0ff7b37c5e5c9b0eab9762df30"}},{"ruleId":"D1","level":"warning","message":{"text":"util.ToParams (cyclomatic 16): util.ToParams 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":"pkg/bindings/internal/util/util.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"8530f43d36682899ec2b86195d7d8a16afd095cc6391f2f007bff2ab79ff5e9e"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.KubeApply (cyclomatic 16): ContainerEngine.KubeApply 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":"pkg/domain/infra/abi/apply.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dce8dc9fd35f5dbcae847f68ee25830aa5a98d715509d11392988b4a1376782"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerCleanup (cyclomatic 16): ContainerEngine.ContainerCleanup 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1383}}}],"partialFingerprints":{"codehealthFindingId/v1":"7264971eed2cfe4ccca27f160df6476cb28900dd306dabf4c747f3f9a4bdfff0"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerUnmount (cyclomatic 16): ContainerEngine.ContainerUnmount 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebf772737e43d06f5fa004c901fab535a630793d720b7529d95921c7b337534"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.installQuadlet (cyclomatic 16): ContainerEngine.installQuadlet has cyclomatic complexity 16 (threshold 15). 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, 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/domain/infra/abi/quadlet.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d56154c140cf71b6e6a7ba040367d8d488b33d3011f6474cdd4da1b2b0f1000"}},{"ruleId":"D1","level":"warning","message":{"text":"ContainerEngine.ContainerRestore (cyclomatic 16): ContainerEngine.ContainerRestore 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"7235434959976b1e0fb883c5402c018d0670b7ceafd209fff79c5a361052e41f"}},{"ruleId":"D1","level":"warning","message":{"text":"Farm.Schedule (cyclomatic 16): Farm.Schedule has cyclomatic complexity 16 (threshold 15). Of this number, 10 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":"pkg/farm/farm.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"10fc7d6f23c6ac0a277378d4f6511279bebc9e553d32417e3a3225e9cac3441b"}},{"ruleId":"D1","level":"warning","message":{"text":"QEMUStubber.StartVM (cyclomatic 16): QEMUStubber.StartVM has cyclomatic complexity 16 (threshold 15). 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: 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":"pkg/machine/qemu/stubber.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"db39011327f53745176735ad59127eac8e871750eab264f39eec6f267b4c7db1"}},{"ruleId":"D1","level":"warning","message":{"text":"shim.Reset (cyclomatic 16): shim.Reset 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":"pkg/machine/shim/host.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"05479818f54cfc427115b8466a3e45686b7abefde980e9734f455e0dc0c45f32"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.applyHealthCheckOverrides (cyclomatic 16): generate.applyHealthCheckOverrides 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":"pkg/specgen/generate/container.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"122ac3f3b0d0391caba7643277c18a7b3a6561636a8ede6c18cb3bcee5338407"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.createPodOptions (cyclomatic 16): generate.createPodOptions has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/pod_create.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff7a4e1bf2727bd54553ef2af1fad082ec89371d5958150b3fe61f8bc434426"}},{"ruleId":"D1","level":"warning","message":{"text":"specgenutil.getIOLimits (cyclomatic 16): specgenutil.getIOLimits 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ed8a2ec5e72a1da04166ef11c41f11bc9e364a77b516273b709f3408c7c6dd"}},{"ruleId":"D1","level":"warning","message":{"text":"generate.PodUnits (cyclomatic 16): generate.PodUnits 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":"pkg/systemd/generate/pods.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc95affed9dd50e48099c0ac738d3dcbb0a21caf63a49d90616b7e8ad7e2ff7"}},{"ruleId":"D1","level":"warning","message":{"text":"util.parseAutoTriple (cyclomatic 16): util.parseAutoTriple 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":"pkg/util/utils.go"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b363e911641293fe2674465c08952cb9615f18ee00e1eee24514666eb6957a"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.generateSpec (cognitive 288): Container.generateSpec has cognitive complexity 288 (threshold 15). Drivers by points: if/else 242, loops 30, boolean chains 11, match/switch 5 (nesting depth added 147). Of this number, 286 points are the body\u0027s own statements and 2 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":"libpod/container_internal_common.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"47500e0c8f30ae52da9708856bd82ef6d845d3c1af6497c542e4598e7ebf44cb"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.playKubePod (cognitive 231): ContainerEngine.playKubePod has cognitive complexity 231 (threshold 15). Drivers by points: if/else 186, loops 36, boolean chains 8, match/switch 1 (nesting depth added 102). Of this number, 228 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/domain/infra/abi/play.go"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a05acc16cf41181b2e2d3adb640e03bd9f102cee2d44273e7c0702c8a9994a"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.FillOutSpecGen (cognitive 231): specgenutil.FillOutSpecGen has cognitive complexity 231 (threshold 15). Drivers by points: if/else 177, boolean chains 41, loops 9, match/switch 4 (nesting depth added 46). 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb207df2058d4c10b5d8d98cc3cd90d8eef5053436bcf0cff10a5b8c13e67c5"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.setupContainer (cognitive 208): Runtime.setupContainer has cognitive complexity 208 (threshold 15). Drivers by points: if/else 167, loops 25, boolean chains 9, match/switch 7 (nesting depth added 113). Of this number, 202 points are the body\u0027s own statements and 6 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":"libpod/runtime_ctr.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea18985584d0dcdf2e5f9ace9742821b1f3c4c09b3478b1942780a1aafe8ea16"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.restore (cognitive 188): Container.restore has cognitive complexity 188 (threshold 15). Drivers by points: if/else 158, loops 18, boolean chains 12 (nesting depth added 88). Of this number, 181 points are the body\u0027s own statements and 7 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":"libpod/container_internal_common.go"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32f2b09435ef795cc68650253abd00cceece1171e2d50afc67128c5e01ac378"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.platformInspectContainerHostConfig (cognitive 185): Container.platformInspectContainerHostConfig has cognitive complexity 185 (threshold 15). Drivers by points: if/else 154, loops 22, match/switch 7, boolean chains 2 (nesting depth added 116). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_inspect_linux.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e9ceda7a242951762219f2b1d18b5e7ba8b9b6945d3356aaa4941c980018a2"}},{"ruleId":"D2","level":"warning","message":{"text":"filters.GenerateContainerFilterFuncs (cognitive 172): filters.GenerateContainerFilterFuncs has cognitive complexity 172 (threshold 15). Drivers by points: if/else 119, loops 39, boolean chains 13, match/switch 1 (nesting depth added 101). Of this number, 62 points are the body\u0027s own statements and 110 belong to 9 function literals inside it that branch. 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":"pkg/domain/filters/containers.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"c06b3b2c776da1c7917675f0051c28cf6fe01278f2f44222c4510d4a00d59b23"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.removeContainer (cognitive 145): Runtime.removeContainer has cognitive complexity 145 (threshold 15). Drivers by points: if/else 124, boolean chains 13, loops 8 (nesting depth added 67). Of this number, 141 points are the body\u0027s own statements and 4 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":"libpod/runtime_ctr.go"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"590e0c9057d72f4e9830578319fa7f25efc46c04d92cb15d56407f2449e9daaf"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.namespaceOptions (cognitive 145): generate.namespaceOptions has cognitive complexity 145 (threshold 15). Drivers by points: if/else 108, boolean chains 16, loops 15, match/switch 6 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into 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/specgen/generate/namespaces.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"5391fd32f78e14af3cb08da1789a07d5e3fa021ba9bf7ab1a388af17ec0e7919"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.cliOpts (cognitive 142): compat.cliOpts has cognitive complexity 142 (threshold 15). Drivers by points: if/else 107, loops 22, boolean chains 8, match/switch 5 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into 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/api/handlers/compat/containers_create.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"090d6dd05bd8f11862d65532e76cae96535df21383eb6b8cb0552a97ce0f13b9"}},{"ruleId":"D2","level":"warning","message":{"text":"images.prepareParams (cognitive 140): images.prepareParams has cognitive complexity 140 (threshold 15). Drivers by points: if/else 118, loops 16, match/switch 5, boolean chains 1 (nesting depth added 28). 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":"pkg/bindings/images/build.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7b48794721b141ad0f4d2747f3bf066f08d3e75eb3bf6aa4da010dae9dcafa"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.ToSpecGen (cognitive 140): kube.ToSpecGen has cognitive complexity 140 (threshold 15). Drivers by points: if/else 120, loops 9, boolean chains 7, match/switch 4 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into 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/specgen/generate/kube/kube.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7289a402f2bf80a63280a0278d883d8adf594426690fb91a6c168ddc144dfb7"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.extractFirstWord (cognitive 137): parser.extractFirstWord has cognitive complexity 137 (threshold 15). Drivers by points: if/else 82, jumps 17, match/switch 16, loops 14, boolean chains 8 (nesting depth added 81). Of this number, 136 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":"pkg/systemd/parser/split.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"7acc2b98b3f3c48f9ed7786eab3b419d73c1f9cecbe3367377cf993e0654e5a2"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.createContainerOptions (cognitive 134): generate.createContainerOptions has cognitive complexity 134 (threshold 15). Drivers by points: if/else 105, loops 16, boolean chains 12, match/switch 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/container_create.go"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c8cc8e0241d8257e3f8b5e7e05e94c77b503d9847b6c8e7c71c4c0a56840740"}},{"ruleId":"D2","level":"warning","message":{"text":"common.buildFlagsWrapperToOptions (cognitive 130): common.buildFlagsWrapperToOptions has cognitive complexity 130 (threshold 15). Drivers by points: if/else 110, loops 12, boolean chains 7, match/switch 1 (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":"cmd/podman/common/build.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1be728d42576d32969c53887cfea0c6b028dbbab7656df57ce1be71a4918d1e"}},{"ruleId":"D2","level":"warning","message":{"text":"common.NetFlagsToNetOptions (cognitive 130): common.NetFlagsToNetOptions has cognitive complexity 130 (threshold 15). Drivers by points: if/else 105, loops 18, boolean chains 7 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into 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/podman/common/netflags.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"580d31073dbe37b935f893d1988ed03c65fed16e8182e93aa0638b9307d88b7b"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.parseMountOptions (cognitive 127): specgenutil.parseMountOptions has cognitive complexity 127 (threshold 15). Drivers by points: if/else 113, match/switch 12, boolean chains 1, loops 1 (nesting depth added 82). To reduce it, split the body into named stages: move each independent step or branch into 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/specgenutil/volumes.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef9684d377ac9a9cf1a0b08346757aa97f828130d8164627233c020e88d13089"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.createBuildOptions (cognitive 126): compat.createBuildOptions has cognitive complexity 126 (threshold 15). Drivers by points: if/else 106, loops 11, match/switch 5, boolean chains 4 (nesting depth added 44). Of this number, 122 points are the body\u0027s own statements and 4 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":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37c4dab2db0cc0f8a7ac8124acd30d7f4e76627d702ea845079cabc6adc804e"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.makeBindMounts (cognitive 125): Container.makeBindMounts has cognitive complexity 125 (threshold 15). Drivers by points: if/else 106, boolean chains 9, loops 5, match/switch 3, jumps 2 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal_common.go"},"region":{"startLine":2001}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e1c5fdf2d18b8f624c55d9aa7138895f150aa8b0aec671adadf4622cc2b024"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.PlayKube (cognitive 123): ContainerEngine.PlayKube has cognitive complexity 123 (threshold 15). Drivers by points: if/else 106, loops 10, match/switch 4, boolean chains 3 (nesting depth added 70). Of this number, 105 points are the body\u0027s own statements and 18 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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bfd25e8f7d649da2da8e426635deca62df4ecfe69e0c6d7af76501a6af6fb4f"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.MakeContainer (cognitive 123): generate.MakeContainer has cognitive complexity 123 (threshold 15). Drivers by points: if/else 107, boolean chains 8, match/switch 6, loops 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into 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/specgen/generate/container_create.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a093671e4f908009eab9fd39892dee994e6eb70c10499e7e6be063a6337c18aa"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.makeRuntime (cognitive 117): libpod.makeRuntime has cognitive complexity 117 (threshold 15). Drivers by points: if/else 110, boolean chains 6, loops 1 (nesting depth added 47). Of this number, 101 points are the body\u0027s own statements and 16 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":"libpod/runtime.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9604337e3d34ba6981b083e0828f007c4e672d1e4a06fcd6e58e910ce4fee0"}},{"ruleId":"D2","level":"warning","message":{"text":"filters.GenerateExternalContainerFilterFuncs (cognitive 115): filters.GenerateExternalContainerFilterFuncs has cognitive complexity 115 (threshold 15). Drivers by points: if/else 81, loops 28, boolean chains 5, match/switch 1 (nesting depth added 69). Of this number, 65 points are the body\u0027s own statements and 50 belong to 7 function literals inside it that branch. 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":"pkg/domain/filters/containers.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f6fd11f07122b635b260abef6cf962f99c4be6c3dcf68b403a538fc6ee1874"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.ParsePortMapping (cognitive 108): generate.ParsePortMapping has cognitive complexity 108 (threshold 15). Drivers by points: if/else 86, loops 20, boolean chains 2 (nesting depth added 67). Of this number, 99 points are the body\u0027s own statements and 9 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/specgen/generate/ports.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ff8436edff1ac39f0c73350d192c2bbe7b1affbf50e39de943fab147a8713b"}},{"ruleId":"D2","level":"warning","message":{"text":"util.processOptionsInternal (cognitive 105): util.processOptionsInternal has cognitive complexity 105 (threshold 15). Drivers by points: if/else 97, boolean chains 5, match/switch 2, loops 1 (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":"pkg/util/mount_opts.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1748399e722cfc44217609de27a632f70122733a7d3667b506ff88dfd0c50f"}},{"ruleId":"D2","level":"warning","message":{"text":"specgen.GenVolumeMounts (cognitive 102): specgen.GenVolumeMounts has cognitive complexity 102 (threshold 15). Drivers by points: if/else 88, boolean chains 10, loops 4 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into 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/specgen/volumes.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27e5aafa4d1051ec489294da147922598f52ff55ffbb323f384207dbb78b501"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.CompleteSpec (cognitive 97): generate.CompleteSpec has cognitive complexity 97 (threshold 15). Drivers by points: if/else 80, loops 10, boolean chains 7 (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/specgen/generate/container.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd63dc7f797ce155c2c9c8ad80a501610016db125f3dc9cb57541c9befb9102"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.validate (cognitive 92): Container.validate has cognitive complexity 92 (threshold 15). Drivers by points: if/else 63, boolean chains 21, loops 8 (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":"libpod/container_validate.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f871fab1107dd7dc668c0da8f41a516984e22fec1cd8b04bc1ed14296ca4f0b"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.Attach (cognitive 92): containers.Attach has cognitive complexity 92 (threshold 15). Drivers by points: if/else 77, match/switch 6, boolean chains 5, loops 4 (nesting depth added 47). Of this number, 85 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":"pkg/bindings/containers/attach.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"f885d8e2def3b88d51d2f54dd7472d8c70fe74d2c79798b3c4a098d88a3201f6"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.securityConfigureGenerator (cognitive 92): generate.securityConfigureGenerator has cognitive complexity 92 (threshold 15). Drivers by points: if/else 59, boolean chains 18, loops 15 (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":"pkg/specgen/generate/security_linux.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"965a9e2abfc29b9fbd8d2daebe179fd834750fe867662f10e9e2dd29d86143e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.newVolume (cognitive 91): Runtime.newVolume has cognitive complexity 91 (threshold 15). Drivers by points: if/else 74, match/switch 8, loops 5, boolean chains 4 (nesting depth added 44). Of this number, 83 points are the body\u0027s own statements and 8 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":"libpod/runtime_volume_common.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"24878d07d8f6c51fa9b1522acacff786c23168fc11d80f0140e8bf4e40bed9f8"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.mountStorage (cognitive 90): Container.mountStorage has cognitive complexity 90 (threshold 15). Drivers by points: if/else 84, boolean chains 5, loops 1 (nesting depth added 40). Of this number, 69 points are the body\u0027s own statements and 21 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":"libpod/container_internal.go"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a647f30936e7f7fb236db853175b754a27e63efbd002e127755dfb19560b4c2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.persistentPreRunE (cognitive 88): main.persistentPreRunE has cognitive complexity 88 (threshold 15). Drivers by points: if/else 82, boolean chains 3, match/switch 3 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into 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/podman/root.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"84859978063104d59097290bdddcaa5af2ae588cc85231e8206045dc21558bdb"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.simplePodWithV1Containers (cognitive 86): libpod.simplePodWithV1Containers has cognitive complexity 86 (threshold 15). Drivers by points: if/else 66, loops 16, boolean chains 4 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/kube.go"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19ac3d31f0980c20dbb7dde37add10a1c67b740c7830381907761a14112ad19"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.ManifestModify (cognitive 86): libpod.ManifestModify has cognitive complexity 86 (threshold 15). Drivers by points: if/else 76, loops 6, boolean chains 2, match/switch 2 (nesting depth added 41). Of this number, 58 points are the body\u0027s own statements and 28 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/api/handlers/libpod/manifests.go"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"19072395c9941b2ab411bca8281e9519d2af9041b56643b74f05dff6e3e29fa4"}},{"ruleId":"D2","level":"warning","message":{"text":"images.nTar (cognitive 83): images.nTar has cognitive complexity 83 (threshold 15). Drivers by points: if/else 79, match/switch 2, boolean chains 1, loops 1 (nesting depth added 50). Most of this is not in the body itself: 2 of the 83 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1126, 1275). 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/bindings/images/build.go"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd0ba577a57bbd620731e2cf74d34fd90dc0f5c9fa3b327d40c01cb475e7744"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.mounts (cognitive 82): specgenutil.mounts has cognitive complexity 82 (threshold 15). Drivers by points: if/else 76, loops 4, match/switch 2 (nesting depth added 55). Most of this is not in the body itself: 2 of the 82 points are its own statements and the rest belongs to one function literal inside it that branches (line 196). 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/specgenutil/volumes.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2f975801173891f6abb676f30f6d6023640c4725e3bf6bf58225db7ff8b226"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.executeContainerTemplate (cognitive 82): generate.executeContainerTemplate has cognitive complexity 82 (threshold 15). Drivers by points: if/else 71, loops 9, boolean chains 2 (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":"pkg/systemd/generate/containers.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"feff8ee8f76601074dc83ea9df99708f31dc91228cf10b0afb14bf3499c5a206"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.Reset (cognitive 81): Runtime.Reset has cognitive complexity 81 (threshold 15). Drivers by points: if/else 69, loops 10, 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":"libpod/reset.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51cb0aa9af65e6302609e11490061cb74c45148203f56478e23b70dad9a5ed8"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.SpecGenToOCI (cognitive 81): generate.SpecGenToOCI has cognitive complexity 81 (threshold 15). Drivers by points: if/else 54, boolean chains 17, loops 10 (nesting depth added 14). 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":"pkg/specgen/generate/oci_linux.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a22940962d8cec4011ae21b6bc019188ba8fef0867a0110f73c772600135a5"}},{"ruleId":"D2","level":"warning","message":{"text":"pods.create (cognitive 80): pods.create has cognitive complexity 80 (threshold 15). Drivers by points: if/else 71, boolean chains 4, loops 2, match/switch 2, jumps 1 (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":"cmd/podman/pods/create.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d2c5f1f65c68d43cf56ecc05f523e9121c0b1d2d0818f261de08d6920df6bf"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.WaitForConditionWithInterval (cognitive 79): Container.WaitForConditionWithInterval has cognitive complexity 79 (threshold 15). Drivers by points: if/else 62, match/switch 10, boolean chains 4, loops 3 (nesting depth added 49). Of this number, 18 points are the body\u0027s own statements and 61 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":"libpod/container_api.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fb8ddecb111955df087c24ec99001d01374b0bf23975103c01e267603b02d1a"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.GenerateKube (cognitive 79): ContainerEngine.GenerateKube has cognitive complexity 79 (threshold 15). Drivers by points: if/else 73, boolean chains 3, match/switch 2, loops 1 (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":"pkg/domain/infra/abi/generate.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03400fb6e4de8d40c0fb7770caa4d85175ca05c19c018b9e81789300f5fa7b3"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.createOCIContainer (cognitive 77): ConmonOCIRuntime.createOCIContainer has cognitive complexity 77 (threshold 15). Drivers by points: if/else 69, boolean chains 6, loops 2 (nesting depth added 21). Of this number, 75 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":"libpod/oci_conmon_common.go"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c3946f81c64791ee219b7ba86c02cacf06c688634a829ffed198e83ae98a6c"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.ConfigToSpec (cognitive 77): generate.ConfigToSpec has cognitive complexity 77 (threshold 15). Drivers by points: if/else 40, loops 24, match/switch 11, boolean chains 2 (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/specgen/generate/container.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0319b943254546d46af3d288de1a2b90f2526591045df8df8d3bd8c08d824a3"}},{"ruleId":"D2","level":"warning","message":{"text":"filters.GeneratePodFilterFunc (cognitive 75): filters.GeneratePodFilterFunc has cognitive complexity 75 (threshold 15). Drivers by points: if/else 51, loops 19, match/switch 4, boolean chains 1 (nesting depth added 44). Of this number, 20 points are the body\u0027s own statements and 55 belong to 7 function literals inside it that branch. 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":"pkg/domain/filters/pods.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7390be5a33e80aaa0506d680edb1ede7ce13b0b198fa0ce0777fed322da5cf"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRun (cognitive 75): ContainerEngine.ContainerRun has cognitive complexity 75 (threshold 15). Drivers by points: if/else 64, loops 6, boolean chains 5 (nesting depth added 40). Of this number, 74 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"a58b873bd98f40ab6f207d9cff94a13de72bd97a70f590a6c847175a41903d0f"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.GetLimits (cognitive 74): libpod.GetLimits has cognitive complexity 74 (threshold 15). Drivers by points: if/else 51, loops 20, match/switch 2, boolean chains 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_linux.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d5da82edc9832aa0acfff754539dcba81ae5168918342d98063376e198731a9"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.CreateInit (cognitive 73): containers.CreateInit has cognitive complexity 73 (threshold 15). Drivers by points: if/else 57, boolean chains 13, loops 3 (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":"cmd/podman/containers/create.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc06b3273bdf1a0f4bca7dee7bd9532b100e32dfc49c03e58fe1001b04b820c"}},{"ruleId":"D2","level":"warning","message":{"text":"checkpoint.CRImportCheckpoint (cognitive 73): checkpoint.CRImportCheckpoint has cognitive complexity 73 (threshold 15). Drivers by points: if/else 64, loops 7, 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":"pkg/checkpoint/checkpoint_restore.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa30a92083921ddfa9f5641da588c9ccfdec37f415553e3a101d31b9e2f06d8"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.podWithContainers (cognitive 72): Pod.podWithContainers has cognitive complexity 72 (threshold 15). Drivers by points: if/else 55, loops 11, boolean chains 6 (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":"libpod/kube.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"840933b62fbe434962f96af26ca0311346109a21d6001c965cd92aeac08c514d"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.finalizeMounts (cognitive 71): generate.finalizeMounts has cognitive complexity 71 (threshold 15). Drivers by points: if/else 53, loops 16, 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":"pkg/specgen/generate/storage.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9894c0cdee96ce662e0192ee23dd408ffa8559f1e790dff0eb3d51aff49bc144"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.ConvertContainer (cognitive 71): quadlet.ConvertContainer has cognitive complexity 71 (threshold 15). Drivers by points: if/else 46, boolean chains 13, loops 10, match/switch 2 (nesting depth added 9). 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b6a7b331443b26c09a4936a0855173362485d0dcc33a0d687c4654bb87de4c"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.generatePasswdAndGroup (cognitive 70): Container.generatePasswdAndGroup has cognitive complexity 70 (threshold 15). Drivers by points: if/else 58, boolean chains 8, match/switch 4 (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":"libpod/container_internal_common.go"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"43de12a173b7ef17e1885df20959bdabf5bc67982c208fa8c74494b823d38b95"}},{"ruleId":"D2","level":"warning","message":{"text":"common.ParseBuildOpts (cognitive 69): common.ParseBuildOpts has cognitive complexity 69 (threshold 15). Drivers by points: if/else 58, boolean chains 6, loops 3, match/switch 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":"cmd/podman/common/build.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"569401335e3a184b294c0923540b9029ef34d572f2b374b510e11723fe14a291"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.HTTPAttach (cognitive 69): ConmonOCIRuntime.HTTPAttach has cognitive complexity 69 (threshold 15). Drivers by points: if/else 59, match/switch 6, loops 3, boolean chains 1 (nesting depth added 34). Of this number, 33 points are the body\u0027s own statements and 36 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":"libpod/oci_conmon_common.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"a161a80f91ab925d543a9965d77382754df821ac077bbe44b47b13baf83b23f6"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.PushImage (cognitive 69): compat.PushImage has cognitive complexity 69 (threshold 15). Drivers by points: if/else 60, match/switch 5, jumps 3, loops 1 (nesting depth added 35). Of this number, 65 points are the body\u0027s own statements and 4 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":"pkg/api/handlers/compat/images_push.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"4072b4e1c3a177421e82c6464bf9d147fcc536113006bd4d0798727454a04524"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.copyFromArchive (cognitive 68): Container.copyFromArchive has cognitive complexity 68 (threshold 15). Drivers by points: if/else 58, loops 8, boolean chains 2 (nesting depth added 38). Of this number, 27 points are the body\u0027s own statements and 41 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":"libpod/container_copy_common.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"e05cc8e2f9511dbb87573b1c95f97e57e022dbb7c84f3ebf48afd29ac3d84567"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.ExecStartAndAttach (cognitive 68): containers.ExecStartAndAttach has cognitive complexity 68 (threshold 15). Drivers by points: if/else 61, match/switch 3, boolean chains 2, loops 2 (nesting depth added 37). Of this number, 63 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":"pkg/bindings/containers/attach.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e9cbc005a3f63007b5aecd22b5308a7bc4aff0c43d516eb4f47f1886e46a91"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.fixVolumePermissionsUnlocked (cognitive 67): Container.fixVolumePermissionsUnlocked has cognitive complexity 67 (threshold 15). Drivers by points: if/else 61, boolean chains 6 (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":"libpod/container_internal_common.go"},"region":{"startLine":3029}}}],"partialFingerprints":{"codehealthFindingId/v1":"857c27afeb81359ca90ad27856d8276335b6f091b6d2f7decefc2bbf917141da"}},{"ruleId":"D2","level":"warning","message":{"text":"images.prepareRemoteRequestBody (cognitive 65): images.prepareRemoteRequestBody has cognitive complexity 65 (threshold 15). Drivers by points: if/else 57, loops 6, match/switch 2 (nesting depth added 32). Of this number, 41 points are the body\u0027s own statements and 24 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/bindings/images/build.go"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"6396fc3e7052c53b6c1dbed50c3adcbc189ee9b9e2fbe40a1ea76511306e6585"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.specConfigureNamespaces (cognitive 64): generate.specConfigureNamespaces has cognitive complexity 64 (threshold 15). Drivers by points: if/else 52, match/switch 7, boolean chains 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":"pkg/specgen/generate/namespaces_linux.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"28007e1901e69a67e66707c1cdb01e311bcd0e7631628f5e87ff3525d64a3549"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.containerToV1Container (cognitive 63): libpod.containerToV1Container has cognitive complexity 63 (threshold 15). Drivers by points: if/else 50, boolean chains 9, loops 4 (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":"libpod/kube.go"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"23af538de556b4f74ebf38c2cf8dc488967f88fc780a9793a4754570ccb525de"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.QuadletRemove (cognitive 63): ContainerEngine.QuadletRemove has cognitive complexity 63 (threshold 15). Drivers by points: if/else 52, loops 10, boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into 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/domain/infra/abi/quadlet.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"2165b768f33cea0df08aaf8d3df0b85bead49c7cf9cda79e4c1a7f09bb327c7a"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.getContainers (cognitive 62): abi.getContainers has cognitive complexity 62 (threshold 15). Drivers by points: if/else 41, loops 16, boolean chains 4, match/switch 1 (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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d13e5406df63861b4373e7df1438e884010ea433353ceeb78038b430d71759"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.PlayKubeDown (cognitive 62): ContainerEngine.PlayKubeDown has cognitive complexity 62 (threshold 15). Drivers by points: if/else 48, loops 7, match/switch 6, boolean chains 1 (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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"e283cc28c75b30361a4d8c417a22466d814f8ebe53c67272572571bc44c3f415"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.ExecuteTransfer (cognitive 61): utils.ExecuteTransfer has cognitive complexity 61 (threshold 15). Drivers by points: if/else 54, match/switch 4, loops 2, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/utils/scp.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"b12a32602754b3638ffc7c4ea4d191b5366e1fbec7495a2f3faaa77033353bd7"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.getVolumesFrom (cognitive 61): generate.getVolumesFrom has cognitive complexity 61 (threshold 15). Drivers by points: if/else 45, loops 12, match/switch 4 (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":"pkg/specgen/generate/storage.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"615cf84a10ed9958e710127df0bb4021ede16210bf65c5927067f8353f89e168"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.ImagesPull (cognitive 60): libpod.ImagesPull has cognitive complexity 60 (threshold 15). Drivers by points: if/else 45, loops 8, boolean chains 4, match/switch 3 (nesting depth added 22). Of this number, 51 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":"pkg/api/handlers/libpod/images_pull.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"e151ae8db4f4db23e78c1c7a57eb6ce44aecf706f3736d460e99dafac3975834"}},{"ruleId":"D2","level":"warning","message":{"text":"bindings.sshClient (cognitive 60): bindings.sshClient has cognitive complexity 60 (threshold 15). Drivers by points: if/else 59, boolean chains 1 (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/bindings/connection.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5c2aabbe587767d2df36255da47c52b0e1c87247b5df46c96a9ab769560e4a"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.TopContainer (cognitive 59): compat.TopContainer has cognitive complexity 59 (threshold 15). Drivers by points: if/else 42, loops 9, jumps 4, boolean chains 2, match/switch 2 (nesting depth added 31). Of this number, 58 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":"pkg/api/handlers/compat/containers_top.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"7385c68eae69563e9c56cc5441035ac8c9ec9c3fdb64777e90a977bf66b88438"}},{"ruleId":"D2","level":"warning","message":{"text":"parse.VolumeOptions (cognitive 59): parse.VolumeOptions has cognitive complexity 59 (threshold 15). Drivers by points: if/else 49, match/switch 6, loops 4 (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":"pkg/domain/infra/abi/parse/parse.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"be77e0ccbad517d66624b17e828b68cd3ae2e9a560319b29bf1f340046e49230"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.LibpodToContainer (cognitive 58): compat.LibpodToContainer has cognitive complexity 58 (threshold 15). Drivers by points: if/else 48, match/switch 5, loops 4, boolean chains 1 (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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b82b92ad45c69f7fa60de5cdec11b51ffea09b7ad6a07e176b078a8cd7d033d"}},{"ruleId":"D2","level":"warning","message":{"text":"shim.startLocked (cognitive 58): shim.startLocked has cognitive complexity 58 (threshold 15). Drivers by points: if/else 55, boolean chains 3 (nesting depth added 15). Of this number, 55 points are the body\u0027s own statements and 3 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":"pkg/machine/shim/host.go"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb93b7d4e7f2e9c5b7da2239eaeb512a3344c38c81b9593a081e7e8c4404870"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.platformMakePod (cognitive 57): Runtime.platformMakePod has cognitive complexity 57 (threshold 15). Drivers by points: if/else 53, boolean chains 2, match/switch 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/runtime_pod_linux.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae28274d695a22eb5e55a5bcd68b6a210f5f2f09efc93b2406ff4699f1a0c50e"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.httpAttachNonTerminalCopy (cognitive 56): libpod.httpAttachNonTerminalCopy has cognitive complexity 56 (threshold 15). Drivers by points: if/else 52, match/switch 3, loops 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_common.go"},"region":{"startLine":1572}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38c75c287f9d5d176e2d6a21d4094ece2bb6cdefa0f7f95ec97af14ef4dfb39"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.removeVolume (cognitive 56): Runtime.removeVolume has cognitive complexity 56 (threshold 15). Drivers by points: if/else 51, boolean chains 3, loops 2 (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":"libpod/runtime_volume_common.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5608d88eaf8d7176ead575f2313fa8bd7411200cf0913ac7b84dee5106d3864"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.handleBuildContexts (cognitive 56): compat.handleBuildContexts has cognitive complexity 56 (threshold 15). Drivers by points: if/else 54, loops 2 (nesting depth added 31). Of this number, 44 points are the body\u0027s own statements and 12 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/api/handlers/compat/images_build.go"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"259f8c3adb2414ca0dfa90a7bd54ae44ef5df32ab7ccb23d2171f085cf0e724e"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.run (cognitive 54): containers.run has cognitive complexity 54 (threshold 15). Drivers by points: if/else 42, loops 6, 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":"cmd/podman/containers/run.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"f75ccf0eada6480c8bb74f02c682648cf505c52b3f88252d40725d34beda2dc5"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.Commit (cognitive 53): Container.Commit has cognitive complexity 53 (threshold 15). Drivers by points: if/else 39, loops 11, boolean chains 3 (nesting depth added 20). Of this number, 51 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":"libpod/container_commit.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"061a7fd49d5fee8c162e5c8bb4a7adb5e0218b64d0cfea14a99e7089e20e0201"}},{"ruleId":"D2","level":"warning","message":{"text":"BoltState.GetNetworks (cognitive 52): BoltState.GetNetworks has cognitive complexity 52 (threshold 15). Drivers by points: if/else 50, loops 2 (nesting depth added 25). Most of this is not in the body itself: 8 of the 52 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 253, 215). 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":"libpod/boltdb_state.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"1886ea92c8f9d87f05789a7de9606ddbb43b139418919d68a7dac0d75cabf4ba"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.createRootlessContainer (cognitive 51): ConmonOCIRuntime.createRootlessContainer has cognitive complexity 51 (threshold 15). Drivers by points: if/else 39, loops 10, boolean chains 2 (nesting depth added 26). Most of this is not in the body itself: 0 of the 51 points are its own statements and the rest belongs to one function literal inside it that branches (line 36). 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":"libpod/oci_conmon_linux.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"751861542016bab9eee693c53251c5e0854d8a35e1059b4e26f55e6af60223ac"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.parseVolumes (cognitive 51): specgenutil.parseVolumes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 36, loops 13, boolean chains 2 (nesting depth added 18). Of this number, 50 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":"pkg/specgenutil/volumes.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"d565d79b829ed946e1938732ffa87e9a2e3fa8f67db16cd3cd72fc7e3ce0c4cb"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.play (cognitive 50): kube.play has cognitive complexity 50 (threshold 15). Drivers by points: if/else 42, boolean chains 6, loops 2 (nesting depth added 14). Of this number, 47 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":"cmd/podman/kube/play.go"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc034466644d70c8c49c9dd0c9b2b334c6145a1aa237b0b3c78ac095b5c5e67"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.update (cognitive 50): Container.update has cognitive complexity 50 (threshold 15). Drivers by points: if/else 43, boolean chains 5, 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":"libpod/container_internal.go"},"region":{"startLine":2785}}}],"partialFingerprints":{"codehealthFindingId/v1":"984efc5c0fed1f412d55c8e96ffe5bdce620a7d7d339fe4146de215c44ecf956"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Sign (cognitive 50): ImageEngine.Sign has cognitive complexity 50 (threshold 15). Drivers by points: if/else 46, loops 4 (nesting depth added 28). Most of this is not in the body itself: 5 of the 50 points are its own statements and the rest belongs to one function literal inside it that branches (line 713). 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/domain/infra/abi/images.go"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4aa52d6f7ab8eb7d4beea0def6072b8d8a9746ca5acd3243731a22cdd33a13"}},{"ruleId":"D2","level":"warning","message":{"text":"inspector.inspect (cognitive 49): inspector.inspect has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30, loops 15, boolean chains 2, match/switch 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":"cmd/podman/inspect/inspect.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"723db62272bdf92f6e333b9d5b9c778776dec60170a1fdd02165f32def07cf6d"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.PodTop (cognitive 49): libpod.PodTop has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30, loops 14, jumps 3, match/switch 2 (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/api/handlers/libpod/pods.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dad454da5bae0c3518d8bbe6ab072a1751f497129cc483870c8512cdb6d4886"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.QuadletInstall (cognitive 49): ContainerEngine.QuadletInstall has cognitive complexity 49 (threshold 15). Drivers by points: if/else 37, loops 7, match/switch 3, 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":"pkg/domain/infra/abi/quadlet.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"603d4d44e39c617a19c34e16b223540a90bafe53240a80f1bbc4d32311313183"}},{"ruleId":"D2","level":"warning","message":{"text":"SpecGenerator.Validate (cognitive 49): SpecGenerator.Validate has cognitive complexity 49 (threshold 15). Drivers by points: if/else 33, boolean chains 16 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/container_validate.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f04a6c667d85c654d843ff94030b0bedd8dadbea4a216da1fd0970d862ece5"}},{"ruleId":"D2","level":"warning","message":{"text":"system.restService (cognitive 48): system.restService has cognitive complexity 48 (threshold 15). Drivers by points: if/else 44, match/switch 2, boolean chains 1, loops 1 (nesting depth added 23). Of this number, 47 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":"cmd/podman/system/service_abi.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"35261bcaa5af43c07b17bb6ff99b12e1d93363a8ef705d3b34e0545d72ec811b"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.cleanup (cognitive 48): Container.cleanup has cognitive complexity 48 (threshold 15). Drivers by points: if/else 45, boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal.go"},"region":{"startLine":2171}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb7ed654c170b1f7e34cb633bea169fb2f3bc64fd04e4cae1d7967951d1633d8"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.exportCheckpoint (cognitive 48): Container.exportCheckpoint has cognitive complexity 48 (threshold 15). Drivers by points: if/else 44, 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":"libpod/container_internal_common.go"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0f60a621d11122cbdf206a3f2c1198fa856d8914a4eb78770d60d8e72d8671"}},{"ruleId":"D2","level":"warning","message":{"text":"manifests.Modify (cognitive 48): manifests.Modify has cognitive complexity 48 (threshold 15). Drivers by points: if/else 41, loops 4, boolean chains 3 (nesting depth added 18). Of this number, 24 points are the body\u0027s own statements and 24 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/bindings/manifests/manifests.go"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19ac2eae30feeb9450ebca6845b4917e2a638d54bea051d5734c1cf5e884996"}},{"ruleId":"D2","level":"warning","message":{"text":"shim.Init (cognitive 48): shim.Init has cognitive complexity 48 (threshold 15). Drivers by points: if/else 46, loops 1, match/switch 1 (nesting depth added 11). Of this number, 44 points are the body\u0027s own statements and 4 belong to 3 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":"pkg/machine/shim/host.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"02536a0bf609421389e7019a2bf191a49fbd99f5b1d03eff13da306fe35a2d7e"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.parseSecrets (cognitive 48): specgenutil.parseSecrets has cognitive complexity 48 (threshold 15). Drivers by points: if/else 41, loops 3, match/switch 3, boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into 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/specgenutil/specgen.go"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc66ffbbc79b9e14ea17343652d06d50ec5126a14ea18d30efc8321afebf995b"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.addSharedNamespaces (cognitive 47): Container.addSharedNamespaces has cognitive complexity 47 (threshold 15). Drivers by points: if/else 39, loops 6, 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":"libpod/container_internal_linux.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad032acb4361399beaa3e19077143840574722b33d505be43a21eff13d01c27c"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.LogsFromContainer (cognitive 47): compat.LogsFromContainer has cognitive complexity 47 (threshold 15). Drivers by points: if/else 42, boolean chains 2, match/switch 2, loops 1 (nesting depth added 20). Of this number, 46 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":"pkg/api/handlers/compat/containers_logs.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"0719cea5f8bdb373ada9619e8ca08f0e680911c7fa20ced9390d98b71b6f03a6"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.CreateNetwork (cognitive 47): compat.CreateNetwork has cognitive complexity 47 (threshold 15). Drivers by points: if/else 39, boolean chains 3, loops 3, match/switch 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into 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/api/handlers/compat/networks.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"47702524932c629b957774b2e21b76c8170588c63d636682af0b7e46b6ba613a"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.CompatPull (cognitive 47): utils.CompatPull has cognitive complexity 47 (threshold 15). Drivers by points: if/else 39, match/switch 5, boolean chains 1, jumps 1, loops 1 (nesting depth added 28). Of this number, 45 points are the body\u0027s own statements and 2 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":"pkg/api/handlers/utils/images.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"34994027d309a39512e43257177824ba2de913b2c233a12587da586ab4cba575"}},{"ruleId":"D2","level":"warning","message":{"text":"infra.getRuntime (cognitive 47): infra.getRuntime has cognitive complexity 47 (threshold 15). Drivers by points: if/else 39, boolean chains 4, loops 4 (nesting depth added 8). 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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed21449ef771d39146016dbfadb0a81b59c7e2013b71e6bccfdf2e9ba31a6a6"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.ConvertVolume (cognitive 47): quadlet.ConvertVolume has cognitive complexity 47 (threshold 15). Drivers by points: if/else 44, boolean chains 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d06b7592bbee09dad563c34038c9bbc073c8f6bbc10db4cb3cd4cd9f2ce9038"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.port (cognitive 46): containers.port has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, loops 11, boolean chains 7 (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":"cmd/podman/containers/port.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2db373cba80869722e150907c3adefb51d4bb3c0c1e35ecc98826c1186c7686"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.LibpodToContainerJSON (cognitive 46): compat.LibpodToContainerJSON has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, loops 5, boolean chains 2, match/switch 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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"08d80337ebbc140c736621c79329c0f31b772911e0b3644a893d14907001e19c"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.NetworkRm (cognitive 46): ContainerEngine.NetworkRm has cognitive complexity 46 (threshold 15). Drivers by points: if/else 39, boolean chains 4, loops 3 (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":"pkg/domain/infra/abi/network.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"6808ada73058479d8ea15cbb05fc5c48554cc3de4d3e71028eef51843203efc3"}},{"ruleId":"D2","level":"warning","message":{"text":"parser.cUnescapeOne (cognitive 46): parser.cUnescapeOne has cognitive complexity 46 (threshold 15). Drivers by points: if/else 37, boolean chains 4, loops 4, match/switch 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":"pkg/systemd/parser/split.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dde58d6aef07f6fa8ad7401c330ce5d8c3e653c171c66900e2b82467ae1f912"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.restore (cognitive 45): containers.restore has cognitive complexity 45 (threshold 15). Drivers by points: if/else 28, boolean chains 13, loops 2, match/switch 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/restore.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf47ff38c8802dca61d44e5943ab4d839cc7c237e23fd8627fe2f8c0669f4e1"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.getAllQuadlets (cognitive 45): abi.getAllQuadlets has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34, loops 10, 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":"pkg/domain/infra/abi/quadlet_utils.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"65d7016e9ee05b60dd379344b8658ce41dab2d9464b225d0a970218229310090"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.Refresh (cognitive 44): SQLiteState.Refresh has cognitive complexity 44 (threshold 15). Drivers by points: if/else 38, loops 6 (nesting depth added 13). Of this number, 41 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":"libpod/sqlite_state.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea8b7dbd0db338542718efa7dd9b788b2a8e1424d640c775f3f9ed7c4f9de88"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.SetupRootless (cognitive 44): ContainerEngine.SetupRootless has cognitive complexity 44 (threshold 15). Drivers by points: if/else 40, boolean chains 3, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/system_linux.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e674c14a9ddfa22ba9a81026ab46ee1a64f4e1e400ec09a8f2988f9267e658"}},{"ruleId":"D2","level":"warning","message":{"text":"specgen.ParseNetworkFlag (cognitive 44): specgen.ParseNetworkFlag has cognitive complexity 44 (threshold 15). Drivers by points: if/else 35, loops 5, boolean chains 3, match/switch 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":"pkg/specgen/namespaces.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d4f993b00c976ae1b846a336665737a0c0d45e597d44aadf84e7e1201d6806"}},{"ruleId":"D2","level":"warning","message":{"text":"PodSpecGenerator.Validate (cognitive 44): PodSpecGenerator.Validate has cognitive complexity 44 (threshold 15). Drivers by points: if/else 42, 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":"pkg/specgen/pod_validate.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc5771c1e76d5b7bcc1acfaf73548a88f9ab14f4297f13e6067ed532199359b"}},{"ruleId":"D2","level":"warning","message":{"text":"volumes.prune (cognitive 43): volumes.prune has cognitive complexity 43 (threshold 15). Drivers by points: if/else 37, boolean chains 4, loops 2 (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":"cmd/podman/volumes/prune.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59af8e7cfaaf12a4420e9633d51adc87bec5a8bf80d7cb9d3e80dfdf5e03718"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.setNamespaces (cognitive 43): specgenutil.setNamespaces has cognitive complexity 43 (threshold 15). Drivers by points: if/else 40, boolean chains 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"6614084e612eef308d64e65f923d00030dff350eea8e94e1e610a4564b8ed4ef"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.requestMachinePorts (cognitive 42): libpod.requestMachinePorts has cognitive complexity 42 (threshold 15). Drivers by points: if/else 36, loops 6 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/networking_machine.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"25cb6c7006fecd7599b5bec7eaabea8e70e58e6ef053d87b33e2978b52c6abf9"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.getContainerNetworkInfo (cognitive 42): Container.getContainerNetworkInfo has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, loops 7, boolean chains 2 (nesting depth added 16). Of this number, 40 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":"libpod/networking_common.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"67cc2dc8bcf33ffbbc11a83b368d131c434d29f66e6ebe1112d2bfe83320d767"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.removePod (cognitive 42): Runtime.removePod has cognitive complexity 42 (threshold 15). Drivers by points: if/else 35, boolean chains 4, 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":"libpod/runtime_pod_common.go"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9ca064fe96c5431b0bf9b2e680c2e2702b305e4f529d564b5f71c2e528f24f"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerMount (cognitive 42): ContainerEngine.ContainerMount has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, boolean chains 5, 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab4d4ff16bf1b2988c8301a3157da0f026de1f0295067a4df9a9e551f204b53"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.SystemDf (cognitive 42): ContainerEngine.SystemDf has cognitive complexity 42 (threshold 15). Drivers by points: if/else 37, loops 3, 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":"pkg/domain/infra/abi/system.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a32c74cca41b336d2d5d2f07c78763b97c8462b774a61afaa315ac1a7b4020"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.VolumeFromHostPath (cognitive 42): kube.VolumeFromHostPath has cognitive complexity 42 (threshold 15). Drivers by points: if/else 40, match/switch 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":"pkg/specgen/generate/kube/volume.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"31fb603de2abb81d1354ab49c803ebe25f443808363d6012797cdbe30ff844d5"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ParseDockerignore (cognitive 42): util.ParseDockerignore has cognitive complexity 42 (threshold 15). Drivers by points: if/else 36, loops 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":"pkg/util/utils.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"b698a4a9d78e0431679df151f7448306e01c52150ee1f48263e618eba2e5ad4d"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.generateInspectContainerHostConfig (cognitive 41): Container.generateInspectContainerHostConfig has cognitive complexity 41 (threshold 15). Drivers by points: if/else 36, loops 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_inspect.go"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1bddaeaecb1c6bd03d8c8fd20b40f425ef4c3366a98b157fef574225a851c8"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.evictContainer (cognitive 41): Runtime.evictContainer has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, loops 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":"libpod/runtime_ctr.go"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e70a87fd9aadada32898164cfa1358474a0652226588c34395d92a77f8a303c"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.ValidateDBConfig (cognitive 41): SQLiteState.ValidateDBConfig has cognitive complexity 41 (threshold 15). Drivers by points: if/else 41 (nesting depth added 12). Of this number, 26 points are the body\u0027s own statements and 15 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":"libpod/sqlite_state.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1058ac1cd5caf44259e9f9c05caffc04d28a664dc6aa4cab0e2d3719f3dab1"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerStart (cognitive 41): ContainerEngine.ContainerStart has cognitive complexity 41 (threshold 15). Drivers by points: if/else 39, boolean chains 1, loops 1 (nesting depth added 25). Of this number, 39 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"090752733f37a8e02f9f4cf673c277137d726ea8e82d2706b93a1c822861330f"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.setupStorage (cognitive 40): Container.setupStorage has cognitive complexity 40 (threshold 15). Drivers by points: if/else 32, boolean chains 5, loops 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":"libpod/container_internal.go"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"4479a216e71e3d827d7d19c0144de0236f46cc6fddf1bd4912543d30e104c65e"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.checkpoint (cognitive 40): Container.checkpoint has cognitive complexity 40 (threshold 15). Drivers by points: if/else 34, boolean chains 4, loops 2 (nesting depth added 10). 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":"libpod/container_internal_common.go"},"region":{"startLine":1328}}}],"partialFingerprints":{"codehealthFindingId/v1":"849e47e31c946f1840bc78e8aba9b918a20bd08863af0a426b9a13f03365a62c"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.NetworkDisconnect (cognitive 40): Container.NetworkDisconnect has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 3, boolean chains 2 (nesting depth added 15). Of this number, 39 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":"libpod/networking_common.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1ee6192df68da7260c5e11cd6bec4474a9f1c52da49edf8cc26c6e2912aba0"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.SystemCheck (cognitive 40): Runtime.SystemCheck has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30, loops 8, boolean chains 2 (nesting depth added 15). Of this number, 36 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":"libpod/runtime.go"},"region":{"startLine":1352}}}],"partialFingerprints":{"codehealthFindingId/v1":"615d9088898a1dab3413182fec7ef0fb26b4f00c7aa77a8072bc402fe067b5a2"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.processBuildContext (cognitive 40): compat.processBuildContext has cognitive complexity 40 (threshold 15). Drivers by points: if/else 35, loops 3, boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"97518906c1b8e9bb98ce55f431c8ae0b362d0da5ca2951a18f70bbe56ea38e58"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.ToPodOpt (cognitive 40): kube.ToPodOpt has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25, loops 14, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"7075a11a3b2ee1d97da2df3ea36e72e5893b18a3d8e1b79794def56aab6f9b67"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.executePodTemplate (cognitive 40): generate.executePodTemplate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 33, loops 3, boolean chains 2, match/switch 2 (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":"pkg/systemd/generate/pods.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ebf03b12cd979bc5b96181aad58111ea9b25d0271d5d0b34f714e3988b3d9e"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.ps (cognitive 39): containers.ps has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28, loops 7, boolean chains 2, match/switch 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":"cmd/podman/containers/ps.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f3e6152edc8a47fc0c874567034a33acf65dc49c70fcc02e768da02b61846c"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.runHealthCheck (cognitive 39): Container.runHealthCheck has cognitive complexity 39 (threshold 15). Drivers by points: if/else 29, boolean chains 7, match/switch 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":"libpod/healthcheck.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fcdc80fec0250ef71e000e5618b925de1870f32ee9fc30ffb44bc60c7e3f2e4"}},{"ruleId":"D2","level":"warning","message":{"text":"NotifyProxy.listen (cognitive 39): NotifyProxy.listen has cognitive complexity 39 (threshold 15). Drivers by points: if/else 25, loops 10, match/switch 3, boolean chains 1 (nesting depth added 24). Most of this is not in the body itself: 0 of the 39 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":"pkg/systemd/notifyproxy/notifyproxy.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"70318ab11ec39b92542d07cde0d982afb085a5b6b4dd5857e10c2f502711875e"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.attachExecHTTP (cognitive 38): libpod.attachExecHTTP has cognitive complexity 38 (threshold 15). Drivers by points: if/else 34, match/switch 2, boolean chains 1, loops 1 (nesting depth added 10). Of this number, 26 points are the body\u0027s own statements and 12 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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b3b65b9cb76a0fe06a171f9991125e8526624bdee01ab705e5742a8ef861ad"}},{"ruleId":"D2","level":"warning","message":{"text":"machine.initMachine (cognitive 37): machine.initMachine has cognitive complexity 37 (threshold 15). Drivers by points: if/else 32, loops 5 (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/podman/machine/init.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1f0eb0e8a841de00f02dbb2c25f7b18649fc4dbacf47716421039622e74057"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Mount (cognitive 37): ImageEngine.Mount has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, boolean chains 2, loops 1, match/switch 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":"pkg/domain/infra/abi/images.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05381c9a79d5414ba1fb049d3159e5ca4a0c40c7088f86b406aee4a8607d432"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRm (cognitive 37): ContainerEngine.ContainerRm has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22, loops 14, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"b48a937dbf83a3bef8090b1949d498c35dff38890e0150030d00dca15dce1049"}},{"ruleId":"D2","level":"warning","message":{"text":"shim.Reset (cognitive 37): shim.Reset has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, 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":"pkg/machine/shim/host.go"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bae043f4771367f75c78278c78b12c354c8e805eaadf921c1efc96133a9fa43"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.DevicesFromPath (cognitive 37): generate.DevicesFromPath has cognitive complexity 37 (threshold 15). Drivers by points: if/else 35, boolean chains 2 (nesting depth added 17). Of this number, 29 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":"pkg/specgen/generate/config_linux.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"22203758538965befedeef2778fb0af767a9390ca15ce630b605b6d3cc981926"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.PodConfigToSpec (cognitive 37): generate.PodConfigToSpec has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28, loops 6, match/switch 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/pod_create.go"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9f4dd88f69745f9530c10f1bea5a7e5d6a493e1c8ab4f6c11d42289b57d1c1"}},{"ruleId":"D2","level":"warning","message":{"text":"connection.add (cognitive 36): connection.add has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, match/switch 3 (nesting depth added 12). Of this number, 27 points are the body\u0027s own statements and 9 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/podman/system/connection/add.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c18e9710e92d85ceb664d995e982fa144a4ede88249e3cfb4c53f17a5919b2b9"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.getContainerInspectData (cognitive 36): Container.getContainerInspectData has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, boolean chains 2, loops 1 (nesting depth added 8). 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":"libpod/container_inspect.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3891646ec05dd33c97f041ea697c8d4144080ec3536b4c2a34d0325ca59dae"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.mountNamedVolume (cognitive 36): Container.mountNamedVolume has cognitive complexity 36 (threshold 15). Drivers by points: if/else 35, boolean chains 1 (nesting depth added 16). Of this number, 34 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":"libpod/container_internal.go"},"region":{"startLine":1897}}}],"partialFingerprints":{"codehealthFindingId/v1":"6036b52cc7a9af85a2b9ee2f6ef7be958f29f3bad7e0a24df2d1b3b6fd183126"}},{"ruleId":"D2","level":"warning","message":{"text":"events.generateEventFilter (cognitive 36): events.generateEventFilter has cognitive complexity 36 (threshold 15). Drivers by points: if/else 32, loops 2, boolean chains 1, match/switch 1 (nesting depth added 19). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 76, 16, 33, \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":"libpod/events/filters.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47b20dee6e42e7f14bb3400fc46575a4bf2a9dcc2691adb8dbc728660dd0c74"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.Migrate (cognitive 36): Runtime.Migrate has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, boolean chains 3, match/switch 3, loops 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":"libpod/runtime_migrate.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"e607e7009f63d31c97bf704863abe88300071e92709c11c6891ebbff04a83abb"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.UpdateVolumePlugins (cognitive 36): Runtime.UpdateVolumePlugins has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, loops 4, 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":"libpod/runtime_volume_common.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0352fc539f5beaa8a461eb9658f30cd0b9ced1644a37d8f568b7d743b0f80b4"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.convertLibpodNetworktoDockerNetwork (cognitive 36): compat.convertLibpodNetworktoDockerNetwork has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, loops 9, 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":"pkg/api/handlers/compat/networks.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf15859c646edae5da75e6859f5291a134b3d7eacc227f28ca606b2307bfec87"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.SystemPrune (cognitive 36): ContainerEngine.SystemPrune has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 2, 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":"pkg/domain/infra/abi/system.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"af5d8ed14c441f8353ff6a7570aeb838920609d1c4b34cbff5c5913ba45524f8"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerStart (cognitive 36): ContainerEngine.ContainerStart has cognitive complexity 36 (threshold 15). Drivers by points: if/else 32, loops 3, boolean chains 1 (nesting depth added 20). 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4dc010d39121723b0de515b8d9fe6130fb809052f3601accac996184f69dd8d"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.envVarValue (cognitive 36): kube.envVarValue has cognitive complexity 36 (threshold 15). Drivers by points: if/else 31, loops 3, boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":1110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b360d9260046f0612cbfee924833a83acbd634a680d743f75e673979eaa67f2"}},{"ruleId":"D2","level":"warning","message":{"text":"trust.AddPolicyEntries (cognitive 36): trust.AddPolicyEntries has cognitive complexity 36 (threshold 15). Drivers by points: if/else 29, loops 6, match/switch 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":"pkg/trust/policy.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"87180413bc9fe8be596977675a8591a96e8ebaccf07da7ffee2f526c3da8e069"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.readConmonPipeData (cognitive 35): libpod.readConmonPipeData has cognitive complexity 35 (threshold 15). Drivers by points: if/else 33, boolean chains 1, match/switch 1 (nesting depth added 22). Of this number, 32 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":"libpod/oci_conmon_common.go"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b63ad56066208fe14ebbcbe50a362ec5d9e658d5d1725a97ecddec34d8e9ea"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.execStartAndAttach (cognitive 35): Container.execStartAndAttach has cognitive complexity 35 (threshold 15). Drivers by points: if/else 34, boolean chains 1 (nesting depth added 9). Of this number, 33 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":"libpod/container_exec.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"02cc090f5136a8839b4251dfcae13f23854527bc8b4ee2ead6e7b09cb8aa0191"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.NetworkConnect (cognitive 35): Container.NetworkConnect has cognitive complexity 35 (threshold 15). Drivers by points: if/else 31, boolean chains 3, loops 1 (nesting depth added 7). Of this number, 34 points are the body\u0027s own statements and 1 belongs 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":"libpod/networking_common.go"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"a227623305b2d14928353a60ed8d8ed46994d704a89e7c344f1197ba3a7b9b14"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRestore (cognitive 35): ContainerEngine.ContainerRestore has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, loops 5, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c20b7c5d087292b14626b23729da7477b5acb773891039475ba969f471a039"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRun (cognitive 35): ContainerEngine.ContainerRun has cognitive complexity 35 (threshold 15). Drivers by points: if/else 32, boolean chains 2, loops 1 (nesting depth added 14). Of this number, 31 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/domain/infra/tunnel/containers.go"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb73e4ce4a648d34a32f1288d4eb03bad72289f3104b253ed459ce865d42ed0a"}},{"ruleId":"D2","level":"warning","message":{"text":"network.networkCreate (cognitive 34): network.networkCreate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 3, 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":"cmd/podman/networks/create.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80b98cf30ef5ec4ec0b7b515f4abb075407c3a0a054cef53f7ce03e9c0f005b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.process (cognitive 34): main.process has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, boolean chains 3, loops 3, match/switch 2 (nesting depth added 10). Of this number, 33 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":"cmd/quadlet/main.go"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"941222e95f96f1b103e9549a9a120a7f541fb40a798b23d455c7743b6a48dd61"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parent (cognitive 34): main.parent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, match/switch 2, jumps 1, loops 1 (nesting depth added 8). Of this number, 30 points are the body\u0027s own statements and 4 belong to 4 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":"cmd/rootlessport/main.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"384831f276282707518681712e464fa84dbff99166c9338d5e2a3e72d7b073ed"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.WaitForExit (cognitive 34): Container.WaitForExit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 2 (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":"libpod/container_api.go"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b32ca109685f6c99a2a815a48bf7667b4f9e434b043cd2134777f8b5d2126a7"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.Inspect (cognitive 34): Pod.Inspect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, loops 7 (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":"libpod/pod_api.go"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"861acf7e33d46b9f218a6f5a64e51b072d471d64d80f6a187f9d258b5854eb74"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.addContainer (cognitive 34): SQLiteState.addContainer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, boolean chains 3, loops 2, match/switch 2 (nesting depth added 10). Of this number, 31 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":"libpod/sqlite_state_internal.go"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa286649c0776fec1b210a7eb3fb9a91b378aa50230fa722ba315d42c588413c"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.getKubePods (cognitive 34): abi.getKubePods has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, match/switch 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/generate.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"87272c17d6b7533c51613782dde30fe1e21658764b4b849a2e5d211cc588caed"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerUnmount (cognitive 34): ContainerEngine.ContainerUnmount has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 4, 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"d315de88f8de43a2c558668b82a032ebc0bd51727a7982e309e3f714f45b7351"}},{"ruleId":"D2","level":"warning","message":{"text":"listLocal.build (cognitive 34): listLocal.build has cognitive complexity 34 (threshold 15). Drivers by points: if/else 31, loops 3 (nesting depth added 13). Of this number, 29 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":"pkg/farm/list_builder.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ff077c8ab2abfa6a9299f1248bc9705adcb8d0c855effb4635124ba8c7dbfa5"}},{"ruleId":"D2","level":"warning","message":{"text":"util.breakInsert (cognitive 34): util.breakInsert has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, boolean chains 4, 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":"pkg/util/utils.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"5958c18501ff29af34873f6db02b2792eef85080d0afdcf9b74a62d9259df5d2"}},{"ruleId":"D2","level":"warning","message":{"text":"common.DefineCreateFlags (cognitive 33): common.DefineCreateFlags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 5 (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/podman/common/create.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de69319d993dc070c337f8576f96f1fddaae5c06bd8607e95653ed290cd6947"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.systemd (cognitive 33): generate.systemd has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, boolean chains 2, 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":"cmd/podman/generate/systemd.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"db66cc29d460670889257a9292404765b088964fafdd4b1caf880976aa15bf7e"}},{"ruleId":"D2","level":"warning","message":{"text":"logs.getTailLog (cognitive 33): logs.getTailLog has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, loops 3, boolean chains 2 (nesting depth added 18). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/logs/log.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0fc3c2024ac817c2a182e60a5e84c8d94e55c27edfbe7a9a57b4e433f434e4"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.migrateDB (cognitive 33): Runtime.migrateDB has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, loops 6 (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":"libpod/runtime_migrate.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45c4bf346fc7559a13120768cc0d0f0cdbc5213503afe999132e19d3bee17b0"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.AllContainers (cognitive 33): SQLiteState.AllContainers has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, loops 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":"libpod/sqlite_state.go"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86309b88063d16c29e98148bba16c35ed9c1f72985802efd61059609d62154a"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.GetEvents (cognitive 33): compat.GetEvents has cognitive complexity 33 (threshold 15). Drivers by points: if/else 26, boolean chains 4, match/switch 2, 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":"pkg/api/handlers/compat/events.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d405b147381d9d69f3527b566374036a4422fb37d1f179e9f3a4f93de9866701"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.List (cognitive 33): ImageEngine.List has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, loops 1 (nesting depth added 17). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 34). 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/domain/infra/abi/images_list.go"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a12a755b0bc5da4c5d8855a3bcefa3e0940f696c2c74f55fa29eaad07b6a234"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRunlabel (cognitive 33): ContainerEngine.ContainerRunlabel 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":"pkg/domain/infra/abi/containers_runlabel.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc53ba1f40ee403babcce916c51bd9f1c0d4d3fef9c729478767ee2ab8149a8"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.MakePod (cognitive 33): generate.MakePod has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 3 (nesting depth added 9). Of this number, 29 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/specgen/generate/pod_create.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f193697f31bd430858102308abda0c34d310bf3a2eda64fee45d58255bd23cf0"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.copyToContainer (cognitive 32): containers.copyToContainer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27, boolean chains 5 (nesting depth added 7). Of this number, 21 points are the body\u0027s own statements and 11 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/podman/containers/cp.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31f943e19c6423cb37c4904d7586392090cb2b419eb3b0ca6eda0ab071cea1c"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.create (cognitive 32): containers.create has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, 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":"cmd/podman/containers/create.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"51ab7437dc718f97c376321b1f4c63ee9364a89599e5bdc59816d19b07653f03"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.UpdateContainer (cognitive 32): compat.UpdateContainer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 30, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f6512f67701e2e1e3c5abd7cc1e4d93cfe36d04a63386ed01cadc6b7a8102d8"}},{"ruleId":"D2","level":"warning","message":{"text":"images.prepareContainerFiles (cognitive 32): images.prepareContainerFiles has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, boolean chains 2, loops 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":"pkg/bindings/images/build.go"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"575e403b2807aa46c870a0fb8095c77c710f2c97dba7e8f7382e7c2ce919d2cc"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerClone (cognitive 32): ContainerEngine.ContainerClone has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26, loops 4, 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1766}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb881a90c20269e767cc713709333f9a02372a21dc5d30204cef43acfbfe3c57"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.PodClone (cognitive 32): ContainerEngine.PodClone has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25, loops 4, match/switch 2, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/pods.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f2f2c05beb663c4a51b69402ead187170e13edb608d6e3be4a1951b8667306"}},{"ruleId":"D2","level":"warning","message":{"text":"ps.GetContainerLists (cognitive 32): ps.GetContainerLists has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25, loops 3, boolean chains 2, match/switch 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":"pkg/ps/ps.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b44b5d1d22f8bf741d6c53bd3e456a3cde39cb388cdd9345b376ca671da129"}},{"ruleId":"D2","level":"warning","message":{"text":"util.parseTriple (cognitive 32): util.parseTriple has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 6, boolean chains 5 (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":"pkg/util/utils.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"928a9a1475576f2ac4261fa396b54c5d6cafc8081801b661d229ab44ed72b103"}},{"ruleId":"D2","level":"warning","message":{"text":"images.imagePull (cognitive 31): images.imagePull has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 3, 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":"cmd/podman/images/pull.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"29718405c97a5477373693da081ec2120d9c06b9afe6db99080cfac9e0269608"}},{"ruleId":"D2","level":"warning","message":{"text":"images.imageSearch (cognitive 31): images.imageSearch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, boolean chains 3, match/switch 2, 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":"cmd/podman/images/search.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bffb6daf46edde1ac616d864f3727db8b8d8236e390063930384840d5d8df02"}},{"ruleId":"D2","level":"warning","message":{"text":"manifest.add (cognitive 31): manifest.add has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 2, match/switch 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":"cmd/podman/manifest/add.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"96fbbe1ce7868deb81ccd788fcd7a73c2b1904e4ce7431445d7b9d44c7d5e0fd"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.resultToBasicNetworkConfig (cognitive 31): libpod.resultToBasicNetworkConfig has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 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":"libpod/networking_common.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"989e42445983632e9168db415463a6ef584f4c2a9c727f648a51ccbb5ee5e896"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.getLockManager (cognitive 31): libpod.getLockManager has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26, match/switch 4, boolean chains 1 (nesting depth added 19). 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":"libpod/runtime.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"54971298ab30f30435e90991faaaaa3bfb65de4d3b5030792aa7aff911e49dd7"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.execLightweight (cognitive 31): Container.execLightweight has cognitive complexity 31 (threshold 15). Drivers by points: if/else 28, match/switch 2, boolean chains 1 (nesting depth added 11). Of this number, 28 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":"libpod/container_exec.go"},"region":{"startLine":1149}}}],"partialFingerprints":{"codehealthFindingId/v1":"74700f9f0ca57c9f8663dc974419c9529144bcf0453f72b45b4db04345c5ad5e"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.canStopServiceContainer (cognitive 31): Container.canStopServiceContainer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 4, match/switch 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":"libpod/service.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dfabd07da107dc0c0fdf114e8f2ecc6b9e35e8e4ae39bc7837b87c6b7d0c764"}},{"ruleId":"D2","level":"warning","message":{"text":"EventLogFile.Read (cognitive 31): EventLogFile.Read has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, match/switch 4, boolean chains 1, loops 1 (nesting depth added 13). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 151, 125, 137). 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":"libpod/events/logfile.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9b4e9dd89c9aad31ab5677217579c9ecac33ee971b78d85ec687da1362388ac"}},{"ruleId":"D2","level":"warning","message":{"text":"filters.GenerateVolumeFilters (cognitive 31): filters.GenerateVolumeFilters has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13, loops 9, match/switch 7, boolean chains 2 (nesting depth added 18). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 63, 41). 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/domain/filters/volumes.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b8769e8c953c2a5a0a1016b60e99537f8c93ac320d653520250a620a6e68ba"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRestore (cognitive 31): ContainerEngine.ContainerRestore has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, loops 6, match/switch 1 (nesting depth added 17). Of this number, 27 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/domain/infra/abi/containers.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7a46623f084353c8201cbf483b35893dd48fdba78078dd7023a164bd7a6aa7"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.setupSecurityContext (cognitive 31): kube.setupSecurityContext has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25, loops 5, boolean chains 1 (nesting depth added 8). 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":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"51ba3cf7dc30fc48352fcf1dc2084242c2308871a1db1fd2d7fc95a5d6fb82a4"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.addNetworks (cognitive 31): quadlet.addNetworks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29, boolean chains 1, loops 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1848}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f34efb6aa5cef0466f031f37039ed59bafe801db98c234cc7f4889ccdbdb35"}},{"ruleId":"D2","level":"warning","message":{"text":"util.getDevices (cognitive 31): util.getDevices has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, match/switch 5, boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/util/utils_linux.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"891ca1ed0ef9ed9f97a835c215addefc7c3740336a07bcb8d1db58e885793115"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.exec (cognitive 30): containers.exec has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/exec.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"31a78ea6498507693a6219514a03646f2bf9cb82bf79df4c07a9c304459eae77"}},{"ruleId":"D2","level":"warning","message":{"text":"farm.farmUpdate (cognitive 30): farm.farmUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21, loops 8, boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). 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/podman/farm/update.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"415f31c702212ccdca0e3b8d63573359fcc6e52a52aafcaddea3226f3c855402"}},{"ruleId":"D2","level":"warning","message":{"text":"manifest.push (cognitive 30): manifest.push has cognitive complexity 30 (threshold 15). Drivers by points: if/else 30 (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":"cmd/podman/manifest/push.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"482020cf1d5257027e757740c94fbb85ff6aa9ea2f7d030f62fb70524e5a0605"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.generateKubeSecurityContext (cognitive 30): libpod.generateKubeSecurityContext has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, match/switch 3, boolean chains 1, loops 1 (nesting depth added 11). Of this number, 27 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":"libpod/kube.go"},"region":{"startLine":1373}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecb6db99e9c72338a7dd1312b043475e9bdbbd13b6447a173dab4ac259ff7c98"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.cleanupStorage (cognitive 30): Container.cleanupStorage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 2, match/switch 2 (nesting depth added 9). Of this number, 25 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":"libpod/container_internal.go"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c67c1998fa8d846072d01182a13d383132fa1631e2bb3457e184be1cd91a0c6"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.inspectJoinedNetworkNS (cognitive 30): Container.inspectJoinedNetworkNS has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, loops 4, boolean chains 2 (nesting depth added 15). 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 227). 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":"libpod/networking_linux.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e87bfa381a270d24ffec785fe70bca376a38263211fb5951a6309a23dcf0d4c"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.mergeDBConfig (cognitive 30): Runtime.mergeDBConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18, boolean chains 12 (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":"libpod/runtime.go"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"c605425409e4fbcc3da041a201e1e948b0c7db5c0000a66b2602de1bd6677572"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.NewPod (cognitive 30): Runtime.NewPod has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, boolean chains 5, loops 2 (nesting depth added 8). Of this number, 27 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":"libpod/runtime_pod_common.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1088dedafd3498e7f9ce523054ba64ab46d77f496642c3f073b5ce720d799729"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.PushImage (cognitive 30): libpod.PushImage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 27, match/switch 2, loops 1 (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into 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/api/handlers/libpod/images_push.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"3915d196cebc3a3c1cd7ed4621ccbe9370ed3654e072a67c859c2ad952c7a71c"}},{"ruleId":"D2","level":"warning","message":{"text":"artifacts.Extract (cognitive 30): artifacts.Extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, loops 4, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/artifacts/extract.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c55d2aeab9a0121c9e4cf1bcb93ca2b39fca0728bf0cc75d4212977cf1ce89c"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.ManifestAnnotate (cognitive 30): ImageEngine.ManifestAnnotate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 30 (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/domain/infra/abi/manifest.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0e3bffe3a3b3685d6af801d543c0ebee21f08aac3f5977e135d7e845a5cc8a"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.containerStopImpl (cognitive 30): ContainerEngine.containerStopImpl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, boolean chains 3, loops 2, match/switch 2 (nesting depth added 11). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 323). 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/domain/infra/abi/containers.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"983c81a747b14d5d233adae7543f9334a537dcf75dbffd2ad87ce908d98438d2"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.handleUserRemap (cognitive 30): quadlet.handleUserRemap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 10, match/switch 1 (nesting depth added 16). 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d655d83e113bd0ac0c83f3545aa393e9d15626287c0e2c0bbf4363b5bfa5a1"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ParseIDMapping (cognitive 30): util.ParseIDMapping has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, boolean chains 8, match/switch 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":"pkg/util/utils.go"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a17357681a357b17d7109808e15873e102e9cd83ba78ad3ac0a6bbd93a636b0"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.copyFromContainer (cognitive 29): containers.copyFromContainer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, boolean chains 4 (nesting depth added 3). Of this number, 16 points are the body\u0027s own statements and 13 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":"cmd/podman/containers/cp.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa3b787c346f1f38b0e860715ac0712876ebb6fcb63b144d0567d449f55a9d7"}},{"ruleId":"D2","level":"warning","message":{"text":"validate.CheckAllLatestAndIDFile (cognitive 29): validate.CheckAllLatestAndIDFile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, boolean chains 8 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/validate/args.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"862801804914ff84d9611ce02a80ceed4c6fe754b5a770afa9c75a9c130a8921"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.detectCycles (cognitive 29): libpod.detectCycles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, loops 2, boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 7 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":"libpod/container_graph.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"89532876e4de74183e3a54bee567e4d5ec0acb2d4d5ba00cf0a90c3ae523213d"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.ExecHTTPStartAndAttach (cognitive 29): Container.ExecHTTPStartAndAttach has cognitive complexity 29 (threshold 15). Drivers by points: if/else 29 (nesting depth added 7). Of this number, 27 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":"libpod/container_exec.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"a06076db8494eaac72560554785b820ed5b16ef200431f25be5f80d174dd994f"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.getActiveExecSessions (cognitive 29): Container.getActiveExecSessions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 28, 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":"libpod/container_exec.go"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"f14af6cfd7a8023d92e9a5b1b76da8ee65d28885eb299a907cd4a11bc6c47d44"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.CommitContainer (cognitive 29): libpod.CommitContainer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, match/switch 3, boolean chains 1, loops 1 (nesting depth added 10). Of this number, 27 points are the body\u0027s own statements and 2 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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa7cdb7233c9420fff5451f8445efc21064a7bf67cdeabe56a2c15a065a1a3c"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ToParams (cognitive 29): util.ToParams has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 7, match/switch 2, 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":"pkg/bindings/internal/util/util.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd6b92aec17f3b83c579e9a4bd373187350d083ced96b416a1c3f93a7fff122"}},{"ruleId":"D2","level":"warning","message":{"text":"Farm.Build (cognitive 29): Farm.Build has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, loops 6, boolean chains 1, match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 317, 289, 303, \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":"pkg/farm/farm.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"2593acca5a9622f0c0bb1deca56941f755ace93c6f5a363083c6e061a84ee578"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.GetDefaultNamespaceMode (cognitive 29): generate.GetDefaultNamespaceMode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, boolean chains 7, match/switch 3 (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/specgen/generate/namespaces.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"af4e8f9d1061c3bf3b520a90761aa1737d7eb8c462070eeaf6c9bc6f658215fa"}},{"ruleId":"D2","level":"warning","message":{"text":"common.AutocompleteFormat (cognitive 28): common.AutocompleteFormat has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 2, match/switch 2 (nesting depth added 12). 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 1359). 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/podman/common/completion.go"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"815d6e0832b3a588bcabfd44deedeff73099844783e3ce6a3db28d901825ce19"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.exec (cognitive 28): Container.exec has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, loops 2, boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 780, 802). 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":"libpod/container_exec.go"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b796ed9e9fcfbaa3a065ec215d2d7de854d88dea34799048bfecb116e1c656d"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.postDeleteHooks (cognitive 28): Container.postDeleteHooks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, loops 3 (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":"libpod/container_internal.go"},"region":{"startLine":2332}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b73f2ac30e1a077947d379894d112b8d7f5452f794fc337cf9b153572d61e5"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.setupOCIHooks (cognitive 28): Container.setupOCIHooks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 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":"libpod/container_internal.go"},"region":{"startLine":2451}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c16bf932cd59160b53fe0ac5822ea99e60eb65c0f989295f7070b9b6793eaa"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.StopContainer (cognitive 28): ConmonOCIRuntime.StopContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, boolean chains 1, loops 1 (nesting depth added 10). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_common.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"133c45dd2743c82fba277f0287a6e8ca7bc3585eeca4c12237f4e1735f6cbc56"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.stopWithTimeout (cognitive 28): Pod.stopWithTimeout has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, 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":"libpod/pod_api.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd8a5b5b56bc85f4e9c7a018c80cff0f3ab667b33d768ec5346da54dfbcb419"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.RemoveStorageContainer (cognitive 28): Runtime.RemoveStorageContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, 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":"libpod/runtime_cstorage.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61c95e46595bf1efe3590da101d467f52e5503bfb31432e8572ba418aaa3ac4"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.StatsContainer (cognitive 28): compat.StatsContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, jumps 1, 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":"pkg/api/handlers/compat/containers_stats.go"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd62582159c0b6bce99cbb1174cb238de0dd16d9cb9a1e7346b8fbf8de87a05"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.GetImages (cognitive 28): compat.GetImages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, loops 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/images.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1a40d125d773174b35597631669e917a15cfa5c0606871e285c42e1fe335a77"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerCleanup (cognitive 28): ContainerEngine.ContainerCleanup has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, boolean chains 4, 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/domain/infra/abi/containers.go"},"region":{"startLine":1383}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd639070c9fbeb23556979b7195a0f2dfe7b910cc0b2be7fe502a270464bfc26"}},{"ruleId":"D2","level":"warning","message":{"text":"emulation.parseBinfmtMisc (cognitive 28): emulation.parseBinfmtMisc has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, match/switch 2, boolean chains 1, 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":"pkg/emulation/binfmtmisc_linux.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"445d3f07bf40a14b3b33bf4d65e26f90c5f07750a3ae522599646aa400a7c854"}},{"ruleId":"D2","level":"warning","message":{"text":"Farm.Schedule (cognitive 28): Farm.Schedule has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, loops 6 (nesting depth added 12). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 170). 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/farm/farm.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"3544a72c69120c012521b5e06b60a95a0bcc4ed53de6ec48397b83261a558d85"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.MapSpec (cognitive 28): generate.MapSpec has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, boolean chains 2, match/switch 1 (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":"pkg/specgen/generate/pod_create.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4ad5ebb5fcb917f4e283c9b8d51e7fabaf82884b5db8c9a00b593ac69a0a45"}},{"ruleId":"D2","level":"warning","message":{"text":"images.sortImages (cognitive 27): images.sortImages has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, loops 4, match/switch 1 (nesting depth added 14). Of this number, 20 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/podman/images/list.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fe91438eabdb95782c22f637d0958348286bb230714bec5418343155cfd96b"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.startNode (cognitive 27): libpod.startNode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19, boolean chains 4, loops 4 (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":"libpod/container_graph.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec3584cc7bfa880eadfe7aa138a470574fb613fb804f447f33ae65af36ec99ee"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.prepareProcessExec (cognitive 27): Container.prepareProcessExec has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, loops 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"a694a11466d3bca3c231f4e839687c418081522d2a5b5653d7c24f69e274b5c3"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.ManifestPush (cognitive 27): libpod.ManifestPush has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24, match/switch 2, loops 1 (nesting depth added 9). Of this number, 26 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":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ddb15159435f03bb2cbd27eb73be4212563151bf87684717b35481cc199381"}},{"ruleId":"D2","level":"warning","message":{"text":"updater.updateUnit (cognitive 27): updater.updateUnit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 6, boolean chains 1 (nesting depth added 9). Of this number, 19 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":"pkg/autoupdate/autoupdate.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"91f7bf78188ffcde06fb39da92ba9dd3202ee20ba41309c1779b0a1cd7d96511"}},{"ruleId":"D2","level":"warning","message":{"text":"infra.ParseIDMapping (cognitive 27): infra.ParseIDMapping has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, boolean chains 7 (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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c72f9a4bbdbc648e2843e9ea8e49a8b8f70f4a9af5078c68151047f077f3e88d"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.ArtifactAdd (cognitive 27): ImageEngine.ArtifactAdd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, match/switch 5, loops 2 (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":"pkg/domain/infra/tunnel/artifact.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4f4a1d142a0fd619c21c847c3c76c420812a76b8fd821aa8c7473bb6625960a"}},{"ruleId":"D2","level":"warning","message":{"text":"vsock.loadHVSockRegistryEntries (cognitive 27): vsock.loadHVSockRegistryEntries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, boolean chains 1, loops 1 (nesting depth added 11). Of this number, 24 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":"pkg/machine/hyperv/vsock/vsock.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e343a8d6bbd8d94cfdc45a119d1b059b9e4c349eceee1d063d2b672976d253"}},{"ruleId":"D2","level":"warning","message":{"text":"images.imagePush (cognitive 26): images.imagePush has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26 (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/podman/images/push.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"40dd4980fd0955f997921d8fa003a06d28fef80516e6f44924015cd714331e9e"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.httpAttachTerminalCopy (cognitive 26): libpod.httpAttachTerminalCopy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, match/switch 3, loops 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":"libpod/oci_conmon_common.go"},"region":{"startLine":1528}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d8bc77d92fdbf98cc5719d3833f1216d835f2c2a2770126c3da21d8f771ccd"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.restartWithTimeout (cognitive 26): Container.restartWithTimeout has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, loops 2, boolean chains 1, match/switch 1 (nesting depth added 9). Of this number, 23 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":"libpod/container_internal.go"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45d5eab32a6030b44c8450e16aefcd77fb175b1f1c0cf737802f0800925ba11"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.Attach (cognitive 26): ConmonOCIRuntime.Attach has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 4 (nesting depth added 7). Of this number, 24 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":"libpod/oci_conmon_attach_common.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"899ef73efb1710bd52db0c51af25e858a33175d09ace6e6c230567b131115f9f"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.refresh (cognitive 26): Runtime.refresh has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 3, 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":"libpod/runtime.go"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0246b3cf9fa18590d8fc642ba57c47e5e6abb610a162dc0e5a48074500c050a"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.RenameVolume (cognitive 26): SQLiteState.RenameVolume has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26 (nesting depth added 7). Of this number, 23 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":"libpod/sqlite_state.go"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c6994ed2fea1d7b93330f985375fda0376cebeac5050e4b0a2d01b50c5c029"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.ListContainers (cognitive 26): compat.ListContainers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, 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":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"7297a9af631e4b7be3d11187ca72b136ec468491463f1dc33d955ac06dbbefec"}},{"ruleId":"D2","level":"warning","message":{"text":"updater.assembleTasks (cognitive 26): updater.assembleTasks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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/autoupdate/autoupdate.go"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8801fd14e6f6fb7109d2013b4a1ac7e56ef83dd565ac40069d6528b328f6cb4"}},{"ruleId":"D2","level":"warning","message":{"text":"ps.ListContainerBatch (cognitive 26): ps.ListContainerBatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 189). 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/ps/ps.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d256d95567670aed52b95929048686b50421762fbde349de20789f9bf4165b0c"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.ConvertKube (cognitive 26): quadlet.ConvertKube has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 4, 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fbb92f6143d61f57e6992858e4b73582590d28b2052d84706f1d9615d62e3a"}},{"ruleId":"D2","level":"warning","message":{"text":"common.getImages (cognitive 25): common.getImages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 7, 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":"cmd/podman/common/completion.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c45d4802aadc771e60c1f466c74a24d8f2f4c047617f9fa7b8404b5d422535d"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.pullImage (cognitive 25): containers.pullImage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, 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":"cmd/podman/containers/create.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e1f107b1abfdf6cd64213e12c6995ecb86372ec4205b584751f1df322591cd"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.portsToString (cognitive 25): containers.portsToString has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 8, boolean chains 2 (nesting depth added 9). Of this number, 24 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":"cmd/podman/containers/ps.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"7306869d75e5f5b2c591314f84e192fcc3c2c7b4c22afe91d0166a470cb39545"}},{"ruleId":"D2","level":"warning","message":{"text":"inspector.inspectAll (cognitive 25): inspector.inspectAll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"cmd/podman/inspect/inspect.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bffba90689b0dddbeb20dc01ba8cb81b85ec7b600cd099083133c4dd8c4db7"}},{"ruleId":"D2","level":"warning","message":{"text":"pods.stats (cognitive 25): pods.stats has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"cmd/podman/pods/stats.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86c93ecf6347823c70e60fa99200d597c17a67ea09b63d353c54c93440933fd"}},{"ruleId":"D2","level":"warning","message":{"text":"localapi.CheckIfImageBuildPathsOnRunningMachine (cognitive 25): localapi.CheckIfImageBuildPathsOnRunningMachine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 2, match/switch 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":"internal/localapi/utils.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"786ede42d171d0d0effbd2556938fdd98600299db20dedcfebb4a969bfacf6ca"}},{"ruleId":"D2","level":"warning","message":{"text":"BoltState.getContainerFromDB (cognitive 25): BoltState.getContainerFromDB has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/boltdb_state_internal.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"f37b94e6248b1da1b03bae06d59463671fb88f1ad58a26b24be339b15a5c45d7"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.redirectResponseToOutputStreams (cognitive 25): libpod.redirectResponseToOutputStreams has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, match/switch 3, boolean chains 1, 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":"libpod/oci_conmon_attach_common.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cbf21c1443023704a83e1d86a6f85fa759c70c0a10462f786afe306c8d24bd4"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.NamespaceMode (cognitive 25): Container.NamespaceMode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container.go"},"region":{"startLine":1507}}}],"partialFingerprints":{"codehealthFindingId/v1":"933866b0797320a520a388b9c24b60d00c88597b2b4f494a46d3e5b0c8ca2299"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.prepare (cognitive 25): Container.prepare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21, boolean chains 2, loops 2 (nesting depth added 7). Of this number, 15 points are the body\u0027s own statements and 10 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":"libpod/container_internal_linux.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea75690655d0bd55ce31892694a12777b7e9dbfac7cd4d34b84ad06ab9154e4"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.executeBuild (cognitive 25): compat.executeBuild has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, loops 9, match/switch 2, boolean chains 1 (nesting depth added 14). Of this number, 23 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":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebeeb92b48eaf907932e7f3dec77a8a301f299ae0cb538732b1735eebb8b7cd5"}},{"ruleId":"D2","level":"warning","message":{"text":"pods.pods (cognitive 24): pods.pods has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 5, boolean chains 2, match/switch 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":"cmd/podman/pods/ps.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"63bd3335a0c83baddf4d2f86247abeae9d67ab7aefc4dd5265b55a0b231b33d5"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.Attach (cognitive 24): Container.Attach has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 1, match/switch 1 (nesting depth added 8). Of this number, 16 points are the body\u0027s own statements and 8 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":"libpod/container_api.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"af974fe0f8a6e716f91adb4ff2aae68f86904d7180ff3102f58d4c93767a4856"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.init (cognitive 24): Container.init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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":"libpod/container_internal.go"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"e682d07196bed8bfdf8e458741956c68b134c82308b8fd6eb3ac34345201dc13"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.waitForConmonToExitAndSave (cognitive 24): Container.waitForConmonToExitAndSave has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (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":"libpod/container_internal.go"},"region":{"startLine":1480}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5dec3a8266c37458d41ef6ced82b99d27d85733a7e298af8c9a9261646877a"}},{"ruleId":"D2","level":"warning","message":{"text":"Event.ToHumanReadable (cognitive 24): Event.ToHumanReadable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, loops 3, boolean chains 1, 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":"libpod/events/events.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff0104c8a1a41919f665d33ff8be6b6a80ba5a1f902b6086a63f36fb4bb7f551"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.startExec (cognitive 24): ConmonOCIRuntime.startExec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 4 (nesting depth added 2). Of this number, 22 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. 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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6b9990c5c1a9e8b2b3dc9cd19e1c8743dcd5968d04f9747b52bdac98b018f1"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.removePodCgroup (cognitive 24): Pod.removePodCgroup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 2, 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":"libpod/runtime_pod_linux.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84911686788f0908d67d4185c71aa50702498cd7307bf780943489866b20a1d"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.RemoveContainersForImageCallback (cognitive 24): Runtime.RemoveContainersForImageCallback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, loops 2, boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 0 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 27). 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":"libpod/runtime_img.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e95f1a53b16695ce2012057ebbe49aaa4ed296435fbaf57a2c043e5a07a0d3b"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.RemovePodContainers (cognitive 24): SQLiteState.RemovePodContainers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, loops 1 (nesting depth added 3). 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: 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":"libpod/sqlite_state.go"},"region":{"startLine":1801}}}],"partialFingerprints":{"codehealthFindingId/v1":"960032bf3a756e3428bb21f9cd0630d8d2822e72ceed72e393d4eb69b2bfb69b"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.SearchImages (cognitive 24): compat.SearchImages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, match/switch 4, 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/api/handlers/compat/images_search.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c4c43b1f677b75385c1d02052308a6e3e0742959a2be162df539b330aceaf8"}},{"ruleId":"D2","level":"warning","message":{"text":"auth.getConfigCredentials (cognitive 24): auth.getConfigCredentials has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 8 (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/auth/auth.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6a5386dd9bb8819d8b92e7dc32b39111f394da073a6ce356b3090f82d8daa4"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.Commit (cognitive 24): containers.Commit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, match/switch 4, boolean chains 1, 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":"pkg/bindings/containers/commit.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"85156db8e13a41e33ca2937abf8005eb3a0c0e28af4f98bb5398116ba634265e"}},{"ruleId":"D2","level":"warning","message":{"text":"images.build (cognitive 24): images.build has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (nesting depth added 4). 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: 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":"pkg/bindings/images/build.go"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f6212fe38e20b323a06e7fa8d043680fa58f11ec6121d6b8688780a7d8d8ff"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.splitMultiDocYAML (cognitive 24): abi.splitMultiDocYAML has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 4 (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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"857d98838b12d670cb7f6a7b14b6f93f826999a5ed692003a025d27f9d25f556"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.stopLoadedTemplateInstances (cognitive 24): abi.stopLoadedTemplateInstances has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 2, 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":"pkg/domain/infra/abi/quadlet_utils.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddece35ca73a159571472f9094fc2f2bd3580a1ff706a3ab925fb888091cb811"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.remoteManifestInspect (cognitive 24): ImageEngine.remoteManifestInspect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1, match/switch 1 (nesting depth added 7). Of this number, 22 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":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"344b9dc35d19505297dad77c4d65d055c2deaa4c4175787cf0a7a867f726667e"}},{"ruleId":"D2","level":"warning","message":{"text":"tunnel.getPodsByContext (cognitive 24): tunnel.getPodsByContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, loops 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/tunnel/helpers.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb5e46f032754528e838e4b9a9383f74682c08d08557fbe8679211e4959f15c"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.MakeHealthCheckFromCli (cognitive 24): specgenutil.MakeHealthCheckFromCli has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, boolean chains 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, 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":"pkg/specgenutil/specgen.go"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"230f97ebdc325b85c0a8e0fa4488d7ce91eff1f85a5e0a5d4804cf4bb9ff211e"}},{"ruleId":"D2","level":"warning","message":{"text":"util.AddPrivilegedDevices (cognitive 24): util.AddPrivilegedDevices has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, loops 6, 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":"pkg/util/utils_linux.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7611d2e3f28b76bce95541216b95fdbafca7fcbd3d926b39a1ae52e9a86370a"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.checkpoint (cognitive 23): containers.checkpoint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 5, match/switch 4, 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":"cmd/podman/containers/checkpoint.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead746e82fc0e005b69f710adab939192c33c9c6b48ed192b0d280025c323da6"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadUnitDropins (cognitive 23): main.loadUnitDropins has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, loops 8 (nesting depth added 10). Of this number, 22 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":"cmd/quadlet/main.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b59d74a289cb4f27c8f774e32eb2e147eec1f52cf37450a31f2baae9080794a"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.waitForConmonExit (cognitive 23): libpod.waitForConmonExit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, match/switch 6, 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":"libpod/container_api.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"47703ebc81f4c3565502758ff1e2f480e1ca1ab6100e7faf76d0e333c1a4ef7b"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.parseOptionIDs (cognitive 23): libpod.parseOptionIDs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, 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":"libpod/container_internal_common.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2383aa0d34257066682ce61860f6ffae2294afe58b572edf588df2c5a9bd1b73"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.getOverlayUpperAndWorkDir (cognitive 23): libpod.getOverlayUpperAndWorkDir has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 3, 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":"libpod/container_internal_common.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd579cd3e3a9a5616525d23f2d24dbf200bfc79ed0ebd9de36f778b7906ac130"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.ExecRemove (cognitive 23): Container.ExecRemove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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":"libpod/container_exec.go"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05e04073f0891d54c716787923c50c772283b9d74d65dce283d619b497dbeaf"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.addResolvConf (cognitive 23): Container.addResolvConf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 6, 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":"libpod/container_internal_common.go"},"region":{"startLine":2232}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d33115dcddd8e3467f49cb5b500ba564d5a41c022139004e6bfc4d016324c83"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.Shutdown (cognitive 23): Runtime.Shutdown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, 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":"libpod/runtime.go"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4643b3d1975124fe3a49d1c08a32877f6c798185a9d97d0a13abaf3e96cba2"}},{"ruleId":"D2","level":"warning","message":{"text":"Volume.unmount (cognitive 23): Volume.unmount has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (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":"libpod/volume_internal_common.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a4b982982e0eee030d243ea5a3fd87f1cda9e5af11aff4510ca604d8aa98a5"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.processSecrets (cognitive 23): compat.processSecrets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, 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":"pkg/api/handlers/compat/images_build.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe5d64e0008fa78ec3cc75f6c985bbed80924d64bd8ddf084314e6d36b00dcd"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.ManifestCreate (cognitive 23): libpod.ManifestCreate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"5302ca38c09331b2ae3129e1c50af61d96977656abebd9bb7c7e330bd1ac5692"}},{"ruleId":"D2","level":"warning","message":{"text":"images.processBuildResponse (cognitive 23): images.processBuildResponse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, match/switch 4, boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/images/build.go"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a22376e6a06a88d311afb1c532d08bd4b52342d4aedf00352b2694bb3a6e1f"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerRm (cognitive 23): ContainerEngine.ContainerRm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, boolean chains 3, loops 3 (nesting depth added 8). Of this number, 22 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"658252391ebeeaf359d9ab3a77aaec5d3ce5248351456d2fc7a4a8740b4a3bb0"}},{"ruleId":"D2","level":"warning","message":{"text":"tunnel.getContainersAndInputByContext (cognitive 23): tunnel.getContainersAndInputByContext has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 5, boolean chains 4 (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":"pkg/domain/infra/tunnel/helpers.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"4164478e6fa8a7cce13e427ecf7c9d0d74b8fe2e411f74eecd8e5810c498b2fb"}},{"ruleId":"D2","level":"warning","message":{"text":"define.ParseUSBs (cognitive 23): define.ParseUSBs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, match/switch 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/machine/define/usb.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d369f16e3f0381b56b1b89071689036cfefe55a5339824515bac05b7bc13fa"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.handleSetWorkingDirectory (cognitive 23): quadlet.handleSetWorkingDirectory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 3, 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":2020}}}],"partialFingerprints":{"codehealthFindingId/v1":"6957a559671de819327ee956810d25a66c1eff9814c863b23706a7259cc954bc"}},{"ruleId":"D2","level":"warning","message":{"text":"util.getAvailableIDRanges (cognitive 23): util.getAvailableIDRanges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 3, match/switch 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":"pkg/util/utils.go"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf6137aec06294e2e9ddf09f1c7d9d812b62c88c59dec41446f56c03a2d1ca9c"}},{"ruleId":"D2","level":"warning","message":{"text":"util.ParseIDMap (cognitive 23): util.ParseIDMap has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 6 (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/util/utils.go"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be1bd00c5f4a5276d4cb798b9070abf8fcce27dba9326c0dbdcbe21ac0a6cc1"}},{"ruleId":"D2","level":"warning","message":{"text":"artifact.outputTemplate (cognitive 22): artifact.outputTemplate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1, 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":"cmd/podman/artifact/list.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de819941fedc93cadf831cdd5fdf26586fc8e7f48109325b8fe66c5bdbaef00"}},{"ruleId":"D2","level":"warning","message":{"text":"common.PrepareSigning (cognitive 22): common.PrepareSigning has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into 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/podman/common/sign.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdaf17b10e2d43cda31a47e0cef46b54e0fa604b9b40c270ac75f8e8ad6626e5"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.moveConmonToCgroupAndSignal (cognitive 22): ConmonOCIRuntime.moveConmonToCgroupAndSignal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, 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":"libpod/oci_conmon_linux.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5e9c4ceea0aef0c40a217b45b6323784189d238f524d7636dce42967cf6def6"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.ResizeTTY (cognitive 22): compat.ResizeTTY has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, 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":"pkg/api/handlers/compat/resize.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff70ac5a9a91b8ef46f4d6a1912e4f20a7261d4fdb737e1c69b3e7e1b7afd15"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.InstallQuadlets (cognitive 22): libpod.InstallQuadlets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (nesting depth added 5). 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, 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":"pkg/api/handlers/libpod/quadlets.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a811e14d9934d99040f499a6cda6f2a37855f29b2e0aad4d2f0edccd035bea1"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.ManifestPush (cognitive 22): ImageEngine.ManifestPush has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b7f4135f920db24b024fded7d7f4c6963e852842d9654c85a8f45f1bc0aab9"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.playKubePVC (cognitive 22): ContainerEngine.playKubePVC has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, match/switch 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/play.go"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"617f3f74a66959cf668a5dd10a2bb6b8720c306781c7a6598eb536fb78e27b51"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.installQuadlet (cognitive 22): ContainerEngine.installQuadlet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, match/switch 1 (nesting depth added 6). Of this number, 20 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":"pkg/domain/infra/abi/quadlet.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31a81ffb7d7e6c16ad4167de269e8b19d6e733f0f9ce64c2269f900ecabda69"}},{"ruleId":"D2","level":"warning","message":{"text":"tunnel.startAndAttach (cognitive 22): tunnel.startAndAttach has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, match/switch 3, boolean chains 1 (nesting depth added 10). Of this number, 20 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d51a600deefd828282f1100f3821cd1b6ddc4f2864c1dd8bc06d20990cb7e4e"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerWait (cognitive 22): ContainerEngine.ContainerWait has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 2, match/switch 2 (nesting depth added 8). Of this number, 12 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b23a0aaf623dddae4846a75520befefc6a466dc7dbb53113309a843a9a7db73"}},{"ruleId":"D2","level":"warning","message":{"text":"sparseWriter.Write (cognitive 22): sparseWriter.Write has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 3, 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":"pkg/machine/compression/sparse_file_writer.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"448ae70fc6c3b19d7f1696cb778768a458c9ed0c6a605da18938dc87f281d11e"}},{"ruleId":"D2","level":"warning","message":{"text":"specgen.SetupUserNS (cognitive 22): specgen.SetupUserNS has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, match/switch 1 (nesting depth added 10). 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":"pkg/specgen/namespaces.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e3a7b0bff58f8e4dddb025808045d0ed2c59241855bd0599b26268102069d5"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.applyHealthCheckOverrides (cognitive 22): generate.applyHealthCheckOverrides has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"pkg/specgen/generate/container.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"50c1f32a521eefd72dd41a44aeb60afcc16676d372c44060eaaecdac29f1f252"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.VolumeFromConfigMap (cognitive 22): kube.VolumeFromConfigMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, loops 6, 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":"pkg/specgen/generate/kube/volume.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ae76796079b40cd0427cd5fea93e57b111232e46a997913a68a29d5be0b0947"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.getIOLimits (cognitive 22): specgenutil.getIOLimits has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (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/specgenutil/specgen.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eef98f8acd4949437d4e12be3dfbc63970d4248979ae97cd072ef8d9634113ae"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.getImageVolume (cognitive 22): specgenutil.getImageVolume has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, match/switch 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgenutil/volumes.go"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"66438056de9df41e0133f426b71351a56e847b12e26b03c6f0bfa4f33179713a"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.getArtifactVolume (cognitive 22): specgenutil.getArtifactVolume has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, match/switch 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgenutil/volumes.go"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"708e14feb0542a5663647e725eac74c1704dd41d2b11c0dba32b9ce0d5442366"}},{"ruleId":"D2","level":"warning","message":{"text":"systemd.IsSystemdSessionValid (cognitive 22): systemd.IsSystemdSessionValid has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, 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":"pkg/systemd/dbus.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"75eb2c331429671253318bc2145602b1b9d43e53e7e726ebfd26316077c3869d"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.PodUnits (cognitive 22): generate.PodUnits has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (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":"pkg/systemd/generate/pods.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"5372aef5d569e7be04d2004871582cf7a974e4b422964e4cfdaffd2958f3b506"}},{"ruleId":"D2","level":"warning","message":{"text":"util.parseAutoTriple (cognitive 22): util.parseAutoTriple has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 5, 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":"pkg/util/utils.go"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"0047ad98885d3c2375f12afa1015d679aa4ed700b20d5bef1ff012fe4ed8a09d"}},{"ruleId":"D2","level":"warning","message":{"text":"HyperVStubber.CreateVM (cognitive 22): HyperVStubber.CreateVM has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 2 (nesting depth added 5). Of this number, 19 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":"pkg/machine/hyperv/stubber.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f1f11c3b218ff73909b411728e263142bafda9ea46046c3b8b3f0800f7e530"}},{"ruleId":"D2","level":"warning","message":{"text":"common.AutocompleteCpCommand (cognitive 21): common.AutocompleteCpCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, loops 2 (nesting depth added 12). 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, split the body into named stages: move each independent step or branch into 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/podman/common/completion.go"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3807e809f8131593690634e28adedc7b0739ba9125163a94cd0d6db957408e0"}},{"ruleId":"D2","level":"warning","message":{"text":"common.getStructFields (cognitive 21): common.getStructFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 1, jumps 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":"cmd/podman/common/completion.go"},"region":{"startLine":1491}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0e6a7851b08a9026d3211b60682e5c1c1b72cfa7bb44cfb9817fa309782e10f"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.update (cognitive 21): containers.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (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":"cmd/podman/containers/update.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa96bcf2c5c4a9ca185bb669699ac5b42e545e04acb3be40490bbb3a8acf70c"}},{"ruleId":"D2","level":"warning","message":{"text":"system.printSystemCheckResults (cognitive 21): system.printSystemCheckResults has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 9 (nesting depth added 5). 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 into named stages: move each independent step or branch into 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/podman/system/check.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbec038a3d19790563e7e44c80e4f1e470697d81f53e38abe4c3411ff166aa70"}},{"ruleId":"D2","level":"warning","message":{"text":"system.resetMachine (cognitive 21): system.resetMachine has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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/podman/system/reset_machine.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf3236af683d645893207f90ca9b8f320e731c0065d351a076b72816d5c8b94"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.bindPorts (cognitive 21): libpod.bindPorts has cognitive complexity 21 (threshold 15). Drivers by points: loops 11, if/else 10 (nesting depth added 14). 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":"libpod/oci_util.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"837ce0f69c6fafdcd6966be5b18c4e9238ade95e091c36bb3c412fe4d1106934"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.finalizeCtrSqlite (cognitive 21): libpod.finalizeCtrSqlite has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/sqlite_state_internal.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff3f81a101c88b1f8dd4767fabe3b75d23409a4b5211e8a16a419949d8bbcd0"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.handleRestartPolicy (cognitive 21): Container.handleRestartPolicy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 1 (nesting depth added 4). 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, 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":"libpod/container_internal.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"27fca7537b8980f7c2b78bd08fcca258b8fa7604bbd51711d5abf8b10fbd7f06"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.stopInternal (cognitive 21): Container.stopInternal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"libpod/container_internal.go"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac387a26fd4de0e524eeca5a6c111b29789e8477b7f92933f4d516c89921e68"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.resetHealthCheckTimers (cognitive 21): Container.resetHealthCheckTimers 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":"libpod/container_internal.go"},"region":{"startLine":2895}}}],"partialFingerprints":{"codehealthFindingId/v1":"17964949e807406bf3db47f4b394cd84f322230d0293e4a923ec2d95d0050076"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.resolvePath (cognitive 21): Container.resolvePath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"libpod/container_path_resolution.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44ffab48a35b49bee5bb3ae2ae669d9762573cbedd163549765e2e311908107"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.RenumberLocks (cognitive 21): Runtime.RenumberLocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"libpod/runtime_renumber.go"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc48687b8f32abb63d8532e894ca5bbac109521528ae8048f0c384b51f2fcecd"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.KillContainer (cognitive 21): compat.KillContainer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 4 (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/api/handlers/compat/containers.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7ef22bdeb8cde53cd6c42ddb08771f6c9fd114ec68e217f87720cd72b48c0bf"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.CreateContainer (cognitive 21): compat.CreateContainer 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers_create.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a3a8685866c205ea9807dcd480350aba8e489d20195fe9b11e168de37ebae2"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.Connect (cognitive 21): compat.Connect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (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/api/handlers/compat/networks.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfdfe30cc376d73b2381a51a5f1d42d58d46dbde59a622b5040acf97035c4af9"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.PodStats (cognitive 21): libpod.PodStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, match/switch 3, 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/api/handlers/libpod/pods.go"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"122fa1046f29ce28797e02691bb3196edb08c5acfa0d5b5582ac81a4bf64edee"}},{"ruleId":"D2","level":"warning","message":{"text":"Connection.DoRequest (cognitive 21): Connection.DoRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/connection.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c4177a09ac219767944bed4d704427d6154004d4027ba8737325bd558caf5e"}},{"ruleId":"D2","level":"warning","message":{"text":"images.Pull (cognitive 21): images.Pull has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, match/switch 4, jumps 1, loops 1 (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":"pkg/bindings/images/pull.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"abc3176bfaa416b1c4270235db3a8f37933e20cf212765e68715783597e386fa"}},{"ruleId":"D2","level":"warning","message":{"text":"images.Push (cognitive 21): images.Push has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, match/switch 4, jumps 1, loops 1 (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":"pkg/bindings/images/push.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ed78775c061dc3e305b318329af0bf4ba1bd7d14d9eb27b022e66dc82718ad"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Prune (cognitive 21): ImageEngine.Prune has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 5, 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":"pkg/domain/infra/abi/images.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24b783f53aac3ecc95415cd3f28f13ca09679f961a93d55dea3099892c21c46"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Push (cognitive 21): ImageEngine.Push has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, match/switch 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":"pkg/domain/infra/abi/images.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45ce2cf6daf98004f11b6d5edfc1130c520109bc610daa9b11da876313629d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.KubeApply (cognitive 21): ContainerEngine.KubeApply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, match/switch 2, 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":"pkg/domain/infra/abi/apply.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"19194aee752abde1b2399aacd3a59a738998745755a3e74b6565035ad60ad0b1"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.GenerateSpec (cognitive 21): ContainerEngine.GenerateSpec has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, 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":"pkg/domain/infra/abi/generate.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb1a75044f37691d94122d733ecadeec7762861e35ca14575d22c3bf0018b42"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.VolumeInspect (cognitive 21): ContainerEngine.VolumeInspect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 3, 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":"pkg/domain/infra/abi/volumes.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"16b29520c0443711287423d2b15ba201fe97230f4159b7db1a76d578f58fd175"}},{"ruleId":"D2","level":"warning","message":{"text":"emulation.registeredBinfmtMisc (cognitive 21): emulation.registeredBinfmtMisc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 3, match/switch 2 (nesting depth added 6). 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 26). 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/emulation/binfmtmisc_linux.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b72bd3829cde80a47a63f4ec4659eea5ea0c80373cba957d3030c6f369bd83"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.getPodPorts (cognitive 21): kube.getPodPorts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16, loops 3, 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":"pkg/specgen/generate/kube/kube.go"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca3f88848779607be244463a170cb3695bd2acfaf6a6c1936cd5454fa5e76777"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.CreatePortBindings (cognitive 21): specgenutil.CreatePortBindings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, match/switch 6, 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/specgenutil/util.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"675d9b6fc0773e673d778865487ca022cc379f93baeff398bb148acbabddf1fe"}},{"ruleId":"D2","level":"warning","message":{"text":"trust.loadAndMergeConfig (cognitive 21): trust.loadAndMergeConfig 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":"pkg/trust/registries.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd96546164bd6b35efb9dde68638d8157b17758d9b31832600c8acc1f6f7f67"}},{"ruleId":"D2","level":"warning","message":{"text":"HyperVStubber.SetProviderAttrs (cognitive 21): HyperVStubber.SetProviderAttrs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2 (nesting depth added 5). Of this number, 17 points are the body\u0027s own statements and 4 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":"pkg/machine/hyperv/stubber.go"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c189987cb7d68b391b1c9d6305a626bc605ace79295231974de9f1e7914cad"}},{"ruleId":"D2","level":"warning","message":{"text":"images.load (cognitive 20): images.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/images/load.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0aa368a5e4856bfd2e0494ca514ec458d614c37429485995b417ed043339f17"}},{"ruleId":"D2","level":"warning","message":{"text":"images.save (cognitive 20): images.save has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 2 (nesting depth added 8). 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":"cmd/podman/images/save.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"34aaf623df21e8e08d3965b9a5d4524b61fd2fe70999d1083ca885f84a489ab4"}},{"ruleId":"D2","level":"warning","message":{"text":"machine.ssh (cognitive 20): machine.ssh has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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":"cmd/podman/machine/ssh.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"143d613ba36a7ae12295a185a6c90ecdb5f3b4b78ae1c3b8b21e4ea0fb76bc1d"}},{"ruleId":"D2","level":"warning","message":{"text":"system.eventsCmd (cognitive 20): system.eventsCmd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1, 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/podman/system/events.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"4706e5b768e1968bdb3e5ba1ab6432c3f9c19b8b6a6ce03f9c659a9ac7241810"}},{"ruleId":"D2","level":"warning","message":{"text":"system.prune (cognitive 20): system.prune has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, 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/podman/system/prune.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"419433e12bdc8251245237afb6712f4d504c36128d2eec1f4889ca45420e76e2"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.generateInspectContainerConfig (cognitive 20): Container.generateInspectContainerConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 9 (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":"libpod/container_inspect.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6036add1f7e62a85397bcfacdbb7faf1e96163057e2c71ce9494605cb06417bd"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.PruneVolumes (cognitive 20): Runtime.PruneVolumes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, 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":"libpod/runtime_volume.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"35ada5ade534de5d97cdf1021f82bff4455b2801f9b31559b647450ea87c0d58"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.ExecCreateHandler (cognitive 20): compat.ExecCreateHandler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, 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":"pkg/api/handlers/compat/exec.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4604f1eb2e16def4ce499885fd8062a5b311ea7e84cd7f4fc7afa7699d7a46f"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.CreateVolume (cognitive 20): compat.CreateVolume has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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, 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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba91b158b3862524c4efa95dd0bf9daca5d64d37053e9a2bed7e69d857e4f506"}},{"ruleId":"D2","level":"warning","message":{"text":"crutils.CRCreateRootFsDiffTar (cognitive 20): crutils.CRCreateRootFsDiffTar has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, 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":"pkg/checkpoint/crutils/checkpoint_restore_utils.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"373ee61fd96e60007816c30475232e531c1c23440ebd35ebb96eee5259f4a0c4"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerCheckpoint (cognitive 20): ContainerEngine.ContainerCheckpoint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, 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":"pkg/domain/infra/tunnel/containers.go"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f78d2186aae6777ccad82391a8f4596f07cfa11f965614248a7dcc773a2eb39"}},{"ruleId":"D2","level":"warning","message":{"text":"shim.Remove (cognitive 20): shim.Remove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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":"pkg/machine/shim/host.go"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac0bcf607588f5d1f82bc72f9a1d24a79ec98d5ce55921cf835168106ce0380b"}},{"ruleId":"D2","level":"warning","message":{"text":"MachineConfig.Remove (cognitive 20): MachineConfig.Remove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 2). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 187). 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/machine/vmconfigs/machine.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b0521a811d325f20b10165b24114ad3dbccbee9aacd4b46795eed69a897902"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.GetResources (cognitive 20): specgenutil.GetResources has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgenutil/specgen.go"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a1a90f047ad6509abe4b3bcc79d2d4d0afffef06de5f1af9653642af39e49e"}},{"ruleId":"D2","level":"warning","message":{"text":"specgenutil.parseSplitPort (cognitive 20): specgenutil.parseSplitPort has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (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":"pkg/specgenutil/util.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"8659a63b0d2ed718d34c2f26a3c9654660481b2432cfaa37669a682e480e66b6"}},{"ruleId":"D2","level":"warning","message":{"text":"UnitFile.Parse (cognitive 20): UnitFile.Parse 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":"pkg/systemd/parser/unitfile.go"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"345396ac6313813ee5b70937b1229095cdc842e8a8f6c2cb8f4c770bb069dd74"}},{"ruleId":"D2","level":"warning","message":{"text":"util.GetAutoOptions (cognitive 20): util.GetAutoOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, match/switch 2, 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":"pkg/util/utils.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e1653bf70d823fd2217eb34bcd10d003490b771dd5462fe306af0b3e5313302"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.stop (cognitive 19): containers.stop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 2, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/stop.go"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e57534c72aca40d77c217761212050e246ed84522412394695394b116ed2a41"}},{"ruleId":"D2","level":"warning","message":{"text":"farm.build (cognitive 19): farm.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 3). Of this number, 17 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":"cmd/podman/farm/build.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4387752896193d4080e63a0b87f3ad0feac0e9cb323b7711c5a5a13ddc3ce7c"}},{"ruleId":"D2","level":"warning","message":{"text":"images.build (cognitive 19): images.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 7). Of this number, 17 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":"cmd/podman/images/build.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"db79666a89990992a2b064d4c16645403098e9b58c13f01bbe733120e7dcd4ec"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.printPlayReport (cognitive 19): kube.printPlayReport has cognitive complexity 19 (threshold 15). Drivers by points: loops 10, if/else 7, match/switch 2 (nesting depth added 7). 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/podman/kube/play.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd769a0bfad34adf152209505d2ecb38fa5556e14a55d79838a72c854848247"}},{"ruleId":"D2","level":"warning","message":{"text":"machine.inspect (cognitive 19): machine.inspect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 1, 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":"cmd/podman/machine/inspect.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f31d4884d980a4f66b4debe78878b45abeb2bb9de56e2db86323ca30be0fde"}},{"ruleId":"D2","level":"warning","message":{"text":"manifest.annotate (cognitive 19): manifest.annotate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/manifest/annotate.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce6c2f68e9496077f073e1937959e7c515ea24c064db8591a1fe963c21743aa"}},{"ruleId":"D2","level":"warning","message":{"text":"connection.inspect (cognitive 19): connection.inspect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 1, match/switch 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/podman/system/connection/list.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"0647d9a3f249487550085ed4372ed657cb4ee7f55bc49fd178fefdfa63b08457"}},{"ruleId":"D2","level":"warning","message":{"text":"volumes.rm (cognitive 19): volumes.rm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, 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/podman/volumes/rm.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2cf8ded423fc7c28e0180692d80bf6949ecf8a9bccf860da1ec3a476d6b099"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.refresh (cognitive 19): Container.refresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"libpod/container_internal.go"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"e49d805d78add810185f76f7200ba8d9a50ef475af3ae110dc99eccd13a67bc9"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.prepareToStart (cognitive 19): Container.prepareToStart has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 6). Of this number, 16 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":"libpod/container_internal.go"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4d5f505392358226dbe2d374afdccd56ffd69602a446ef01123f17b60f0805"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.addRootPropagation (cognitive 19): Container.addRootPropagation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, loops 3, match/switch 3, 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":"libpod/container_internal_linux.go"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"49932b41b3ad7c882e670804354fea2790d027b7503d784adde4a2c2af90cd3c"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.GenerateForKube (cognitive 19): Pod.GenerateForKube has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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":"libpod/kube.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff389564539a4ad53558c16f09138b138f375c33ad37a0a2ccdafdf7bc564848"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.configureNetNS (cognitive 19): Runtime.configureNetNS has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 5). Of this number, 13 points are the body\u0027s own statements and 6 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":"libpod/networking_linux.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"effff26a7afca9f43fc4c71e2e7b5f43e04bce3e377bde4bcf0cfe4aa5fb82c7"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.AddPod (cognitive 19): SQLiteState.AddPod has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 3). Of this number, 16 points are the body\u0027s own statements and 3 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":"libpod/sqlite_state.go"},"region":{"startLine":1656}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd67ed00ab2023ef0b1b9539b54fcb0b08d9fdf3bf6dcccea0370710b11845e"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.RemovePod (cognitive 19): SQLiteState.RemovePod has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 2). Of this number, 14 points are the body\u0027s own statements and 5 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":"libpod/sqlite_state.go"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dd8933555aa66c342b54ae6afa56a7705dea12c66822d2088ec4ae766ef777"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.KubePlay (cognitive 19): libpod.KubePlay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 3). 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, 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":"pkg/api/handlers/libpod/kube.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f28d715b0795989973fa0bbe01d9b317c65d1c218dfe477bb48e09c27a6571"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerInspect (cognitive 19): ContainerEngine.ContainerInspect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"5343d58fee2ea269f690d5e74a95504852240f850a0e74ed91d2b648174dafe0"}},{"ruleId":"D2","level":"warning","message":{"text":"ocipull.GetDiskArtifactReference (cognitive 19): ocipull.GetDiskArtifactReference has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"pkg/machine/ocipull/source.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"74bf9e43325f05d233b4cd571cab9c79bed6751eef8e74aa7e6862b80853213b"}},{"ruleId":"D2","level":"warning","message":{"text":"specgen.parseBridgeNetworkOptions (cognitive 19): specgen.parseBridgeNetworkOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, 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":"pkg/specgen/namespaces.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"7edc8ee01da804786a51cdc358d211e2a415780105e69c2efcc1809fb817ab8e"}},{"ruleId":"D2","level":"warning","message":{"text":"common.getPathCompletion (cognitive 18): common.getPathCompletion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, 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/podman/common/completion.go"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"aefb14dbf5f1ddd64113e1711246977ee947d067ceb78bb36cb29c1f640351f0"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.removeContainers (cognitive 18): containers.removeContainers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, match/switch 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/rm.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a765c787461fd901177a9540adbb6062135b921c33244d3aa32fbfdbf312ea0"}},{"ruleId":"D2","level":"warning","message":{"text":"parse.parseEnvOrLabel (cognitive 18): parse.parseEnvOrLabel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, 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":"cmd/podman/parse/net.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2e0ffd8e15c3f77390461c3bbf97a26578ab6e572b77f89c3037d774cfabf5"}},{"ruleId":"D2","level":"warning","message":{"text":"registry.NewContainerEngine (cognitive 18): registry.NewContainerEngine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 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":"cmd/podman/registry/registry.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"7433e657294939a4d4cabc72dcba2012fabb11485d54d89575a3564e0fce4fd5"}},{"ruleId":"D2","level":"warning","message":{"text":"secrets.inspect (cognitive 18): secrets.inspect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, 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":"cmd/podman/secrets/inspect.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f457d4cdc124fd3d266d9679bf1b7db55371e73cc7408b0384c5d073b1d9a3b"}},{"ruleId":"D2","level":"warning","message":{"text":"main.exposePorts (cognitive 18): main.exposePorts has cognitive complexity 18 (threshold 15). Drivers by points: loops 10, if/else 8 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/rootlessport/main.go"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"c71d40712cd8c68d764a23f5b89f57eedd7a2adffe79f398931045c8f5edfbd3"}},{"ruleId":"D2","level":"warning","message":{"text":"localapi.FindMachineByPort (cognitive 18): localapi.FindMachineByPort has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"internal/localapi/utils.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"d33c9e34fbdfefcd7837032ef8a50bc06877f22f01a12758337654adefb82b33"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.newConmonOCIRuntime (cognitive 18): libpod.newConmonOCIRuntime has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"libpod/oci_conmon_common.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b491045d03cdbe16809c90c645df94a3322bd2fe74f1e728c4292925d81d43"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.WithStorageConfig (cognitive 18): libpod.WithStorageConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 4). 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 41). 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":"libpod/options.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"d385a70ee46915f3cf86bd67e52c2ba50b597065196accfa9f8323c3ccf19f14"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.NetworkMode (cognitive 18): Container.NetworkMode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 3, match/switch 1 (nesting depth added 11). 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":"libpod/container.go"},"region":{"startLine":1441}}}],"partialFingerprints":{"codehealthFindingId/v1":"12994b20bb85cf749daab44a8db33dba6618b9d41ad2b4e7c11a649c8e56f505"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.setupStorageMapping (cognitive 18): Container.setupStorageMapping has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, loops 7, 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":"libpod/container_internal.go"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaaffad1ac1dc246820ba60ff23883ee14e71db5d5fb8430c52477d3e550e41d"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.sharedConmonArgs (cognitive 18): ConmonOCIRuntime.sharedConmonArgs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_common.go"},"region":{"startLine":1299}}}],"partialFingerprints":{"codehealthFindingId/v1":"f971959614066374f5e3b9dc758f04d03dc413827876f33f4206e310a7fc4555"}},{"ruleId":"D2","level":"warning","message":{"text":"storageService.CreateContainerStorage (cognitive 18): storageService.CreateContainerStorage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 5). Of this number, 15 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":"libpod/storage.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfb40e8fef6f9b61cceca4250317c9f44cd412d1a49feef5cf3270abffbfd57"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.Restore (cognitive 18): libpod.Restore has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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/api/handlers/libpod/containers.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"e541ec82645ee398f04f5fdf5839cb3b8ae620ead74e20d67280b364c60ebe84"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.Logs (cognitive 18): containers.Logs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, 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":"pkg/bindings/containers/logs.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"703ca5afd458a1736e56556181110c9942664c7de2240f45cbdd7deacbb1e56e"}},{"ruleId":"D2","level":"warning","message":{"text":"manifests.Push (cognitive 18): manifests.Push has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, match/switch 4, loops 1 (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":"pkg/bindings/manifests/manifests.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"0742779e65e60c2e941ee0677cc3291b8d5dc3085d9a39b2d5f7c25862e6a830"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.digestFromDigestOrManifestListMember (cognitive 18): ImageEngine.digestFromDigestOrManifestListMember has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a9013305e4fb59d26bb335c03807f97e6386e9554d0b5ee32fa42c436cf24d"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.SecretRm (cognitive 18): ContainerEngine.SecretRm has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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/domain/infra/tunnel/secrets.go"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f0bff50f1e38eb23ffa0bf793b63d67769051fef45d47ed574656cd75f3a92"}},{"ruleId":"D2","level":"warning","message":{"text":"QEMUStubber.stopLocked (cognitive 18): QEMUStubber.stopLocked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 4). Of this number, 15 points are the body\u0027s own statements and 3 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":"pkg/machine/qemu/machine.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f5a8dc753a1489f5d7242caad83f3621fbf6474284d8f83a6ca4526df81978"}},{"ruleId":"D2","level":"warning","message":{"text":"QEMUStubber.StartVM (cognitive 18): QEMUStubber.StartVM has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2 (nesting depth added 3). Of this number, 14 points are the body\u0027s own statements and 4 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":"pkg/machine/qemu/stubber.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b8861c967f5893c4156656d5fe0a4f70d8ece0b18b48c581c09dcaff4970ce"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.BlockAccessToKernelFilesystems (cognitive 18): generate.BlockAccessToKernelFilesystems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 5, 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":"pkg/specgen/generate/config_linux.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8051c323c7ffcaa18efb4f92b2a83192187328b83d1328cfd1a718e2d13970"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.getSeccompConfig (cognitive 18): generate.getSeccompConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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/specgen/generate/config_linux_seccomp.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e4f03132d3f37ee4cec0328690105e7ad7f6119b757ca9d55e46636f4c5268"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.CheckName (cognitive 18): generate.CheckName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1, 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":"pkg/specgen/generate/container.go"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d58becc7c0d3266ddb3e26f5b43c4b31b038d7b8fdb1738e7849af2d5dfc2cb"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.envVarsFrom (cognitive 18): kube.envVarsFrom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 5, boolean chains 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/specgen/generate/kube/kube.go"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"da36ebecdd5ba683395f149f4f6beaa84867518b607a82c8674f678373c0ca9b"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.ConvertBuild (cognitive 18): quadlet.ConvertBuild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 1 (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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1414}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60afd79a50fe2b207b8c3064f189ced3585af00f9a72e429b5349a5a70c61fe"}},{"ruleId":"D2","level":"warning","message":{"text":"main.parseCommands (cognitive 17): main.parseCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, match/switch 4, boolean chains 1, 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/podman/main.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0483f5043e9bf1f6c2d4ff75c7521a7918c91e83e6f569ac4a668cc2c19564bd"}},{"ruleId":"D2","level":"warning","message":{"text":"network.networkRm (cognitive 17): network.networkRm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 4, 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/podman/networks/rm.go"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13b604d47d9b0f98056ca013823dec88d54d147645ed1ea0d8e87866ebdceb6"}},{"ruleId":"D2","level":"warning","message":{"text":"pods.removePods (cognitive 17): pods.removePods has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (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/podman/pods/rm.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"412bbdee762b3c4ed7c5807b3bc3ab2af6fa3cc61433a492525f7cf65bf24c00"}},{"ruleId":"D2","level":"warning","message":{"text":"registry.setXdgDirs (cognitive 17): registry.setXdgDirs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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/podman/registry/config.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f491403da1eafab124a4a825c10c5bffb5dbe0097776118a7ce4d5070bfdfc"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.bindPort (cognitive 17): libpod.bindPort has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, 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":"libpod/oci_util.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"50016a720998120b828464b7d6c9404ba26961c3c5eb25fa32177391937400d7"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.Unmount (cognitive 17): Container.Unmount has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"libpod/container_api.go"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"660b3307f1ec034401571f99df31f9aa5e4d6d589d05f030aa816b84426d9137"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.removeAllExecSessions (cognitive 17): Container.removeAllExecSessions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"libpod/container_exec.go"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"912dffc319bab05ba71287944520664b407eabd64534e2beae2ccea06533623c"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.resolveWorkDir (cognitive 17): Container.resolveWorkDir 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":"libpod/container_internal_common.go"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7af8655953c98af0b09d2a55a3bd5324e2dfbc4ef85abad40647dd88e6dfe8"}},{"ruleId":"D2","level":"warning","message":{"text":"ConmonOCIRuntime.ExecStopContainer (cognitive 17): ConmonOCIRuntime.ExecStopContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61927aa9fbc4e8db53b1c30c70f7140e77b2b6fba3c238c6b5a767df33790d6"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.maybeStopServiceContainer (cognitive 17): Pod.maybeStopServiceContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 160). 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":"libpod/service.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49c652cc8fab1a39e8794f0f7d5dadbf5baa20b4aa28db5023b99b09dd205b4"}},{"ruleId":"D2","level":"warning","message":{"text":"Runtime.stopPauseProcess (cognitive 17): Runtime.stopPauseProcess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"libpod/runtime_migrate_linux.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa57a4b342e277302ea45d161d809430ee675ac9978cb3d8b5a1f6eaa3b9f6eb"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.AddVolume (cognitive 17): SQLiteState.AddVolume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 2). Of this number, 14 points are the body\u0027s own statements and 3 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":"libpod/sqlite_state.go"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57a2d367155e4d380170b68d7a55b817ac9c43c198f82a30285bef6be6ca5e1"}},{"ruleId":"D2","level":"warning","message":{"text":"Volume.mount (cognitive 17): Volume.mount has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, match/switch 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":"libpod/volume_internal_common.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"15df1819c1abc756f8654353a43b037bd00ece52fd3c9cb2b598d9bff6e095ed"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.ListVolumes (cognitive 17): compat.ListVolumes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0365351d2f0e2f94c76e9817d8c21136c9e06e56defc1d2a51686f9418adaa0"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.CreateContainer (cognitive 17): libpod.CreateContainer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 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":"pkg/api/handlers/libpod/containers_create.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa97e2de4a83c3fc9624deb2201d91c02aee0573fddebead46a7f52c1aa4f35"}},{"ruleId":"D2","level":"warning","message":{"text":"bindings.tcpClient (cognitive 17): bindings.tcpClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/connection.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84cf4481bb1429d45bba3f156c791dfe271416d2399a615ef2f35c8c1ed037f"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.setUpClusterClient (cognitive 17): abi.setUpClusterClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4 (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":"pkg/domain/infra/abi/apply.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23291eab10880293b1165698b37f5f29daef82a4bb0c7c3109dfbf9d287865e"}},{"ruleId":"D2","level":"warning","message":{"text":"abi.parseMultiQuadletFile (cognitive 17): abi.parseMultiQuadletFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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":"pkg/domain/infra/abi/quadlet.go"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86072dd467efb35bd2f3f34b5dfb6b6817900512c5f55eac00e8279708a7771"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.ContainerStats (cognitive 17): ContainerEngine.ContainerStats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 3, match/switch 2, jumps 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1692, 1673). 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/domain/infra/abi/containers.go"},"region":{"startLine":1663}}}],"partialFingerprints":{"codehealthFindingId/v1":"274e19d4e518be40884102cb4e9a5edca420bc24e005684de5fc167114cf702f"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Save (cognitive 17): ImageEngine.Save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, boolean chains 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":"pkg/domain/infra/tunnel/images.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f3e2688fe585b17ba877cc325fbceaf9ee00412e13ec9608a2759e52c1da48"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.Build (cognitive 17): ImageEngine.Build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 4 (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":"pkg/domain/infra/tunnel/images.go"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd66a9edbc412c79165afc7d03628e4f9d36bd52867928ec0b06657e2ee426d1"}},{"ruleId":"D2","level":"warning","message":{"text":"env.parseEnv (cognitive 17): env.parseEnv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"pkg/env/env.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"c95af45ba62263caf3488b088fbe4c6b06a4e10651ef5f97fe5bac9bceefc802"}},{"ruleId":"D2","level":"warning","message":{"text":"machine.WaitAPIAndPrintInfo (cognitive 17): machine.WaitAPIAndPrintInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 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":"pkg/machine/machine_common.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0e0ca9e4ca46107428a3d786015ad9eddbda76d6f28e7715dd43ab2de85ffb"}},{"ruleId":"D2","level":"warning","message":{"text":"DynamicIgnition.GenerateIgnitionConfig (cognitive 17): DynamicIgnition.GenerateIgnitionConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"pkg/machine/ignition/ignition.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"2646b8b3fd1d2a8321d0299a4013cfa04a2ae8571433dc6d416c4c2539e9b429"}},{"ruleId":"D2","level":"warning","message":{"text":"generate.createPodOptions (cognitive 17): generate.createPodOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3 (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":"pkg/specgen/generate/pod_create.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"587b8e617753c5df496abe51d6e6492d36ac14d50fac47cd70b0d3578e66c8fa"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.VolumeFromSecret (cognitive 17): kube.VolumeFromSecret has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 4, 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":"pkg/specgen/generate/kube/volume.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"748775167a48da7cbd212f4abb8cdb2636dfdcf0e12a6a6f8b7762d067f714b9"}},{"ruleId":"D2","level":"warning","message":{"text":"quadlet.ConvertNetwork (cognitive 17): quadlet.ConvertNetwork 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":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"c543fabea83c847f94a21a303caa56cf082a5cc827a8b2dad905a6c00dc7dd79"}},{"ruleId":"D2","level":"warning","message":{"text":"util.FiltersFromRequest (cognitive 17): util.FiltersFromRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 8 (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/util/filters.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ffabba031999da6314e7105f7bbdc4fef49625ee1936821aaeb38c4c3e4ebb"}},{"ruleId":"D2","level":"warning","message":{"text":"wutil.matchOutputLine (cognitive 17): wutil.matchOutputLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, loops 7 (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":"pkg/machine/wsl/wutil/wutil.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f590769fb87bceb5153fcbec703e8ce8cfca27c2f6669e9d7ae795409c70f7a5"}},{"ruleId":"D2","level":"warning","message":{"text":"artifact.artifactPush (cognitive 16): artifact.artifactPush has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (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/podman/artifact/push.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a998d3fd4e0b509461a30a1759cd9e02924e8ac3a4f61889ef2965243c5d09"}},{"ruleId":"D2","level":"warning","message":{"text":"common.GetHealthCheckOverrideConfig (cognitive 16): common.GetHealthCheckOverrideConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (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":"cmd/podman/common/create.go"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"048ed1e2ca25a8e894e6b2330b00c8c54825ebeb17c4526e334256b46fcf3a2f"}},{"ruleId":"D2","level":"warning","message":{"text":"containers.copyContainerToContainer (cognitive 16): containers.copyContainerToContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4. Of this number, 9 points are the body\u0027s own statements and 7 belong to 2 function literals inside it that branch. 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/podman/containers/cp.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0c07424ac6c0c5d1b182396b863eae6deea90fd878e41be7cf216f5c5ec456"}},{"ruleId":"D2","level":"warning","message":{"text":"farm.rm (cognitive 16): farm.rm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, boolean chains 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 47). 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/podman/farm/remove.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"5941587fb8865966e4bb0d9911bae707f33903c0a6542c9d6fdd6564bcb00343"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.teardown (cognitive 16): kube.teardown has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 8, if/else 4, loops 4 (nesting depth added 4). 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/podman/kube/play.go"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2501a82440fe8dbe170c4e1d343f4d4f3e12e2ad1d13a3a33748f1ddbfbb152"}},{"ruleId":"D2","level":"warning","message":{"text":"machine.hostInfo (cognitive 16): machine.hostInfo 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":"cmd/podman/machine/info.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"744cdefaa3f4d355a0d9869e22f468cfb9d6564bed593b3602baf420a2271a6e"}},{"ruleId":"D2","level":"warning","message":{"text":"system.reset (cognitive 16): system.reset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"cmd/podman/system/reset.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6517593f1741dba73ee8609be3204f56fcb50c7499ac37c9ea61dc6b8afc98"}},{"ruleId":"D2","level":"warning","message":{"text":"main.loadUnitsFromDir (cognitive 16): main.loadUnitsFromDir 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":"cmd/quadlet/main.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d93e58f28327d3dec0cbba6828a5522ef4d1c1f639a8081c123344c19287de4"}},{"ruleId":"D2","level":"warning","message":{"text":"registry.StartWithOptions (cognitive 16): registry.StartWithOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"hack/podman-registry-go/registry.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da6efa6a9bd087534fbc23617940af30673321988a31c0533e40c54239257ec"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.parseIDMapMountOption (cognitive 16): libpod.parseIDMapMountOption has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 4, match/switch 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":"libpod/container_internal_common.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b32cd58a6d2edc7d6e78f45bf5e5f6776ce1687fc9f7cf00d2109bad8d07889"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.readStdio (cognitive 16): libpod.readStdio has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, 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":"libpod/oci_conmon_attach_common.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a82d4873dedf591c4c257aca94d834a9fda6b2c610d26f969c991475e1e7f4"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.cGroupPath (cognitive 16): Container.cGroupPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, match/switch 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":"libpod/container.go"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"291e1b89d204e36fb88e0fd52e410d96e6c9cf04353774b7b67eb4d642db242b"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.syncContainer (cognitive 16): Container.syncContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"libpod/container_internal.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8960a0dc5d0dfbf7a4af509d79034c12851574fa5a35508eb7675c64731556f"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.unpause (cognitive 16): Container.unpause has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4 (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":"libpod/container_internal.go"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"42556248cd1b079783f06b41fd2130e7609904a939fdc8e4b1dc03a2205ec8b7"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.setupSystemd (cognitive 16): Container.setupSystemd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (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":"libpod/container_internal_linux.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2bcabe9f4186bdc3241ad4683cdca1189d578e908a85c47acd3899b19ca95cc"}},{"ruleId":"D2","level":"warning","message":{"text":"Container.newContainerEventWithInspectData (cognitive 16): Container.newContainerEventWithInspectData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 7). Of this number, 12 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":"libpod/events.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"af344c7ec372e031451849a76e6b64e0daa7465937dbf725d67eafd9f68232c3"}},{"ruleId":"D2","level":"warning","message":{"text":"Pod.maybeRemoveServiceContainer (cognitive 16): Pod.maybeRemoveServiceContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 273). 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":"libpod/service.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ffad744a0d889a17ed91792a545d6dcd9e581c4faa3392b80413ba90042c528"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.RemoveVolume (cognitive 16): SQLiteState.RemoveVolume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, loops 1 (nesting depth added 2). 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: 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":"libpod/sqlite_state.go"},"region":{"startLine":2069}}}],"partialFingerprints":{"codehealthFindingId/v1":"d437da45ea35d0a2f121fc435e9638e4c6db0dccda9265f4049e786de0aa24ba"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.removeContainerWithTx (cognitive 16): SQLiteState.removeContainerWithTx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 6). 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 534). 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":"libpod/sqlite_state_internal.go"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0bba581a3551da8665ad44cb545df4d8569236fbf124f9b5b2d5f03e0dfece3"}},{"ruleId":"D2","level":"warning","message":{"text":"SQLiteState.networkModify (cognitive 16): SQLiteState.networkModify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 6, match/switch 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":"libpod/sqlite_state_internal.go"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"54381d154b01e20f0bd4d24d8aa261093edac970491bf3ca3b76c16e1b8df13f"}},{"ruleId":"D2","level":"warning","message":{"text":"compat.StopContainer (cognitive 16): compat.StopContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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, 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":"pkg/api/handlers/compat/containers_stop.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45818a6488a2acf9ab2d34416d9b4b54439650a661c186219c325ee1bc63b28"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.PullArtifact (cognitive 16): libpod.PullArtifact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"pkg/api/handlers/libpod/artifacts.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"2084ec98f9e24d68cd040fc87d12830bf2718319add381d1a681af58e6aaacc3"}},{"ruleId":"D2","level":"warning","message":{"text":"libpod.ExportImages (cognitive 16): libpod.ExportImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, boolean chains 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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"d888f95013a9ff9898d06710f6a3dca3a4e69661202ec7a9058fdc58e57830af"}},{"ruleId":"D2","level":"warning","message":{"text":"kube.PlayWithBody (cognitive 16): kube.PlayWithBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/kube/kube.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"fade2acdfb6237c5eca18fac668a29f93d268ff93aad6f4b65a0d0219b7c89a6"}},{"ruleId":"D2","level":"warning","message":{"text":"entities.ToPodSpecGen (cognitive 16): entities.ToPodSpecGen 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":"pkg/domain/entities/pods.go"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b12b5c2b74238b972949bb19050f6f21109b92acee2c7685405734462b3bbb"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageEngine.ArtifactRm (cognitive 16): ImageEngine.ArtifactRm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, 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":"pkg/domain/infra/abi/artifact.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e0fe285a9683c6bc8d724e06d1965875735f209203d69da73d1169577448f7"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.PodPs (cognitive 16): ContainerEngine.PodPs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 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":"pkg/domain/infra/abi/pods.go"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"611248343f756932953131acc38006a428f69287eb83fba36955106245ff9a92"}},{"ruleId":"D2","level":"warning","message":{"text":"ContainerEngine.PodInspect (cognitive 16): ContainerEngine.PodInspect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"pkg/domain/infra/abi/pods.go"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac68b473dde32cf68ac4cb446bb0b6bbd6afb104a4ed95766a57ad14f68e0be0"}},{"ruleId":"D2","level":"warning","message":{"text":"OSTree.Upgrade (cognitive 16): OSTree.Upgrade has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 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":"pkg/machine/os/ostree.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3dcbcd85d1a432bd5c82e423511ea673bd707fb61f9cb9007cf3c6019c85294"}},{"ruleId":"D2","level":"warning","message":{"text":"UsernsMode.GetKeepIDOptions (cognitive 16): UsernsMode.GetKeepIDOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 2, 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":"pkg/namespaces/namespaces.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"77465d6568d967394d0274fff243f3cc1e21f413de22e8ba22d119e1afcb92c8"}},{"ruleId":"D2","level":"warning","message":{"text":"trust.descriptionsOfPolicyRequirements (cognitive 16): trust.descriptionsOfPolicyRequirements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, 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":"pkg/trust/trust.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fcdf7f7f3132b0ee252116be7c9d540e58ff89804ae2645dc494cdb1d406e17"}},{"ruleId":"D2","level":"warning","message":{"text":"util.fillIDMap (cognitive 16): util.fillIDMap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, 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":"pkg/util/utils.go"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c154293c1bc4aef52b1f628fec68e3ce3f5d468fbaa169de995da1635509109"}},{"ruleId":"D2","level":"warning","message":{"text":"WSLStubber.SetProviderAttrs (cognitive 16): WSLStubber.SetProviderAttrs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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":"pkg/machine/wsl/stubber.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec5e46b487498b91d3bee2dabdcf035a3ed88b39b6e4b7532f32dba3eaf7510"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): libpod/oci_conmon_common.go:652-670 | libpod/oci_conmon_exec_common.go:659-677 \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 \u0060libpod/oci_conmon_common.go:652\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":"libpod/oci_conmon_common.go"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f65b931f50ba4e5dc8efb8320d61cfda7e208e96695e1d4dfad946188d5a54c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): libpod/boltdb_state_internal.go:222-241 | libpod/sqlite_state_internal.go:300-318 \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 \u0060libpod/boltdb_state_internal.go:222\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":"libpod/boltdb_state_internal.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae32a3d2c199111ecfdd09d3f03cf80ac0ed3dde01fbd046b4b9e60aa5c3cff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): libpod/container_exec.go:370-388 | libpod/container_exec.go:554-571 \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 \u0060libpod/container_exec.go:370\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":"libpod/container_exec.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c045864bdb6489bc15e8f99ca13cc650a7b690878ec2d81a84654ceb568714"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/podman/artifact/push.go:139-154 | cmd/podman/images/push.go:168-183 \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/podman/artifact/push.go:139\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/podman/artifact/push.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd1def1a10c09f99ac2fec034ca69c43ebd5218dd696572c2189da762778287"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): libpod/oci_conmon_common.go:621-636 | libpod/oci_conmon_exec_common.go:636-651 \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 \u0060libpod/oci_conmon_common.go:621\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":"libpod/oci_conmon_common.go"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"86a33ea00a663cd6c2db88c1ad7697c8042a22808c2291684668e5758d747832"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pkg/bindings/manifests/manifests.go:81-96 | pkg/bindings/manifests/manifests.go:119-134 \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/bindings/manifests/manifests.go:81\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/bindings/manifests/manifests.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3eda8493e5d06990a00980327f4b38142c9bee12f8f82f8e7aaab67fcc3d1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): pkg/machine/hyperv/hutil.go:62-77 | pkg/machine/hyperv/hutil.go:97-112 \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/machine/hyperv/hutil.go:62\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/machine/hyperv/hutil.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb3ba3e07ff945f1ca55a0a774f9d04b1509eab7baa847496fc561e525af1016"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): libpod/pod_api.go:278-292 | libpod/pod_api.go:339-353 | libpod/pod_api.go:395-409 | libpod/pod_api.go:508-522 \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 \u0060libpod/pod_api.go:278\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":"libpod/pod_api.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1059555397bc190c76fcbe1bc53e446f9b4dbc37e1c69a91a5cac1e02827f46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/podman/system/info.go:103-117 | cmd/podman/machine/info.go:74-88 \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. 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/podman/system/info.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"1996c051eda80a85b3cb159974fc20bb021d1588509018619ddf05a07f493fa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): libpod/container_api.go:175-189 | libpod/container_internal.go:1259-1273 \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 \u0060libpod/container_api.go:175\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":"libpod/container_api.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfe7d59eb51d63e48b453d220d5e1a9dd8aa086a5a18b15da5ecd29852f22100"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): libpod/container_graph.go:489-503 | libpod/container_graph.go:561-576 \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":"libpod/container_graph.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"3532671e30a27d9b32dfacdbaab597f9c8af88af09f9aa85cbf9c5c44ffc6d53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): libpod/service.go:146-160 | libpod/service.go:259-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 \u0060libpod/service.go:146\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":"libpod/service.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eeaffebbf374cb1d8319c7d25ba7264e6b5aa1fe52474f3b67109fe6ca862ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): libpod/sqlite_state.go:1560-1574 | libpod/sqlite_state.go:1601-1615 \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 \u0060libpod/sqlite_state.go:1560\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":"libpod/sqlite_state.go"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"0707386cfa433b4edc5702c0addc92eadb77155e980c8e37059c8047c2416594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/bindings/containers/attach.go:189-203 | pkg/bindings/containers/attach.go:497-511 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/bindings/containers/attach.go:189\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/bindings/containers/attach.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"a906fb574816a81c415a4237bc03b07c055aefe90345c961e214431a2b8220cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/systemd/generate/containers.go:290-304 | pkg/systemd/generate/pods.go:275-289 \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 \u0060pkg/systemd/generate/containers.go:290\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":"pkg/systemd/generate/containers.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7294130ef80637b48e7201fc3cbe8bb05010a81fc5fe52dbeae3664d8ac9359"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/api/handlers/compat/containers_restart.go:50-64 | pkg/api/handlers/compat/containers_stop.go:70-84 \u2014 before extracting anything, compare \u0060pkg/api/handlers/compat/containers_restart.go\u0060 and \u0060pkg/api/handlers/compat/containers_stop.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/containers_restart.go:50\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":"pkg/api/handlers/compat/containers_restart.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e9bb83a3995c949fa6f2ec167fa2d8afec42992b9c18090263ee87de7127cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): pkg/domain/infra/abi/play.go:260-274 | pkg/domain/infra/abi/play.go:1699-1713 \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/domain/infra/abi/play.go:260\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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c4bcdacb6920936a508f1bd69ac3ded3d006c1d82ae97cef0ebe04468dfdec4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/podman/artifact/pull.go:120-133 | cmd/podman/images/pull.go:203-216 \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/podman/artifact/pull.go:120\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/podman/artifact/pull.go"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d7b63dd4a882c2547ecff9416854fe21963f7ae9740fab67c53b6204540463"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): libpod/oci_conmon_exec_common.go:53-68 | libpod/oci_conmon_exec_common.go:118-131 \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":"libpod/oci_conmon_exec_common.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b94bbc780a443b239ebff6abcfcfa07752249dbdc786960691e4788e94b964d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/api/handlers/libpod/artifacts.go:110-123 | pkg/api/handlers/libpod/images_pull.go:98-111 \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. 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":"pkg/api/handlers/libpod/artifacts.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"a324de1b2d9b3b8a868f18936f2fbd234a29f025460d9bf840c58b053fa731b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/domain/filters/containers.go:216-229 | pkg/domain/filters/containers.go:530-543 \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/domain/filters/containers.go:216\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":"pkg/domain/filters/containers.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"4196acc8007f4300328ecacbd643c2e7a6b26ea46c3606f80d3a9b8f609d3d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/domain/filters/containers.go:409-422 | pkg/domain/filters/containers.go:430-443 \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/domain/filters/containers.go:409\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":"pkg/domain/filters/containers.go"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"952a11b950e74fe16c4ab785e893ce8d175c5f9089ee619905f16e500f2a0944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/domain/infra/runtime_libpod.go:264-277 | pkg/util/utils.go:1001-1014 \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 \u0060pkg/domain/infra/runtime_libpod.go:264\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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b513995aee984bb7cd8770b9d0b8c44ac138977a3773caa63a511a97b2d3206"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/systemd/generate/containers.go:495-508 | pkg/systemd/generate/pods.go:379-393 \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":"pkg/systemd/generate/containers.go"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"45113ce5c0eab773b42332880d1337de0b13dc0ae8555ae69908afda129012d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/systemd/parser/unitfile.go:710-723 | pkg/systemd/parser/unitfile.go:743-756 \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/systemd/parser/unitfile.go:710\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":"pkg/systemd/parser/unitfile.go"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d09f81cc00c4e89a13b0be8cdaeeb12b193d3d20d7173e737ac22c9454f43df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): pkg/domain/infra/abi/play.go:1006-1019 | pkg/domain/infra/abi/play.go:1102-1115 \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/domain/infra/abi/play.go"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"43dc9a4989788f876e55b01c0bf18b02f2c0619fdee0a81fb253c9cf68d568b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 6): cmd/podman/containers/init.go:71-83 | cmd/podman/containers/kill.go:110-122 | cmd/podman/containers/pause.go:112-124 | cmd/podman/containers/restart.go:124-136 | cmd/podman/containers/stop.go:146-158 | cmd/podman/containers/unpause.go:110-123 \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/podman/containers/init.go:71\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/podman/containers/init.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"139e6269a63d9e1b4a9578956ad9b87534d541b2e5e84d6a3234f48a2f758d82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): pkg/api/handlers/compat/images_push.go:79-91 | pkg/api/handlers/libpod/images_push.go:65-78 | pkg/api/handlers/libpod/manifests.go:217-229 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/images_push.go:79\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":"pkg/api/handlers/compat/images_push.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"4095952b94d56147261d73b347c9c7ae9621ed5c790445da5364ec496be07f1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/podman/farm/build.go:90-102 | cmd/podman/images/build.go:83-95 \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/podman/farm/build.go:90\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/podman/farm/build.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1fe06ccc65b8a7e39c0834f49876f09998aa886cd26ae4c2fcaf75fde7a3d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): libpod/container_api.go:50-62 | libpod/container_internal.go:830-842 \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 \u0060libpod/container_api.go:50\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":"libpod/container_api.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"e835b4510f80341b2f849b532744b2df8c177257f5a8bdd19a01ab03cdc93c43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): libpod/container_exec.go:279-291 | libpod/container_exec.go:333-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060libpod/container_exec.go:279\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":"libpod/container_exec.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ccd159e00943581ce01dc64a11b2f746f079542687921c8176e79d2ef4275a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): libpod/container_exec.go:455-467 | libpod/container_exec.go:600-612 \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 \u0060libpod/container_exec.go:455\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":"libpod/container_exec.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3a72a6912eda95119ba51a89850c0e43e03011f57c6c87e2314297075eb7a6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/api/handlers/libpod/artifacts.go:264-276 | pkg/api/handlers/libpod/images.go:394-406 \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 \u0060pkg/api/handlers/libpod/artifacts.go:264\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":"pkg/api/handlers/libpod/artifacts.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"195c29c1dcbac7f7673f46a4ea8350d2e0595ec7d412929d0a8568286b1f2276"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/domain/infra/runtime_libpod.go:236-248 | pkg/util/utils.go:979-991 \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 \u0060pkg/domain/infra/runtime_libpod.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4378e0605e0aaa6d9c1e29786d6b910a3b93daa12e366b63d9106601622301"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/systemd/parser/split.go:118-130 | pkg/systemd/parser/split.go:142-154 \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/systemd/parser/split.go:118\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":"pkg/systemd/parser/split.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"5531573a0041d3ff8634c9b7275da1d1d6eef0ab3fbed4097f6f7f59981d01f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/api/handlers/libpod/images_push.go:133-145 | pkg/api/handlers/libpod/manifests.go:452-464 \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 \u0060pkg/api/handlers/libpod/images_push.go:133\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":"pkg/api/handlers/libpod/images_push.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"238711b39b1dcea0ef816609c01ee9607dec674a039675bbbe8f6af2e6cf6f18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/domain/infra/abi/manifest.go:224-237 | pkg/domain/infra/abi/manifest.go:273-285 \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/domain/infra/abi/manifest.go:224\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/domain/infra/abi/manifest.go"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"303e9e2a94830cdf3fdfc33562da512926ec21744841daa649dcf153312f5f0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): pkg/domain/infra/abi/pods.go:343-355 | pkg/specgen/generate/pod_create.go:308-320 \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 \u0060pkg/domain/infra/abi/pods.go:343\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":"pkg/domain/infra/abi/pods.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb86751560d2b2357a93786e4d465f60ce92bc68c9726068f2360b6aa3b8581"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): libpod/container_exec.go:617-628 | libpod/container_exec.go:655-666 | libpod/container_exec.go:722-733 \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 \u0060libpod/container_exec.go:617\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":"libpod/container_exec.go"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"20ba5e944f40161f9397305dc79608fe5fff255f6c2e961b4356bdc149022430"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/podman/containers/mount.go:108-119 | cmd/podman/images/mount.go:82-93 \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/podman/containers/mount.go:108\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/podman/containers/mount.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf36dc9b4bcc3b75a850fc886cc96d55951c658ee0722cf2fa512faf168a6b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/bindings/volumes/rename.go:12-23 | pkg/bindings/containers/rename.go:12-23 \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":"pkg/bindings/volumes/rename.go"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"2883c7fecaa73c8a131f79d3d72a5ea4cc9fe78ebbb9ad7077a072f4c3f6bd9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/filters/containers.go:192-203 | pkg/domain/filters/containers.go:506-517 \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/domain/filters/containers.go:192\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/domain/filters/containers.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3089eb784825988ea8609b2fb6fd100c3d2203f362f9065ca6eb8133813a53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/infra/abi/containers.go:953-964 | pkg/domain/infra/abi/containers.go:982-993 \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/domain/infra/abi/containers.go:953\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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"519c9ad8b0cf80fc172a41c2e421a681e2d1c9789fed7c9921c06c5139ad49ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/infra/abi/containers.go:1462-1473 | pkg/domain/infra/abi/images.go:169-180 \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 \u0060pkg/domain/infra/abi/containers.go:1462\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/domain/infra/abi/containers.go"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"282a41f68d377e4e3f4aa09818e769669bf10332f034cb75c4acb3a7ce294d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/machine/ocipull/ociartifact.go:320-331 | pkg/machine/ocipull/source.go:95-106 \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. 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":"pkg/machine/ocipull/ociartifact.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3ff9a0a8c7f42614ae8e4290be8f3a72195572903600cb032d222338a3ee13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/podman/containers/unmount.go:81-92 | cmd/podman/images/unmount.go:60-71 \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/podman/containers/unmount.go:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/podman/containers/unmount.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9f76469849784a50ba4e425ca884e60aa0749622ec9b6c66ab0468d3535705"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/api/handlers/compat/networks.go:173-185 | pkg/api/handlers/libpod/networks.go:88-99 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/networks.go:173\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":"pkg/api/handlers/compat/networks.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad453ce9d5b3b0b0e397fff24261276c433acede9c67023d585cdbaceac91953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/api/handlers/libpod/manifests.go:221-232 | pkg/api/handlers/libpod/manifests.go:638-649 \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":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e74644272903cadecd2f88e586fd0edef7937e783e7cc9ffda5916b573b1d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/api/handlers/libpod/pods.go:241-252 | pkg/api/handlers/libpod/volumes.go:180-191 \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 \u0060pkg/api/handlers/libpod/pods.go:241\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/api/handlers/libpod/pods.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"2595a86bf7d4e2b40e73cdfd8bcc228329d693c2627a1ea37acd4fd085444798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/infra/abi/manifest.go:257-268 | pkg/domain/infra/tunnel/manifest.go:158-169 \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 \u0060pkg/domain/infra/abi/manifest.go:257\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":"pkg/domain/infra/abi/manifest.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74de4eb61ae23a2e78d41c838134a04093b62fa63e90fc28ca6fc1f0a6449bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/infra/abi/play.go:970-981 | pkg/domain/infra/abi/play.go:1059-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 \u0060pkg/domain/infra/abi/play.go:970\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/domain/infra/abi/play.go"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe8fc3ec17ae72dd1236659a1ff98b432ca1adf582a7a3e6131a51c8eaacbbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): pkg/domain/infra/tunnel/images.go:126-137 | pkg/domain/infra/tunnel/images.go:289-300 \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/domain/infra/tunnel/images.go:126\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":"pkg/domain/infra/tunnel/images.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f8e6ea3bc02d0bbed693a6c126f37e9b1c8cb998bbfddd9398ce6454357351d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): libpod/pod_api.go:305-315 | libpod/pod_api.go:366-376 | libpod/pod_api.go:422-432 | libpod/pod_api.go:537-547 \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 \u0060libpod/pod_api.go:305\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":"libpod/pod_api.go"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"30ba552aa2f408530bcaa73fa8ec3ec8a7b7bb2fb0823149be2da7da98982b82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): cmd/podman/common/completion.go:187-197 | cmd/podman/common/completion.go:210-220 | cmd/podman/common/completion.go:367-377 \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 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/podman/common/completion.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"260e00425a15bc4518a8f74e199ff5dfaafc2d27d022e48ea4e4d2c816b89f22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): pkg/api/handlers/libpod/containers.go:78-88 | pkg/api/handlers/compat/containers.go:112-122 | pkg/api/handlers/libpod/images.go:127-138 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/libpod/containers.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":"pkg/api/handlers/libpod/containers.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"998572fffb01e45d7b9784d959c2edae1ff1d3be253a53f09f2af690037c211b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/podman/artifact/list.go:155-165 | cmd/podman/machine/list.go:127-137 \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/podman/artifact/list.go:155\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/podman/artifact/list.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"20911f5c758b53f2bb9aa2ac38dd77699ca15cdb483be4673296593cdb7bdf09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/podman/artifact/pull.go:103-113 | cmd/podman/images/pull.go:168-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/podman/artifact/pull.go:103\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/podman/artifact/pull.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3071512a4f55c3f69a3fd35c0da7b521017bbcb653f10aac34db4473624fe34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/podman/networks/list.go:135-145 | cmd/podman/secrets/list.go:118-128 \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":"cmd/podman/networks/list.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efc4a56c4222b48541698c1a7086d2074eb6945cd40c23fc58d1b9425219439"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): libpod/pod.go:462-472 | libpod/pod_api.go:596-606 \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. 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":"libpod/pod.go"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"8244866c8540e0ce7af8c120ba9506358947ee433563fc69c9d0d0fb97b69463"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): libpod/sqlite_state.go:874-884 | libpod/sqlite_state.go:1626-1636 \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 \u0060libpod/sqlite_state.go:874\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":"libpod/sqlite_state.go"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"b85cae88b3088d7c3b19d6bdd1961c8953cd72115d337292ec491d69e600c76a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/bindings/containers/attach.go:116-126 | pkg/bindings/containers/attach.go:453-464 \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/bindings/containers/attach.go:116\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":"pkg/bindings/containers/attach.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1645694dae10c0ae9f271dc54b5c1ec25d9cd76354372e92addc145bdf0b37d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/bindings/images/build.go:1238-1248 | pkg/bindings/images/build.go:1256-1266 \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/bindings/images/build.go:1238\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/bindings/images/build.go"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"386365dd90854c48cbe02fbba70f8ad3f01086e212637fe913d915859be6694f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/bindings/manifests/manifests.go:277-287 | pkg/bindings/images/pull.go:59-69 \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":"pkg/bindings/manifests/manifests.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"46475a11281f8c6091baf21ca30ed34736fba5c2801994aaeaa6c5abe7330cba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/specgen/namespaces.go:175-186 | pkg/specgen/namespaces.go:216-226 \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/specgen/namespaces.go:175\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":"pkg/specgen/namespaces.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"f580914bfea950692acce26e87ac695ade94a11eaae49276f61e20552ed20b6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/specgenutil/volumes.go:676-686 | pkg/specgenutil/volumes.go:730-740 \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/specgenutil/volumes.go:676\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/specgenutil/volumes.go"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"163a74f17a2be053d13e09b95545409c9b52a9d932d5a410a73b22de521d6e6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/systemd/generate/containers.go:530-540 | pkg/systemd/generate/pods.go:415-425 \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 \u0060pkg/systemd/generate/containers.go:530\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":"pkg/systemd/generate/containers.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"34e63f88ceaaaf67a1231655dda0d66d2861a8baaeebd26fe50fcf8a4cd77be5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): libpod/pod_api.go:90-100 | libpod/pod_api.go:459-471 \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 \u0060libpod/pod_api.go:90\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":"libpod/pod_api.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"f66c10c4f854e4c9b9bbc779f2b51d932b1ab4fd0b2e503a4a6734272161af70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/api/handlers/compat/exec.go:153-165 | pkg/api/handlers/compat/exec.go:230-240 \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/api/handlers/compat/exec.go:153\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":"pkg/api/handlers/compat/exec.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6a1ec6c26b2375e8ae722a6b4d0bd7b08bca6167df9423f8cfc93ec3db2c80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/api/handlers/compat/images_push.go:42-55 | pkg/api/handlers/compat/images_search.go:30-40 \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 \u0060pkg/api/handlers/compat/images_push.go:42\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":"pkg/api/handlers/compat/images_push.go"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"a469c4850f63f778c0d80da1e772075cb8345457f1aaa3beca0f9df99e1319e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/api/handlers/compat/volumes.go:230-240 | pkg/api/handlers/libpod/volumes.go:183-193 \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 \u0060pkg/api/handlers/compat/volumes.go:230\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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc60f65e17267234f970639dc82ab750da20dba6113d8c83753cf298d1d51383"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/api/handlers/libpod/pods.go:322-332 | pkg/domain/infra/abi/pods.go:301-311 \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":"pkg/api/handlers/libpod/pods.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5e4197e3a54ab496867a4d25824f81e1fb065cbfb0d1a89bd5356fc8255136"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): pkg/api/handlers/libpod/volumes.go:69-79 | pkg/domain/infra/abi/volumes.go:38-48 \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 \u0060pkg/api/handlers/libpod/volumes.go:69\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":"pkg/api/handlers/libpod/volumes.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"8006336e64e83d4f3bea986bca049e77261c29297495a9d402c56ecde5d378d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): pkg/api/handlers/libpod/containers.go:164-173 | pkg/api/handlers/compat/containers_pause.go:14-25 | pkg/api/handlers/compat/containers_unpause.go:14-24 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/libpod/containers.go:164\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":"pkg/api/handlers/libpod/containers.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9c1cf9f2dbb7be6668d01b1f90226bc0cac1cefbf0431358d715304f6b04c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): cmd/podman/containers/pause.go:94-103 | cmd/podman/containers/restart.go:106-115 | cmd/podman/containers/unpause.go:92-101 \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/podman/containers/pause.go:94\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/podman/containers/pause.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"44128110624ff0f2c83fbdfcdce73c4e60a67df4d0ca616801dab8ded4675d2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): pkg/api/handlers/compat/containers.go:80-89 | pkg/api/handlers/compat/containers_restart.go:48-58 | pkg/api/handlers/compat/containers_stop.go:68-78 \u2014 before extracting anything, compare \u0060pkg/api/handlers/compat/containers_restart.go\u0060 and \u0060pkg/api/handlers/compat/containers_stop.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/containers.go:80\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97d5d3b452f83d7aecc394500fc40a7984eba46a62550b97c21ca00f6ffce02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/podman/artifact/push.go:55-64 | cmd/podman/images/push.go:80-89 \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":"cmd/podman/artifact/push.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5279da2fe23833493830d782d29bd0033893c2f891256d43e882fcf7dc5c45ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/podman/common/completion.go:106-115 | cmd/podman/common/completion.go:386-396 \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/podman/common/completion.go:106\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/podman/common/completion.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"7555e5fa5eb882c6f6700106c1ad63c09c31961a646e8cc26ba790de6352ee78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/podman/common/completion.go:158-167 | cmd/podman/common/completion.go:337-346 \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/podman/common/completion.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":"cmd/podman/common/completion.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d50620efe1c0723e30904cc23c6ccf78a5514e84eb8ea1593b588d62969500"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/boltdb_state.go:216-225 | libpod/boltdb_state.go:254-263 \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":"libpod/boltdb_state.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0e4b709d6791d12acb5afe401f4d15f8d2dbbf888085df6d4b3f970551e582"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/container_api.go:627-636 | libpod/container_api.go:674-683 \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 \u0060libpod/container_api.go:627\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":"libpod/container_api.go"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a6b81898f40024f58f87837bd4a2d900f471d86b71ce97b7bc9a529c36aa66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/kube.go:622-631 | libpod/kube.go:768-779 \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 \u0060libpod/kube.go:622\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":"libpod/kube.go"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"64bc6751a72f928f6363063c3798771c6c22c525554f1db6de524e0c4470a810"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/runtime_ctr.go:397-406 | libpod/runtime_ctr.go:422-431 \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 \u0060libpod/runtime_ctr.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. 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":"libpod/runtime_ctr.go"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"d50df3d95222d997ff03d28f21c406c457bced9854c79ffc0090cde7952d797a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/sqlite_state.go:2277-2286 | libpod/sqlite_state.go:2330-2339 \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 \u0060libpod/sqlite_state.go:2277\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":"libpod/sqlite_state.go"},"region":{"startLine":2277}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5689e0f000fab5627a0773dbeaf9792147a68bf92e5a78c79deb932f4362ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/containers.go:130-139 | pkg/api/handlers/compat/containers.go:194-204 \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 \u0060pkg/api/handlers/libpod/containers.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. 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":"pkg/api/handlers/libpod/containers.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33228ab6964a045a00a33d28ff44be0582e748b5c9bd1559c5ce4ebffa8bcac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/containers.go:277-286 | pkg/api/handlers/libpod/containers.go:378-387 \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/api/handlers/libpod/containers.go:277\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/api/handlers/libpod/containers.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e732412f9ec7a859672385395975be87f9a36cce1fe11e439ab09d37a535a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/domain/filters/containers.go:128-137 | pkg/domain/filters/containers.go:142-151 \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/domain/filters/containers.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"550560d4bab28b83d39cc6688caa149553115551c2bfec1e3a5bd7ebcc37a883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/domain/utils/scp.go:108-117 | pkg/domain/utils/scp.go:157-166 \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/domain/utils/scp.go:108\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/domain/utils/scp.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"75bab311a8a78621b7f620082880ab7976987d89abf9778bd7fbc4696087720f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/machine/provider/platform.go:13-23 | pkg/machine/shim/host.go:399-408 \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 \u0060pkg/machine/provider/platform.go:13\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/machine/provider/platform.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"528b0f0c5206442fba4eb4a7a53df28a749740c417e9dcfd38d8af2ef1bdbb27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/util/utils.go:408-417 | pkg/util/utils.go:859-868 \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/util/utils.go:408\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":"pkg/util/utils.go"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3ce90fe53d5ff9f52966ac450db7d4bb5557ca0ef3fb3f850ccc487b6163c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/podman/containers/rm.go:115-124 | cmd/podman/containers/stop.go:120-129 \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/podman/containers/rm.go:115\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/podman/containers/rm.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a4059294e2b94fc21610d90a11a44514ab45dc9d1cf4d6f6f662e531de817a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/container_internal_common.go:359-368 | libpod/container_internal_common.go:494-504 \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 \u0060libpod/container_internal_common.go:359\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":"libpod/container_internal_common.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df0aa5965b3f8f461a9dd51715e5dcf1ff286471139322f44d22eafb9f49f32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): libpod/container_internal_common.go:1431-1440 | libpod/container_internal_common.go:1885-1894 \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":"libpod/container_internal_common.go"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a822b8d153702fb8a6743db9861913f00b5026cb998ffcd4c6d7a9f00d555f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/containers_top.go:36-45 | pkg/api/handlers/libpod/pods.go:399-408 \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 \u0060pkg/api/handlers/compat/containers_top.go:36\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":"pkg/api/handlers/compat/containers_top.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fed46022048fd5d7b37863145b382a6a2fe1f60b2296a593aa20ca3bd32b949"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/images.go:65-74 | pkg/api/handlers/compat/images_remove.go:35-44 \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 \u0060pkg/api/handlers/compat/images.go:65\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/api/handlers/compat/images.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c33b04b30dc8816c72605a5b102334b4200e1806a15f4f8eb78726e86f61629"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/images.go:90-99 | pkg/api/handlers/compat/images.go:611-620 \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/api/handlers/compat/images.go:90\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":"pkg/api/handlers/compat/images.go"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"08cdde545ca0bc10db55aaa8b6273d167a03a6ff9b7b44e423aa19587572dea0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/images.go:198-207 | pkg/api/handlers/compat/images.go:529-538 \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":"pkg/api/handlers/compat/images.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b23c473a817c4d368ac5ae9a4d854424f4d7cc331a3b901573bd92b96923018b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/images_remove.go:26-35 | pkg/api/handlers/libpod/manifests.go:756-766 \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 \u0060pkg/api/handlers/compat/images_remove.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. 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":"pkg/api/handlers/compat/images_remove.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4ba565470199cefdff2e9fba0af4ec0cd8697bfc754ad9c07b5bf97e5048fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/compat/volumes.go:146-155 | pkg/api/handlers/libpod/volumes.go:43-52 \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 \u0060pkg/api/handlers/compat/volumes.go:146\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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cfe30fc6add35a03f184b78f2c689fa52583cab768c7a2dc188163ba35b079b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/images.go:713-722 | pkg/api/handlers/libpod/kube.go:225-234 \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 \u0060pkg/api/handlers/libpod/images.go:713\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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"e379769ec1a576d49656d261f14ecb9d6a79304c5ccec6a0659eaa2703e97c0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/images.go:733-742 | pkg/api/handlers/libpod/manifests.go:779-788 \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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"01079cfcc34963c3de04d66b6f59e97639b370929e7ee58283af26001a60c3e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/images_push.go:149-158 | pkg/api/handlers/libpod/manifests.go:468-477 \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 \u0060pkg/api/handlers/libpod/images_push.go:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/libpod/images_push.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"75be6b738f789666f446804c8c7b2b590ef5519caf644e272b9fce89ffe954b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/kube.go:156-165 | pkg/api/handlers/libpod/manifests.go:637-646 \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 \u0060pkg/api/handlers/libpod/kube.go:156\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":"pkg/api/handlers/libpod/kube.go"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a7aec455e7925f721756b3e6784a3533210b1f8628b62b08497dda91c3961a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/api/handlers/libpod/quadlets.go:186-195 | pkg/api/handlers/libpod/quadlets.go:279-288 \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/api/handlers/libpod/quadlets.go:186\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":"pkg/api/handlers/libpod/quadlets.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d34a90c26f2790fb6f7fbdd98ca4fe0471c81b215da704413083f380e9fcb2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): pkg/domain/infra/abi/images.go:184-193 | pkg/domain/infra/abi/images.go:246-255 \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/domain/infra/abi/images.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/domain/infra/abi/images.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5ff4da2e407aaf1a2bcbe03951199d825fcfee71b41dac205955b8276b731d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): libpod/sqlite_state.go:846-854 | libpod/sqlite_state.go:876-884 | libpod/sqlite_state.go:1628-1636 \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 \u0060libpod/sqlite_state.go:846\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":"libpod/sqlite_state.go"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b4d0825de122bd57d1ea7f6e6b544eb6b52aea3171a6836eb887a144bed170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): pkg/api/handlers/compat/secrets.go:61-69 | pkg/api/handlers/libpod/kube.go:254-263 | pkg/api/handlers/libpod/system.go:83-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/secrets.go:61\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":"pkg/api/handlers/compat/secrets.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e921bab1f334544b9a5ba6736a23f233e2257c009fbb4904c58e56dd2d034c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/artifact/pull.go:63-71 | cmd/podman/images/pull.go:117-125 \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":"cmd/podman/artifact/pull.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8d2d0500288574b87b915d4927d6510c0a08af7a184730967e10232c3323cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/common/completion.go:299-307 | cmd/podman/common/completion.go:337-346 \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/podman/common/completion.go:299\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/podman/common/completion.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c21ae37ad8d9a1cd6e8ecc0c886ef2baa9710e8f152183a6ff48f44af8aec30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/libpod/artifacts.go:236-244 | pkg/api/handlers/libpod/artifacts.go:259-267 \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/api/handlers/libpod/artifacts.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. 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":"pkg/api/handlers/libpod/artifacts.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"320e73f41818191bea16dddcc388110e5a199135200b16aaa8d81ec9a99a47b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/libpod/containers.go:473-481 | pkg/api/handlers/compat/containers.go:744-752 \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 \u0060pkg/api/handlers/libpod/containers.go:473\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":"pkg/api/handlers/libpod/containers.go"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd17f6e832c6be26806069b3235df63678af10f00e3daad302a4511a7060d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/filters/containers.go:54-62 | pkg/domain/filters/containers.go:477-485 \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/domain/filters/containers.go:54\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":"pkg/domain/filters/containers.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87e871b2d814066ad25e77e70f7a1dc4148b315083603994a70d77745962d36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/abi/containers.go:204-212 | pkg/domain/infra/abi/containers.go:225-234 \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/domain/infra/abi/containers.go:204\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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b06f9af9fff1077b6bd679b6fbfcb97dec6dfb8fe6bfdb7753dae8c294263d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/abi/containers.go:1484-1493 | pkg/domain/infra/abi/containers.go:1591-1599 \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/domain/infra/abi/containers.go:1484\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":"pkg/domain/infra/abi/containers.go"},"region":{"startLine":1484}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43e2e10e4efc19e8046bdde85d3fd89bd336410cb3189abc1365fb0f64303a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/runtime_libpod.go:285-293 | pkg/util/utils.go:1035-1043 \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":"pkg/domain/infra/runtime_libpod.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3ea40bf58b0070447a04fa385e123fd626c4ad3af79a139e3e78b7b492f9ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/machine/os/machine_os.go:34-42 | pkg/machine/os/machine_os.go:62-70 \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/machine/os/machine_os.go:34\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":"pkg/machine/os/machine_os.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"f75e64022cc05ce5061a85efe0032d75952e16cc39b3b206a83683a31d441e21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/specgen/namespaces.go:506-514 | pkg/specgen/namespaces.go:519-527 \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/specgen/namespaces.go:506\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/specgen/namespaces.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"805adec3e7567af74e4bf3c670ef10b875105665dec454f7b993d098f8a5ad55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/util/utils.go:379-387 | pkg/util/utils.go:832-840 \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/util/utils.go:379\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/util/utils.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"113cb4111bfded69e78a7691ad2d240f41e1e9fe9d82b83f3ce4d182b01f6372"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/containers/cp.go:169-177 | cmd/podman/containers/cp.go:324-332 \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. 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/podman/containers/cp.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d636bd78eeab8ccba7037abaa231614c356d59bc911e50af63723934a96c00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/farm/list.go:65-73 | cmd/podman/system/connection/list.go:110-118 \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/podman/farm/list.go:65\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/podman/farm/list.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60ac5c36c01b63ae494241d58c5db8792ec3e6af69e707f4241a0296fc61777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/images/import.go:117-125 | cmd/podman/images/load.go:95-103 \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/podman/images/import.go:117\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/podman/images/import.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"60928d65f5cb6d96f14318dcbd1180578e35f7533691635078a091fecbb407dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/podman/networks/create.go:215-223 | cmd/podman/networks/create.go:237-245 \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":"cmd/podman/networks/create.go"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2efc28f3599d5606a14e25d5081ac4cbf7a97a39f246873dd9b483010e755d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): libpod/container_internal.go:915-923 | libpod/pod_api.go:107-115 \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 \u0060libpod/container_internal.go:915\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":"libpod/container_internal.go"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd85bdb0cf53b5397149e95d6525706044b53deeda28d86489c0b75f430bdfde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/compat/containers_restart.go:29-38 | pkg/api/handlers/compat/containers_stop.go:30-38 \u2014 before extracting anything, compare \u0060pkg/api/handlers/compat/containers_restart.go\u0060 and \u0060pkg/api/handlers/compat/containers_stop.go\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/containers_restart.go:29\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":"pkg/api/handlers/compat/containers_restart.go"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"832de4aa5cf07417b0cf8ce1c01984ca2b2ef3d8a901a11f81d08f303580c213"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/compat/images.go:541-549 | pkg/api/handlers/libpod/images.go:366-374 \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 \u0060pkg/api/handlers/compat/images.go:541\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":"pkg/api/handlers/compat/images.go"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a0ff686977137bba672ed5d385e997cd5d9f9319c3ddfa4cc4fbb9909cce556"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/compat/images_history.go:17-25 | pkg/api/handlers/compat/images_tag.go:19-27 \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. 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":"pkg/api/handlers/compat/images_history.go"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"244a96235b4390d8e006ec63918dc5f046c42bfdcbcf7690b0f58979f2775ab5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/libpod/images.go:205-213 | pkg/api/handlers/libpod/images.go:292-300 \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/api/handlers/libpod/images.go:205\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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd5b4ad371308dcffb3ab05f52d539a9575beeff5a612a0e5ee3ea26501551a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/libpod/networks.go:151-159 | pkg/api/handlers/libpod/networks.go:207-215 \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/api/handlers/libpod/networks.go:151\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":"pkg/api/handlers/libpod/networks.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1b70427aa8cd40c409cd7a77825725b9aa8215d8dffb437ec52a8f49b46650"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/api/handlers/libpod/pods.go:145-154 | pkg/api/handlers/libpod/pods.go:254-262 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/libpod/pods.go:145\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":"pkg/api/handlers/libpod/pods.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc4905785c0dd67a8baff330116baa0e0c95bfa2e034311ecafc05726cb5a76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/bindings/images/images.go:220-228 | pkg/bindings/images/images.go:242-250 \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/bindings/images/images.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05c913500ce82e1d385d153e6af26d2b92f16be764cd12ed9c8a60157d36e63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/abi/pods.go:334-342 | pkg/specgen/generate/pod_create.go:298-307 \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 \u0060pkg/domain/infra/abi/pods.go:334\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":"pkg/domain/infra/abi/pods.go"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ead9a60a3c94f524d5fd1cbf8bfe42d188a3aeb5d5a2e72aaab64a6d7e0db3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/tunnel/containers.go:47-55 | pkg/domain/infra/tunnel/containers.go:77-85 \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/domain/infra/tunnel/containers.go:47\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/domain/infra/tunnel/containers.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ea42d2dd02d44ac0bc27711301a2cfb7946f4b57b3eb5db5505d36deb4ddffe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/tunnel/containers.go:95-103 | pkg/domain/infra/tunnel/containers.go:120-128 \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/domain/infra/tunnel/containers.go:95\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/domain/infra/tunnel/containers.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb476e3123b6f446f8f5d92fbabe83af7855b52c0f6ef61627a4c8d2ce2436a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/tunnel/images.go:148-156 | pkg/domain/infra/tunnel/images.go:176-184 \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/domain/infra/tunnel/images.go:148\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/domain/infra/tunnel/images.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"05103771249254905d63e7540f06fbcb6e4a887941034dcb12eb4a2c84c826c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/domain/infra/tunnel/manifest.go:69-77 | pkg/domain/infra/tunnel/manifest.go:107-115 \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":"pkg/domain/infra/tunnel/manifest.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c8daa1d3a649de8eb61e10974df05b224c18fd2200ceac28641c64e5fe43e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/specgen/generate/storage.go:77-85 | pkg/specgen/generate/storage.go:119-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/specgen/generate/storage.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/specgen/generate/storage.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dbb10107370c24cc2869ad6a1d180eaa0ec2bf2301458997c2938a1ab2baaad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): pkg/specgenutil/specgen.go:1056-1064 | pkg/specgenutil/specgen.go:1104-1112 \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/specgenutil/specgen.go:1056\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":"pkg/specgenutil/specgen.go"},"region":{"startLine":1056}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b8dcc723e895ef28ce3d41f7734266b8a80f3a50171edda5465c2d8c466037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 8): pkg/api/handlers/libpod/containers.go:234-243 | pkg/api/handlers/compat/containers.go:195-204 | pkg/api/handlers/compat/containers_restart.go:30-38 | pkg/api/handlers/compat/containers_stop.go:31-38 | pkg/api/handlers/compat/images_remove.go:27-35 | pkg/api/handlers/libpod/images.go:751-759 | pkg/api/handlers/libpod/pods.go:139-147 | pkg/api/handlers/libpod/pods.go:248-256 \u2014 there are 8 copies across 7 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/libpod/containers.go:234\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":"pkg/api/handlers/libpod/containers.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef133781655cce4c7dde810e1b567e0b517e00e3804d5cdf7fbbddde98aba4c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): pkg/domain/infra/abi/pods.go:75-82 | pkg/domain/infra/abi/pods.go:141-148 | pkg/domain/infra/abi/pods.go:175-182 | pkg/domain/infra/abi/pods.go:204-211 | pkg/domain/infra/abi/pods.go:230-237 | pkg/domain/infra/abi/pods.go:260-267 \u2014 all 6 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 \u0060pkg/domain/infra/abi/pods.go:75\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/domain/infra/abi/pods.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feb62bbbea35e212c6b4342051b6273395220a21fde258919e6833f197be007"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): pkg/api/handlers/libpod/pods.go:111-118 | pkg/api/handlers/libpod/pods.go:197-204 | pkg/api/handlers/libpod/pods.go:285-292 | pkg/api/handlers/libpod/pods.go:336-343 | pkg/api/handlers/libpod/pods.go:362-369 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"pkg/api/handlers/libpod/pods.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea3ebfcdf0216531cfc33991eb9dc28f6291df4f7bf5f62a4207d4f476706f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): pkg/api/handlers/compat/volumes.go:201-208 | pkg/api/handlers/libpod/volumes.go:100-107 | pkg/api/handlers/libpod/volumes.go:233-242 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"202f0278dfddb2113a36595886bf9bfc86c893cc1da4729b3f051d097ce5f61e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/podman/artifact/push.go:80-88 | cmd/podman/images/push.go:113-120 \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/podman/artifact/push.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd80c529be8014faf701b411784db6461035772ffbb7af09a8ce9bbcbe86528f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): libpod/container.go:871-878 | libpod/container.go:883-890 \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. 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":"libpod/container.go"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d77183edc12d3b9e430435c9dc5e2911d3d37cbf85fa4a7137b7a2fe52f5b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/machine/env/dir.go:18-25 | pkg/machine/env/dir.go:112-119 \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/machine/env/dir.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"969d766a4c5ad6df3b0eafc218405a71207421a1ce3d6e1aa1950d080da30b55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/specgen/volumes.go:186-193 | pkg/specgen/volumes.go:201-209 \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/specgen/volumes.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"636432e5955cd4540dad252764fe107fd4fb9a40be9159c18361c299aa1f111e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/util/utils.go:422-429 | pkg/util/utils.go:873-880 \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. 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":"pkg/util/utils.go"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0198e448b338a45481861ed7f094bb0e1cbf5bf2380cdf0692f1a353acabc89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/podman/containers/pause.go:63-70 | cmd/podman/containers/unpause.go:61-68 \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/podman/containers/pause.go:63\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/containers/pause.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1de6cee64b66e4f450f47ebd318cdcffdaf2ecb01415f37bfc1fde23631994f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/compat/containers_stats.go:27-34 | pkg/api/handlers/compat/events.go:35-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 \u0060pkg/api/handlers/compat/containers_stats.go:27\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":"pkg/api/handlers/compat/containers_stats.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a239d8d039db1323dbc40f97e4c8ff161f43dadda89365305d3401b6cbab3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/compat/images.go:118-125 | pkg/api/handlers/libpod/images.go:508-515 \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 \u0060pkg/api/handlers/compat/images.go:118\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":"pkg/api/handlers/compat/images.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a8d38561c4e71bf1d92814bac35e41e46deb98203193221a58e64cf16a415c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/compat/images.go:435-444 | pkg/api/handlers/libpod/pods.go:484-491 \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 \u0060pkg/api/handlers/compat/images.go:435\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":"pkg/api/handlers/compat/images.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aad35ccca29666e6284a593f2f297c6b9822599096fad75e4a49ab73e78599c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/compat/networks.go:468-475 | pkg/api/handlers/compat/volumes.go:282-289 \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. 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":"pkg/api/handlers/compat/networks.go"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"38722ca6971d3dca70ec30bfb065e9da779d8ba3bc1c16220f8edcbdb1ee413d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/compat/volumes.go:100-107 | pkg/api/handlers/libpod/volumes.go:30-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 \u0060pkg/api/handlers/compat/volumes.go:100\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":"pkg/api/handlers/compat/volumes.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14ca4d1f2bc4204e5ea04df2e31323daee3870e94e5e95f4713055abe21bf33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/libpod/images.go:690-697 | pkg/api/handlers/libpod/manifests.go:757-766 \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 \u0060pkg/api/handlers/libpod/images.go:690\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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b2cb43f1cf298577db042084e5f9b4a3ab3c4543dd1b2d44b37c2f2c684d732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/api/handlers/libpod/images_push.go:41-48 | pkg/api/handlers/libpod/manifests.go:367-376 \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 \u0060pkg/api/handlers/libpod/images_push.go:41\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":"pkg/api/handlers/libpod/images_push.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4fd44fd1686a46e83a0b5a0892fa197de8627d589fbe29590f7efa21f4993a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/domain/filters/volumes.go:32-39 | pkg/domain/filters/volumes.go:98-105 \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/domain/filters/volumes.go:32\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":"pkg/domain/filters/volumes.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4faf0693abbde4cecc8a2500354c619cd7195e8f9e9dc57c420bef1f4812f81b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/domain/infra/abi/play.go:1028-1035 | pkg/domain/infra/abi/play.go:1149-1156 \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/domain/infra/abi/play.go:1028\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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b82c2bed1056660a193d6aaac177b594d4c925bc0c3d2c56670f86e65aa1c1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): pkg/specgen/generate/security_linux.go:34-41 | pkg/specgen/generate/security_linux.go:48-55 \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/specgen/generate/security_linux.go:34\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":"pkg/specgen/generate/security_linux.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a0d06e5d7fe99f7b4fdaf9272840a756bc361414d67ccff5df95df10a0a7d8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): pkg/api/handlers/libpod/networks.go:22-28 | pkg/api/handlers/libpod/networks.go:104-110 | pkg/api/handlers/libpod/networks.go:150-156 | pkg/api/handlers/libpod/networks.go:206-212 | pkg/api/handlers/libpod/networks.go:229-235 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. 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":"pkg/api/handlers/libpod/networks.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f17865ff3313009bd14e9e3fcadb5de55bcb8f1a908a69ef7ca9db4ca451aeb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): libpod/sqlite_state.go:633-639 | libpod/sqlite_state.go:849-855 | libpod/sqlite_state.go:879-885 | libpod/sqlite_state.go:1631-1637 \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 \u0060libpod/sqlite_state.go:633\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":"libpod/sqlite_state.go"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0b30172074f63afea02c42eed4a332bb734b3c93bd75343a87557214bf71d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): pkg/domain/infra/abi/play.go:558-564 | pkg/domain/infra/abi/play.go:589-595 | pkg/domain/infra/abi/play.go:612-618 \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 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":"pkg/domain/infra/abi/play.go"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"d882d6124d85caeaca8ceb2ae19fdb1ff974faa54efff540142d3aa55afb5036"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): libpod/oci_conmon_common.go:195-201 | libpod/oci_conmon_common.go:214-220 \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 \u0060libpod/oci_conmon_common.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":"libpod/oci_conmon_common.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"280af20a0c0e6da03a6158b6a9f7771fb3a8847ddaee0e9bf478d5c7c1299f3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): libpod/sqlite_state.go:2229-2235 | libpod/sqlite_state.go:2272-2278 \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 \u0060libpod/sqlite_state.go:2229\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. 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":"libpod/sqlite_state.go"},"region":{"startLine":2229}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf13e2b5933cb31a320ca3bd36eab8f4f898b58b67cf94169289512f7e0be2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): libpod/container_internal_common.go:2919-2925 | libpod/container_internal_common.go:2965-2971 \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 \u0060libpod/container_internal_common.go:2919\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":"libpod/container_internal_common.go"},"region":{"startLine":2919}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cd31ad72a8e553b75d3fde232b3431bf94e9a209b721cd4cba9713a74b412c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/api/handlers/compat/images_prune.go:25-31 | pkg/api/handlers/compat/volumes.go:28-37 \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 \u0060pkg/api/handlers/compat/images_prune.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. 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":"pkg/api/handlers/compat/images_prune.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f6a3dc663d5f63ed5f449ec416e5d32cd3e0a67eb37441024740541c2b25bfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/api/handlers/compat/secrets.go:23-29 | pkg/api/handlers/libpod/volumes.go:120-128 \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 \u0060pkg/api/handlers/compat/secrets.go:23\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":"pkg/api/handlers/compat/secrets.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43dca432436663a6fbe09a0c2a2995bf8b71130a37c5b3998b14c220ae71210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/api/handlers/libpod/images.go:184-191 | pkg/api/handlers/libpod/images.go:265-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 \u0060pkg/api/handlers/libpod/images.go:184\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":"pkg/api/handlers/libpod/images.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15492f0e2b4046fe401c97dab8abf3ff091eed0146de6a07f84af351a3fbad7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): pkg/specgenutil/specgen.go:1079-1085 | pkg/specgenutil/specgen.go:1101-1107 \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/specgenutil/specgen.go:1079\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/specgenutil/specgen.go"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"135bcebf0d4619d02ab9c7b3c57bb76cd7af3d30fb433324b021100cc4a8ec11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): pkg/api/handlers/compat/containers_prune.go:22-28 | pkg/api/handlers/compat/networks.go:170-176 | pkg/api/handlers/compat/secrets.go:23-28 | pkg/api/handlers/libpod/networks.go:84-91 | pkg/api/handlers/libpod/volumes.go:120-127 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060pkg/api/handlers/compat/networks.go:170\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":"pkg/api/handlers/compat/containers_prune.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff9ba6671d877fe919f79393f471c62bae83fe3fc2a8d9c0834db73454168008"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): libpod/oci_conmon_common.go:412-417 | libpod/oci_conmon_common.go:422-427 | libpod/oci_conmon_common.go:432-437 \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 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":"libpod/oci_conmon_common.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"694dbf31bf98996c9b272609a8afbb8d1260f5dc084be537404b009e9b79a47a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): pkg/api/handlers/libpod/artifacts.go:73-78 | pkg/api/handlers/libpod/artifacts.go:234-239 | pkg/api/handlers/libpod/artifacts.go:257-262 \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 \u0060pkg/api/handlers/libpod/artifacts.go:73\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":"pkg/api/handlers/libpod/artifacts.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea127f76c892cb5b7fc4f8bb2535286ea620ab8a02e372b814893a948de5e14b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): pkg/api/handlers/compat/containers.go:233-240 | pkg/api/handlers/libpod/containers_stats.go:33-40 | pkg/api/handlers/libpod/kube.go:229-234 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/api/handlers/compat/containers.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"e76183d76f8f5cf9552d9dc7b11218cfad4a269761e6689061e30afb5083d109"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): libpod/container_internal_linux.go:499-504 | libpod/options.go:867-872 \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 \u0060libpod/container_internal_linux.go:499\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":"libpod/container_internal_linux.go"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"94583341d133aaa6c222b47bbf655a50d874399dca0264744e1088ff27a5666a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/api/handlers/libpod/containers.go:219-224 | pkg/api/handlers/libpod/containers.go:305-310 \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/api/handlers/libpod/containers.go:219\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/api/handlers/libpod/containers.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"60eb0800bb3a9f75a40a0cc69d6bfd98ffe4ec291d95a14e819fe43ed174d192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/domain/infra/abi/containers.go:257-262 | pkg/domain/infra/abi/containers.go:278-283 \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/domain/infra/abi/containers.go:257\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/domain/infra/abi/containers.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"1171149f9883a3dc39788000cec9653fbaf7f6172523c899ba1b69de79a0c805"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): libpod/container_internal_common.go:455-460 | libpod/container_internal_common.go:1790-1795 \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 \u0060libpod/container_internal_common.go:455\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":"libpod/container_internal_common.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2708740e70d46f677e1621aec3de1d3df3b269d562c392670e3311ec64bd2ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/api/handlers/compat/system.go:24-29 | pkg/api/handlers/libpod/system.go:63-68 \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 \u0060pkg/api/handlers/compat/system.go:24\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/api/handlers/compat/system.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fac353bf2a40379b7a7b61b336a28b49d5c6ccd300df46aaf5ebb31fe3bd03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/api/handlers/libpod/kube.go:230-235 | pkg/api/handlers/libpod/networks.go:39-44 \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 \u0060pkg/api/handlers/libpod/kube.go:230\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":"pkg/api/handlers/libpod/kube.go"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"390b025f8175df564d5636f066990c9fafd75593b007ca4c061ac4b23821a270"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/api/handlers/libpod/manifests.go:374-380 | pkg/api/handlers/libpod/quadlets.go:283-288 \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. 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":"pkg/api/handlers/libpod/manifests.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fef8f16cb1cec701036c29722889f48627b58eedce859482c2971989f17b9f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/domain/infra/abi/images.go:832-839 | pkg/domain/infra/abi/images.go:883-888 \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/domain/infra/abi/images.go"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f2a39c758a1fdf78d76a1f863ca968cff41e95cef086a9971f7b50a32336cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): pkg/domain/infra/tunnel/containers.go:594-599 | pkg/domain/infra/tunnel/containers.go:955-960 \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/domain/infra/tunnel/containers.go:594\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/domain/infra/tunnel/containers.go"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bce172337d1fc0b6c16e6cdb0df8256bd22f46d8dbf6440f5c51aae83d44a7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): libpod/runtime_volume_common.go:173-177 | libpod/runtime_volume_common.go:217-221 \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 \u0060libpod/runtime_volume_common.go:173\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":"libpod/runtime_volume_common.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ff8f43faa9dde8901bfb8fbf1f0b49f674ccf4aa3270ad9a7e7e507c665535"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): pkg/api/handlers/compat/networks.go:44-48 | pkg/api/handlers/compat/networks.go:340-344 \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":"pkg/api/handlers/compat/networks.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aae7b1000ed40d40e3cec4945bdd9e6a5af0911268bf5cbdd0abe292e0820ab"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: libpod/container_internal_common.go: libpod/container_internal_common.go changed 5 times in last 90 days, max complexity 142. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/container_internal_common.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8070987035fb42a1eeb8290736500214e3e6b2b1c45374d8bda4617501ea329"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/bindings/images/build.go: pkg/bindings/images/build.go changed 5 times in last 90 days, max complexity 114. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/bindings/images/build.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"60ba202a5def155cb7e5849f89ec7bcc0cd677c7a5bd6801ad19bd7a5a285491"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/specgen/generate/kube/kube.go: pkg/specgen/generate/kube/kube.go changed 5 times in last 90 days, max complexity 102. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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/specgen/generate/kube/kube.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2b72ee688914d85f54632465d448f5f9b63ba0d247b8ddf0f63dde9060565a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: libpod/runtime_ctr.go: libpod/runtime_ctr.go changed 3 times in last 90 days, max complexity 98. 1 of those changes was a fix/bug commit, and the other 2 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":"libpod/runtime_ctr.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc6e3d3ec08bc7040f1562fe3592204e3a60a969413436cf698a44d60f33766b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: libpod/oci_conmon_common.go: libpod/oci_conmon_common.go changed 5 times in last 90 days, max complexity 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"libpod/oci_conmon_common.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de2a2ff0218b3ae33dac57f6049c987479b876dd65a3e4e2e10b430ca2e4a1f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/machine/shim/host.go: pkg/machine/shim/host.go changed 6 times in last 90 days, max complexity 43. 1 of those changes was a fix/bug commit, 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":"pkg/machine/shim/host.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d066a6bd61ac8457bc3679abc5dc1d2cdf18e3e4c865a62738a6ba7cc299f3b2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: libpod/container_internal.go: libpod/container_internal.go changed 5 times in last 90 days, max complexity 51. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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":"libpod/container_internal.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f23a112832fc83f8c4ab2334a157e19fb8c4cc4ce5f58be771709d86de9991"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: libpod/runtime.go: libpod/runtime.go changed 3 times in last 90 days, max complexity 67. 1 of those changes was a fix/bug commit, and the other 2 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":"libpod/runtime.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc32d0287125c4a749b1d6557f5321349e5fdaee6a92e36743b885470bdee329"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: cmd/podman/common/build.go: cmd/podman/common/build.go changed 2 times in last 90 days, max complexity 96. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/podman/common/build.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"018b3525db508fb3003788969f3042e93980a35b1e9360f7072889d76dadf238"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: pkg/systemd/quadlet/quadlet.go: pkg/systemd/quadlet/quadlet.go changed 3 times in last 90 days, max complexity 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/systemd/quadlet/quadlet.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7813e0c82d41728025f671e838a750dd8f60ca252d793853f6e22b0d46c2d3"}},{"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: libpod/lock/in_memory_locks.go, pkg/specgen/utils_linux.go. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"eb098abe0a03496a92d3108b15955eec82a596010cc35bd2a699bdec8c9fcdcd"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (3 single-owned of 492 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)) \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":"D19","level":"note","message":{"text":"The compose test directory mentions docker-compose v1 is no longer supported but does not state which versions of podman are tested against or how to verify compatibility with the new version.: Add a short note on the old-docker-compose support policy and where to find the list of compatible podman versions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test/compose/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aecec03cf41347c561d25e9e20c80c04e1b6606debb38836f22e6335bcd9ad04"}},{"ruleId":"D20","level":"warning","message":{"text":"The body is a list of numbered sections (Branching/Schedules/Podman 5, Deprecations, Configuration files, Changes in Defaults for Podman, Libkrun, New Conmon, Pasta, Machine, Netavark, Podman machine updates, Issues in containers/podman with \u00226.0\u0022 label) plus a short branching/scheduling section and then the clip marker; only the title and the first few sections are visible before clipping, so context/problem, explicit decision, consequences/trade-offs, and an informative title are not all present: After the clip, add a Consequences section covering removal of cgroups v1 code, CNI config options, and test suite changes (and any trade-offs for users who still rely on CNI or cgroups v1). Also note that the remaining sections (BoltDB, --network-cmd-path, Windows 10, Intel-based Macs) are design documents and should not be flagged as missing"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"contrib/design-docs/podman6hld.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2167efb2c79ac321011daeec1f4bdc9dff1672dfa1207ea42d3d905c831c1e61"}},{"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":"b7d578bc636d1e83c289648176f52284ac7aae67ad24ccce6f025a14837c01a8"},"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":"e3c67770bb7fc7712cb9b5d012be94ffad18ab5fcdf8ecfa4c63ab462f52468d"},"taxa":[{"id":"CWE-94","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":"d908635d946ce387ed299bb9ef963675ed86b327a517a69fd6770f318e57d046"},"taxa":[{"id":"CWE-676","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":"1fb8f92876077470a4f24e62d275eff32096e36099123d23186327fefbc8a608"},"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":"d376361a84a218706fbbd40c388e68e5c39015e3107d1cd653f70456f6e98d02"},"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":"8a28754092d3f18bf1f8dc898cdf9355e631fb41b695e931466b42d0a940d6e0"},"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":"da73be0bffd3d2386fed286215579da192ccf18a77f74be4dbb08f43476aae0c"},"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":"b6e80a0e8883c85753073e06406ab2942c40004112df9260ed7098cae2751f21"},"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":"13bc025adcd880f1c0dba44ee60a60fc1d410eb1c01b043ea4320303396c715d"},"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":"a2dfd76fe241fc5c8f440e45cec91178b546b042544406c489f0224ad8023c75"},"taxa":[{"id":"CWE-200","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":"713f69b402e6562fcefcd90d389e9e5e01d872dab884c2e98cf3d72d1d38acd0"},"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":"d3c8d09e0ec68a268ed3da2c64a515c6fcf31b93d22bb8d8c7623b1a3c0e86b2"},"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":"f1b0564cbdaeabda5a28e977ec01256d41c6a070b0c3afa32db7b8e0469aa1ce"},"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":"9eef0987c45c93f39bc762a5d6e61efd0f047f4002c68482187bdfe91da169a5"},"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":"715a6b16e12966e2232b8ec16445085345a98778022352ba0049842e46d73c04"},"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":"36efdf3cfb02301cc3dc8fdfcbb8245a41b436842facebfef1c027d2e1fe418c"},"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":"33a88871a71a390630ea5afb45ad1e9732bd65e5556cdeb89a40a4dce62f4dd0"},"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":"75edf01cc67db003931efbead163e15f04c8fd11c30e951d28f4bbc7a3e69ce6"},"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":"f38a85fc29ad84a5012b8159b47fc41f3a51bcfe40722275fc556909d20c310e"},"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":"395bc355415ba398333f21848877781b422b664948646b4a15616c852d7d6718"},"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":"d3568bf1064dca6b2b9d9d2759b3b90c3920754cfb6f80e337c1cbb26c7dc55c"},"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":"8b599a8677a5bbe1b3ad43aef198abec835df1ff472219cdb4b924af74af4d4e"},"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":"082141e7fc92f7a2dc442712df15c1efcbf364287773c19f6cbeabb71b4e23cb"},"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":"093de6c93d5ed057546e00922a8f6deed7748912241fa1e788f8947b12133843"},"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":"86c5957a8b94ae4ca6ab096915190b62dc34610a985f12be86121398fef8cf74"},"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":"5b9893ced2b7347481637b130a95e24fe964a88f7af106cffb81e716fd138435"},"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":"fe1803a2ee7eebc053ac67edf0881be9b37c8fbfe73a93f3498c65bf7507b2cc"},"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":"e29d481ed593d5fe05fb42fbc3ff22982545d387f57a4c5877c0a52717e09209"},"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":"254c794e2deeb2c8c9f9f4546f34226dc93d7ddf0b4fb05b4d912ef9d8c2b97d"},"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":"57e93786924986b45ccc79532591aa74834ee622ca0911a37e2581ac0f040a3e"},"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":"fb1ccb16b3eaab11e50c1b3fe428fa43c3cac4d8cb802c758c77f7dc6702a2be"},"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":"d1a0dc02ca4ef0e4797105e62992903a67d42a11d871dd73ad55a5956e43ec8c"},"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":"ad4d2c8ebe577d5c06edefc4994e25e0d464416fe7ca1878921fe00c5310ae14"},"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":"f76a7032151df8e72dff67156141a7e8e42a2946bab201228e9ca29eedd342fe"},"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":"7d6cc34ec8db84539316b1b51763a3fa687bbcfb177f91509724c07336b77743"},"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":"410a9aeebe965a6001b15ba10b2521852df7bd36461c40c56887dfdd68225812"},"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":"afd60ce5f3a28fa9f986c51a548780521929a788bc75341950e54c374b00bbae"},"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":"b08c0207ef9c415384c4aec1ed333ce4ac6c84c621a9e5415a4dd8a15e907a51"},"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":"a3a2b08dd7ac31b3b71502efaee12c19dc59ba129034d3d1f2cde47bf41b0187"},"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":"304fc342b81b36e83d93a47eb8e012307e9c53db7684eacda015ac276a756224"},"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":"f023d9e16110c67f5e827ec6b722c67cf97d26066886ffaf219130fdc26dcf88"},"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":"6a82be8a441a757ec3b2f9083137331911c712b280e8e2b762f878ad1efca984"},"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":"65e14e44af06fa34dc53486765949f92750d811aa56b52e95fc6d5c65d7b1644"},"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":"7a2b3850535a9a63a5967863c1153391fb03e5e4b15127806c5417575b7c807d"},"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":"2197cd2f1c526f0959181ae0ca5426be55f0520cbcf5ee51217092623f86f9f8"},"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":"389f33352206193dd46c225f4a4212cd5904a3e01c237be4c771c2233e85cb9f"},"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":"8988241381cc58dfd962516300b4223dfa430689e9d5d60dbac2df641a130fa5"},"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":"5bb88b90892422aecde0f0bbc6474ce408a117f2e92dc585abda42027fb9ae97"},"taxa":[{"id":"CWE-242","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":"bd27f9a38f889593b60a84e713dc7adb3b539591daaf2680e624a2db3db69635"}},{"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":"03f5cc328b6a3f9396fee78608b88818bb638d7df843cf7e7380195156ebaea8"}},{"ruleId":"D31","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":"edbf3d618e6fe5e3b9f1377fafcf92ef901fdb16d39af36d5dfbba959a9e2401"}},{"ruleId":"D31","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":"078322bc78a1cbe82042f34fa79d529c467138ec34bf03768028ee255a3bc5bf"}},{"ruleId":"D31","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":"7bc6723e255096a397e85d2cf9f9313665ff5859f671582a2a951b15fa59a7ba"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 53 of 492 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: libpod/pod.go, pkg/systemd/generate/pods.go, cmd/podman-testing/data.go (and 50 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":"D35","level":"warning","message":{"text":"Change coupling: config.go \u2194 machine.go: \u0060pkg/machine/applehv/config.go\u0060 and \u0060pkg/machine/applehv/machine.go\u0060 change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/machine/applehv/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0245c693ba71f9782fcce073e9a2440cb38731fd4148a12f93363ade4584d90"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: config.go \u2194 machine.go: \u0060pkg/machine/qemu/config.go\u0060 and \u0060pkg/machine/qemu/machine.go\u0060 change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/machine/qemu/config.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b32a70894174ab29436eef5adcec41a23085a5572baf80be2ef3d77d95bf7e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: vfkit.go \u2194 helper.go: \u0060pkg/machine/apple/vfkit.go\u0060 and \u0060pkg/machine/apple/vfkit/helper.go\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pkg/machine/apple/vfkit.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"870b7097fd304b35a7636803c21bf890cb943f31982b6156f628beb7d587ea38"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"}},{"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":"f3829ecb04e9d41cea698029c2d83e97970be2c6f5ee3e406e1d543f8095967e"}}],"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-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-200","guid":"b0ce3b1d-7a29-fe50-8aab-9aba899d2988","name":"Exposure of Sensitive Information to an Unauthorized Actor","shortDescription":{"text":"Exposure of Sensitive Information to an Unauthorized Actor"},"helpUri":"https://cwe.mitre.org/data/definitions/200.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-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-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-676","guid":"550e6fab-2881-3252-8a05-c688a6b19c14","name":"CWE-676","shortDescription":{"text":"CWE-676"},"helpUri":"https://cwe.mitre.org/data/definitions/676.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-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":58,"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."]}]}